The age and the name of every member of an online judge are given in the order they joined. Write a program that sorts the members by increasing age, and puts the member who joined earlier first when two ages are equal.
The first line contains the number of members N. (1≤N≤100000)
Each of the next N lines contains one member's age and name, separated by a single space. The age is an integer between 1 and 200. The name is a string of at most 100 uppercase and lowercase English letters. The lines are given in the order the members joined.
Print the sorted result on N lines. Each line holds one member's age and name, separated by a single space. Members of the same age are printed in the order they joined.