#include <bits/stdc++.h>
using namespace std;
void input(int &n, string s[]) {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> s[i];
}
string process(int n, string s[]) {
  string team_win = s[0];
  int goal = 0;
  for (int i = 0; i < n - 1; i++) {
    int count = 1;
    for (int j = i + 1; j < n; j++)
      if (s[i] == s[j]) {
        count++;
      }
    if (count > goal) {
      goal = count;
      team_win = s[i];
    }
  }
  return team_win;
}
int main() {
  int n;
  string s[100];
  input(n, s);
  cout << process(n, s);
  return 0;
}
