#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    char s[150], s1[150] = "", s2[150] = "";
    int t1 = 0, t2 = 0;
    scanf("%s", s1);
    t1++;
    n--;
    while (n--) {
      scanf("%s", s);
      if (strcmp(s, s1) == 0) {
        t1++;
      } else {
        strcpy(s2, s);
        t2++;
      }
    }
    if (t1 > t2) {
      printf("%s\n", s1);
    } else {
      printf("%s\n", s2);
    }
  }
}
