This comment is hidden because it contains spoiler information about the solution
new line is supposed to be "\n"
Not only that, there's only one test, and it's the same as the example. It would be trivial for someone to return the example solution and pass.
You need more test cases, including edge cases (no classes, no students, what about missing student IDs?). Randomized test cases.