ispit
문제
Luke does not like studying, but he really wants to pass the extremely hard exam from the first year.
Somebody has told him that all the students from the second year know the answers from the exam, but that is far from real truth. In fact, no one from the second year knows the answers but they all think that somebody else knows.
Luke chooses some student A and asks him about the answers. Student A says that he/she doesn't know, but that he/she thinks that student B knows the answers. After that, Luke is asking student B, and so on...
When he finally realizes that this method will give him no useful results, he is very sad, but then he realizes that he can meet many older students this way, which could be useful some day.
Write a program to find the student which Luke must ask first, so that the total number of students Luke meets in the process is as high as possible.
입력
First line of input contains an integer N, 2 ≤ N ≤ 1000, the number of students. Students are designated with numbers from 1 to N.
Each of the following N lines contains one number. First line contains the number denoting the answer of student 1, second line contains the number denoting the answer of student 2, and so on...
출력
First and only line of output should contain the designation of the student that Luke should ask first.
If there is more than one solution, output the one with the smallest designation.
예제
예제 1
3 3 3 1
2
예제 2
4 2 3 4 1
1
예제 3
6 2 3 4 3 1 1
5