#include<iostream>
#include<map>
using namespace std;
 
int main(int argc, char* argv[]) {
  map<int, int> data;
  int var;
  int max = 0;
  while(cin >> var) {
    data[var]++;
    if(data[var] > max) {
      max = data[var];
    }
  }
  //cout << max << endl;
  for(map<int, int>::iterator it=data.begin(); it!=data.end(); it++) {
    if(it->second == max) cout << it->first << endl;
  }
}
