#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string team1 = "";
  string team2 = "";
  int team1points = 0;
  int team2points = 0;
  cin >> N;
  while (N--) {
    string goalTeam;
    cin >> goalTeam;
    if (team1 == goalTeam) {
      team1points++;
    } else if (team2 == goalTeam) {
      team2points++;
    } else if (team1 == "") {
      team1 = goalTeam;
      team1points++;
    } else if (team2 == "") {
      team2 = goalTeam;
      team2points++;
    }
  }
  cout << (team1points > team2points ? team1 : team2) << endl;
  return 0;
}
