The ACM competition has a somewhat unusual system of scoring participating teams. Each team is assigned two numbers: the number of problems they have successfully solved and a time value. Teams are ranked first according to the number of problems solved (more problems yields a better ranking) and ties are broken by the time value (less time yields a better ranking).
The time value for a particular team is computed according to the following rules:
The input will consist of a number of lines, each representing a problem submission. Each line will contain four whitespace-separated tokens: the first is a string designating a team's name, the second is the problem number submitted, the third is the floating-point number of minutes from the start of the contest at which this submission was made, and the fourth is a '0' or '1'. The '0' indicates that the submission was incorrect; the '1' indicates that the submission was correct and the problem was solved. No team name will consist of more than 8 characters.
The output should contain one line for each distinct team in the input, placed in order of the teams' current ranking (with 1 being the best rank and higher numbers indicating sequentially lower ranks). Each line should contain, first, the rank of the current team; second, the team name; third, the number of problems that team has solved; and fourth, the time score for that team. Each item should be formatted according to the example below. Use spaces to separate items, rather than tabs and do not include trailing whitespace. Be sure there are two significant figures after the decimal point in each time score; no more than four digits to the left of the decimal point will be needed. (The numbers in the first line of the example output are there only to help align your output; they should not appear.)
dvry 3 10.44 1 dcoders 2 11.27 0 coderage 2 15.31 1 coderage 3 21.72 0 dcoders 3 22.05 1 coderage 3 23.10 1 caltech 1 123.28 0
12345678901234567890123456789 1 coderage 2 58.41 2 dvry 1 10.44 3 dcoders 1 22.05 4 caltech 0 0.00