시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 36 12 12 48.000%

문제

작디 작은 온조가 사는 작디 작은 나라에서 대통령 선거가 시행되고 있다. 작디 작은 온조가 사는 작디 작은 나라에는 총 M 명의 작디 작은 시민이 1번 부터 N번 까지 번호가 붙어있는 N명의 작디 작은 후보 중 한 사람을 뽑으려고 한다.

각각의 작디 작은 투표자들은 그의 작디 작은 투표용지에 첫 번째에는 가장 좋아하는 작디 작은 후보를, 두 번째에는 두 번째로 좋아하는 작디 작은 후보를, ... , 마지막에는 제일 싫어하는 작디 작은 후보를 적는다. 즉, 자신이 좋아하는 순서대로 나열하는 것이다.

우리는 작디 작은 후보 A 가  작디 작은 후보 B를  이겼다고 말할 수 있는 경우는 작디 작은 후보 A를 작디 작은 후보 B 앞에 쓴 작디 작은 투표자가 많은 경우이다. 작디 작은 후보 A에 대하여 그의 점수를 그가 이긴 작디 작은 후보의 수로 정의한다. 우리는 작디 작은 후보의 점수가 가장 높거나 같을 때 선거에서 이겼다고 한다.

이번에 선거위원을 맡게된 작디 작은 형준이는 이번에 고등학교 배치고사 공부를 해야하느라 바쁘다.  공부하느라 바쁜 작디 작은 형준이의 일을 덜어주기 위해서 작디 작은 시민들의 투표 결과가 주어졌을 때, 우승한 작디 작은 후보(또는 작디 작은 후보'들')을 찾아내는 프로그램을 대신 작성해주기로 하자.

입력

첫째 줄의 입력은 두 정수  M과 N이 주어진다. (1 ≤ M,N ≤ 50, M은 홀수)

다음 N개의 줄에 각각의 N 번호, 각 시민의 투표 용지의 내용의 순서가 포함되어 있습니다.

출력

만약 단 한 명의 작디 작은 후보가 우승한다면 한 줄에 그의 번호를 출력하세요.

만약 우승한 작디 작은 후보가 더 있다면,  임의의 순서로 각각의 번호를 한 줄에 하나씩 출력하세요.

예제 입력 1

1 3
1 2 3

예제 출력 1

1
W3sicHJvYmxlbV9pZCI6IjMxNjEiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM1NDR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