import std.stdio;
import std.array;
import std.conv;
import std.algorithm;
void main() {
	int[] counter = new int[100];
	string s;
	while( (s=readln()).length != 0 ){
		string[] input = split(s);
		int a = to!int(input[0]);
		counter[a-1]++;
	}
	auto l = reduce!(max)(counter);
	for(int i=0;i<100;i++){
		if(counter[i] == l) writefln("%d",i+1);
	}
}