#include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
using namespace std;

struct value{
  int value_;
  int frequency;

  bool operator<(const value &value__) const {
    return frequency > value__.frequency;
  }

};

int main(){
  int tmp;
  vector<value> v(101);
  for(int i=0;i<101;++i){
    v[i].value_=i;
    v[i].frequency=0;
  }

  while(cin>>tmp){
    ++v[tmp].frequency;
  }

  sort(v.begin(),v.end());

  for(int i=0;i<101;++i){
    if(i>0){
      if(v[i].frequency!=v[i-1].frequency)
        break;
    }
    cout<<v[i].value_<<endl;
  }

  return EXIT_SUCCESS;
}