#include <bits/stdc++.h>
using namespace std;
int main() {
  map<string, int> goals;
  string team1, team2;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string team;
    cin >> team;
    if (team1.empty()) team1 = team;
    if (team != team1) team2 = team;
    goals[team] += 1;
  }
  if (goals[team1] > goals[team2])
    cout << team1;
  else
    cout << team2;
}
