x=require('fs').readFileSync('/dev/stdin','utf8').trim().split(/\s/).sort(function(a,b){return a-b;});
console.log(x);
for(mode=[],cnt=0,i=0;i<x.length;i++){
    temp_cnt=1;
    for(j=i+1;j<x.length;j++){
        if(x[i]==x[j]){
            temp_cnt++;
        }
    }
    if(temp_cnt>=cnt){
        cnt=temp_cnt;
        mode.push(x[i]); 
    }
}
console.log(mode);