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

int main() {
  int n;
  vector<int> a_list;
  map<int, int> a;
  while (cin >> n) {
    a[n]++;
    a_list.push_back(n);
  }
  sort(a_list.begin(), a_list.end());
  a_list.erase(unique(a_list.begin(), a_list.end()), a_list.end());
  int max_n = 0;
  int i;
  for (i = 0; i < a_list.size(); i++) {
    max_n = max(max_n, a[a_list[i]]);
  }
  for (i = 0; i < a_list.size(); i++) {
    if (a[a_list[i]] == max_n) {
      cout << a_list[i] << endl;
    }
  }
  return 0;
}

