# include <iostream>
# include <algorithm>
# include <stdio.h> 
using namespace std;
int a[101];
int c[101];

int main(){
    int num = 0;
    int max = 0;
    int b;
   while((scanf("%d",&b)) != EOF){
        a[b]++;
    }
    for(int i = 1; i < 101 ; i++){
        if (a[i] > max) max=a[i];
    }
    for(int i = 1; i < 101 ; i++){
        if (a[i] == max){
            c[num] = i;
            num++;
        }
    }
    sort(c,c+num);
    for(int i = 0; i < num; i++){
        cout<<c[i]<<endl;
    }
}
