Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently.



Input

A sequence of integers ai (1 ≤ ai ≤ 100). The number of integers is less than or equals to 100.

Output

Print the mode values. If there are several mode values, print them in ascending order.

Example

Input

5
6
3
5
8
7
5
3
9
7
3
4


Output

3
5
import java.util.*;

class Cnt {
	public int number,
	           count = 1;
	Cnt(int a){this.number = a;}
}

public class Main {
	
	private static ArrayList<Cnt> list = new ArrayList<Cnt>();
	
	public static void main(String[] args) {

		//input
		Scanner sc = new Scanner(System.in);
		
		Cnt cnt;
		boolean find_flg;	
		while(sc.hasNext()){
			cnt = new Cnt(sc.nextInt());

			find_flg = false;
			for(Cnt c:list){
				if(c.number == cnt.number){
					c.count++;
					find_flg = true;
					break;
				}
			}
			if(!find_flg){list.add(cnt);}
		}

		//calculate frequency of appearance.
		int freq_max = 0;
		ArrayList<Integer> freq_number = new ArrayList<Integer>();
		for(Cnt c:list){
			if(c.count == freq_max){
				freq_number.add(c.number);
			}
			if(c.count > freq_max){
				freq_max = c.count;
				freq_number.clear();
				freq_number.add(c.number);
			}
		}

		//output
		for(int num:freq_number){System.out.println(num);}
	}
}