시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 33 10 10 45.455%

문제

작디 작은 온조가 사는 작디 작은 나라에서 대통령 선거가 시행되고 있다. 작디 작은 온조가 사는 작디 작은 나라에는 총 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
W3sicHJvYmxlbV9pZCI6IjMxNjEiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM1NDRc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