#include <bits/stdc++.h>
using namespace std;
string arr[100];
map<int, string> m;
int main() {
  int n;
  int i = 0;
  cin >> n;
  while (n--) {
    cin >> arr[i++];
  }
  for (int j = 0; j < i; j++) {
    int count = 1;
    for (int k = j + 1; k < i; k++) {
      if (arr[j] == arr[k]) count++;
    }
    m[count] = arr[j];
  }
  cout << m.rbegin()->second << endl;
}
