Sort Student Records


Submit solution

Points: 100
Time limit: 2.0s
Memory limit: 256M

Author:
Problem types

Sort student records by decreasing name; equal names are ordered by increasing identifier.

Input

The first line contains \(n\). For each student, three lines contain the identifier, full name, and integer mark.

The input satisfies:

  • \(0 <= n <= 10\)

Output

Print the fixed heading, then each sorted record as name mark id.

Example

Input
3
sv01
Nguyen Quang Hai
10
sv02
Nguyen Viet Anh
10
sv03
Nguyen Quang Hai
10
Output
Danh sach sinh vien sau khi sap xep:
Nguyen Viet Anh 10 sv02
Nguyen Quang Hai 10 sv01
Nguyen Quang Hai 10 sv03

Comments

There are no comments at the moment.