In the regional round of a collegiate programming contest, the top few universities earn a place at the world finals. A team ranks higher when it solves more problems, and among teams that solved the same number of problems, a smaller penalty ranks higher. Only the highest ranked team of each university goes to the world finals.
N teams competed in the regional round and K universities advance to the world finals. Find the advancing teams, starting from the highest rank.
The first line contains the number of teams N and the number of universities that advance, K. (1≤N≤100000, 1≤K≤100)
Each of the next N lines describes one team as a university name, a team name, the number of solved problems, and the penalty, separated by spaces.
The university name and the team name are single words without spaces, each at most 30 characters long. Any two teams differ in the number of solved problems or in the penalty.
Print the names of the K teams that advance to the world finals, one per line, starting from the highest rank. The input is guaranteed to contain at least K distinct universities.