Navid The Judge
"Testing can only prove the presence of bugs, not their absence."
Edsger Dijkstra
The ACM group of SBU has decided to develop a new application of creating scoreboard for the next contest. Judge Navid will use this application to judge your submissions! Your job is to write a program for judge Navid which reads a list of submissions in a programming contest and generate the final scoreboard.
Teams are ranked according to most problems solved. Teams placing who solve the same number of problems are ranked first by list total time and, if need be, by the earliest time of submittal of the last accepted run. The total time is the sum of the time consumed for each problem solved. The time consumed for a solved problem is the time elapsed from beginning of the contest to the submittal of the first accepted run plus twenty penalty minutes for every previously rejected run for that problem. There is no time consumed for a problem that is not solved.
For example, consider a situation when two teams, "Chormangz" and "DC", tie by solving two problems each. The team Chormangz submitted their solutions to A and B at 1:00 and 2:45 after the beginning of the contest. They had a rejected run on C, but it was ignored since they didn't solve C. The team DC submitted solutions to problems A and C at 1:20 and 2:00 after the beginning. They had one rejected run on C. Then, the total time is 1:00+2:45=3:45 for team Chormangz and 1:20+2:00+0:20=3:40 for team DC. The tie is broken in favor of Team DC.
The result of each submission which is determined by judge Navid is one of these messages:
Accepted → AC
Compile Error → CE
Time Limit Exceeded → TLE
Run Time Error → RTE
Wrong Answer → WA
Input
Input is a list of submissions. Each submission is designated by a line containing four fields which are separated by slashes. The first field is the team name (1 to 10 characters). The second field is the problem ID (One character from "A" to "Z"). The third field is the time of submission and the fourth field is the result of submission determined by judge Navid. There will be no more than 100 teams in the contest.
Output
Output is a table showing scoreboard and should be in exactly the same form as that in the example below. The widths of the columns are :
Rank : 4
Team Name : 12
Problem ID : 7
Solved : 6
Time : 4
There's a space between consecutive columns. All data in columns are left justified. See the sample output for more details.