PROGRAMMING:Pat ranking summary
The purpose of programming ability test (PAT) is to objectively evaluate the candidates' ability of algorithm design and programming implementation through the unified online examination and automatic evaluation method, scientifically evaluate the computer programming talents, and provide reference standards for enterprises to select talents http://www.patest.cn )。
Each test will be held in several different test sites at the same time, and each test site uses LAN to generate the results of the test site. At the end of the test, the scores of each test point will be immediately summarized into a general ranking table.
Now please write a program to automatically merge the scores of each test point and generate the total ranking table.
###Input format:
The first line of input gives a positive integer n ($$$Le $$100), which represents the total number of test sites. Then give the scores of N test points, the format is: first, give a positive integer k ($$$Le $$300) in one line, representing the total number of candidates in the test point; Then K lines, each line gives the information of a candidate, including the test number (composed of 13 integer numbers) and score (an integer in the [0100] interval), separated by a space.
###Output format:
First, output the total number of candidates in the first line. Then output the summary of the ranking table, each candidate's information occupies a row, the order is: test number, final ranking, test site number, ranking in the test site. The test sites are numbered from 1 to n according to the order given by the input. The output of candidates should be in the non decreasing order of final ranking. Candidates with the same score should have the same rank and output in the increasing order of test number.
###Input example:
```in
two
five
1234567890001 95
1234567890005 100
1234567890003 95
1234567890002 77
1234567890004 85
four
1234567890013 65
1234567890011 25
1234567890014 100
1234567890012 85
```
###Output example:
```out
nine
1234567890005 1 1 1
1234567890014 1 2 1
1234567890001 3 1 2
1234567890003 3 1 2
1234567890004 5 1 4
1234567890012 5 2 2
1234567890002 7 1 5
1234567890013 8 2 3
1234567890011 9 2 4
```
answer:If there is no answer, please comment
Each test will be held in several different test sites at the same time, and each test site uses LAN to generate the results of the test site. At the end of the test, the scores of each test point will be immediately summarized into a general ranking table.
Now please write a program to automatically merge the scores of each test point and generate the total ranking table.
###Input format:
The first line of input gives a positive integer n ($$$Le $$100), which represents the total number of test sites. Then give the scores of N test points, the format is: first, give a positive integer k ($$$Le $$300) in one line, representing the total number of candidates in the test point; Then K lines, each line gives the information of a candidate, including the test number (composed of 13 integer numbers) and score (an integer in the [0100] interval), separated by a space.
###Output format:
First, output the total number of candidates in the first line. Then output the summary of the ranking table, each candidate's information occupies a row, the order is: test number, final ranking, test site number, ranking in the test site. The test sites are numbered from 1 to n according to the order given by the input. The output of candidates should be in the non decreasing order of final ranking. Candidates with the same score should have the same rank and output in the increasing order of test number.
###Input example:
```in
two
five
1234567890001 95
1234567890005 100
1234567890003 95
1234567890002 77
1234567890004 85
four
1234567890013 65
1234567890011 25
1234567890014 100
1234567890012 85
```
###Output example:
```out
nine
1234567890005 1 1 1
1234567890014 1 2 1
1234567890001 3 1 2
1234567890003 3 1 2
1234567890004 5 1 4
1234567890012 5 2 2
1234567890002 7 1 5
1234567890013 8 2 3
1234567890011 9 2 4
```
answer:If there is no answer, please comment