#include<iostream>
#define N 100
using namespace std;

int main(){
  int i,a[N];
  while(cin >> i) a[i-1]++;
  int max = a[0];
  for(int j = 0; j < N; j++){
    if(max < a[j]) max = a[j];
  }
  for(int k = 0; k < N; k++){
    if(a[k] == max) cout << k + 1 << "\n";
  }
}