Input data
Format
First line: Judge numbers are written in order, separated by spaces.
2nd line: Specify categories in order by short name.
3rd row and after: 1st column, number. In the second and subsequent columns, the order of each category is written in the order of the judge number. Separate each judge with a space.
The number of judges is specified as an odd number. An even number of judges is not supported, incorrect values will appear.
Sample data
10 11 12
WTVFQ
4 55111 13133 14451
68 24223 22211 21332
172 13342 51422 33223
332 42434 34344 42114
340 31565 45556 56645
348 66656 66665 65566