Trains travel in both directions of the lines. The time to travel from a station to the following (or the previous) station of the line is always 2 hours. As you can observe, some stations are used by different lines —we call them the important stations—, while other stations are only used by one line —the secondary stations—.
We believe Krochanska is situated in an important station where he can travel faster to any other station. In particular, he tries to minimize the average of the minimum times from his station to the rest of important stations. You can assume that there is no loss of time to switch from one line to another at a station.
You have to find out where Cirilo Krochanska is.
The input will contain several test cases. The first line indicates the number of test cases.
For each test case, the first line contains two integers: N and S. N is the total number of existing stations, and S is the number of lines. Stations are numbered from 1 to N ; N is not greater than 10000; and S is not greater than 100. Next, we have S lines, one for each train line. These lines consist of a list of stations, separated by blank spaces, ending with a '0'.
There will be between 1 and 100 important stations, inclusive. There is always a path between any pair of stations.
For each test case, you have to output the number of the resulting station, in the following format:
Krochanska is in: X
where X is the number of the station. If there are more than one important station with the minimum distance, then you have to output the one with the smallest number.