module AOJ_Volume0028;

import std.stdio,std.string,std.conv;

int main()
{
	int[101] count;
	int max;
	string s;

	while((s = readln.chomp).length != 0)
	{
		int value = s.to!int;
		count[value]++;
	}
	max = count[0];
	foreach(i;0..100)
	{
		if(max < count[i]) max = count[i];
	}
	foreach(i;0..100)
	{
		if(max == count[i]) writeln(i);
	}

	return 0;
}