PROGRAMMING:Ranking statistics of curriculum design
The data structure course design takes the group as the unit to reply. Each group has a unique positive integer number and four members.
After the completion of the defense, each group will submit a defense score table, which lists the number of all groups in the order of ranking from high to low.
For example, if the maximum number of group number is 5 and the data of grade table submitted by group 2 is {5 1 2 4 3}, group 5 will rank first, group 1 will rank second, and so on.
The final defense scores of each group are re ranked according to the sum of the rankings submitted by all groups. The smaller the sum, the higher the ranking. The ranking from high to low is 1,2,3.
Please help the teacher count the final ranking of each group.
###Input format:
Enter a positive integer n (n ≤ 10) in one line, which is the number of groups.
Then n lines, according to the increasing order of group number I (1 ≤ I ≤ n), each line first gives the names of the four members of the i-th group, separated by a space,
Then give a reply score table submitted by a group, which is composed of n positive integers, separated by spaces in the middle, corresponding to the number of the group ranking from high to low.
The name is a non empty string that does not contain white space characters and does not exceed 20 in length.
###Output format:
According to the non increasing order of the final ranking, each row first gives the ranking, and then outputs the names of the four members of the corresponding group in the input order, separated by a space in the middle.
If the final ranking of the group is the same, it will be output according to the increasing order of the group number.
###Input example:
```in
five
xiaozhao zhangwuji zhaomin zhouzhiruo 2 3 1 5 4
huangrong guojing guofu guoxiang 2 3 5 1 4
yangguo xiaolongyu limochou laowantong 3 2 1 4 5
yangkang monianci ouyangxiu zhoubotong 2 3 1 5 4
yuanchengzhi qingqing wenyi gongzhu 3 2 1 4 5
```
###Output example:
```out
1 huangrong guojing guofu guoxiang
2 yangguo xiaolongyu limochou laowantong
3 xiaozhao zhangwuji zhaomin zhouzhiruo
4 yuanchengzhi qingqing wenyi gongzhu
5 yangkang monianci ouyangxiu zhoubotong
```
answer:If there is no answer, please comment
After the completion of the defense, each group will submit a defense score table, which lists the number of all groups in the order of ranking from high to low.
For example, if the maximum number of group number is 5 and the data of grade table submitted by group 2 is {5 1 2 4 3}, group 5 will rank first, group 1 will rank second, and so on.
The final defense scores of each group are re ranked according to the sum of the rankings submitted by all groups. The smaller the sum, the higher the ranking. The ranking from high to low is 1,2,3.
Please help the teacher count the final ranking of each group.
###Input format:
Enter a positive integer n (n ≤ 10) in one line, which is the number of groups.
Then n lines, according to the increasing order of group number I (1 ≤ I ≤ n), each line first gives the names of the four members of the i-th group, separated by a space,
Then give a reply score table submitted by a group, which is composed of n positive integers, separated by spaces in the middle, corresponding to the number of the group ranking from high to low.
The name is a non empty string that does not contain white space characters and does not exceed 20 in length.
###Output format:
According to the non increasing order of the final ranking, each row first gives the ranking, and then outputs the names of the four members of the corresponding group in the input order, separated by a space in the middle.
If the final ranking of the group is the same, it will be output according to the increasing order of the group number.
###Input example:
```in
five
xiaozhao zhangwuji zhaomin zhouzhiruo 2 3 1 5 4
huangrong guojing guofu guoxiang 2 3 5 1 4
yangguo xiaolongyu limochou laowantong 3 2 1 4 5
yangkang monianci ouyangxiu zhoubotong 2 3 1 5 4
yuanchengzhi qingqing wenyi gongzhu 3 2 1 4 5
```
###Output example:
```out
1 huangrong guojing guofu guoxiang
2 yangguo xiaolongyu limochou laowantong
3 xiaozhao zhangwuji zhaomin zhouzhiruo
4 yuanchengzhi qingqing wenyi gongzhu
5 yangkang monianci ouyangxiu zhoubotong
```
answer:If there is no answer, please comment