import std.stdio;
import std.string;
import std.conv;
void main(){
	int[101] counter; 
	string rc;
	int max;
	while( 1 ){
		rc = readln().chomp();
		if( !rc ){	break;	}
		counter[ to!int( rc ) ]++;
		if( max < counter[ to!int( rc ) ] ){
			max = counter[ to!int( rc ) ];
		}
	}
	foreach( i,c ; counter ){
		if( c == max ){
			writeln( i );
		}
	}
}