Робота з рядками
One day, an awkward secretary messed up personal affairs of students. Now they again need to order first by grade, and within a class by name.
The first line contains the number N (1 ≤ N ≤ 1000) - the number of personal affairs. Next to each of the N students the following data (each in its own line): full name, grade, date of birth. Surname and name - string of no more than 20 characters, the class - a string consisting of numbers (from 1 to 11) and letters (from "A" to "Z"), date of birth - the date in the format MM.DD.YY. It is guaranteed that within a single class there namesakes.
The output file you want to display N lines, each of which recorded data for one student. Rows should be arranged first by class and then by last name.
3 Sidorov Sidor 9A 20.07.93 Petrov Petr 10B 23.10.92 Ivanov Ivan 9A 10.04.93
9A Ivanov Ivan 10.04.93 9A Sidorov Sidor 20.07.93 10B Petrov Petr 23.10.92