Group students by their grade. Input is name and grade on each line. Output each grade followed by the students with that grade, sorted by grade.
Input: Lines of name grade pairs
Output: Each grade on its own line, followed by names of students with that grade
Example:
- Input:
Alice A,Bob B,Carol A - Under grade
A: Alice, Carol
Think about using a dictionary where grades are keys and values are lists of names.