시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 75 64 64 85.333%

문제

General Election is over, now it is time to count the votes! There are N (2 <= N <= 5) candidates and M (1 <= M <= 100) vote regions. Given the number of votes for each candidate from each region, determine which candidate is the winner (one with the most votes). 

입력

The first line of input contains an integer T, the number of test cases follow.

Each test case starts with an integer N and M denoting the number of candidate and number of region. The next M lines each contains N integers, v1v2, ..., vN (0 <= vi <= 1000) the number of votes for candidate i.

출력

For each test case, output in a line the winning candidate. You may safely assume that the winner is unique.

예제 입력 1

2
3 3
159 213 450
512 890 993
215 420 397
2 5
40 64
35 12
102 58
43 15
79 41

예제 출력 1

3
1