import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Map;
import java.util.TreeMap;

public final class Main {
  public static void main(final String[] args) throws Exception {
    int max = 0;
    final Map<String, int[]> map = new TreeMap<>();

    try (final BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      for (int n = Integer.parseInt(br.readLine()); n > 0; n--) {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      }
    }
    try (final PrintWriter pw = new PrintWriter(System.out)) {
      for (Map.Entry<String, int[]> e : map.entrySet()) {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      }
      pw.flush();
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Map; Map java.util import java.util.TreeMap; TreeMap java.util public final class Main {
  public static void main(final String[] args) throws Exception {
    int max = 0;
    final Map<String, int[]> map = new TreeMap<>();

    try (final BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      for (int n = Integer.parseInt(br.readLine()); n > 0; n--) {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      }
    }
    try (final PrintWriter pw = new PrintWriter(System.out)) {
      for (Map.Entry<String, int[]> e : map.entrySet()) {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      }
      pw.flush();
    }
  }
} Main public static void main(final String[] args) throws Exception {
    int max = 0;
    final Map<String, int[]> map = new TreeMap<>();

    try (final BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      for (int n = Integer.parseInt(br.readLine()); n > 0; n--) {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      }
    }
    try (final PrintWriter pw = new PrintWriter(System.out)) {
      for (Map.Entry<String, int[]> e : map.entrySet()) {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      }
      pw.flush();
    }
  } main {
    int max = 0;
    final Map<String, int[]> map = new TreeMap<>();

    try (final BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      for (int n = Integer.parseInt(br.readLine()); n > 0; n--) {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      }
    }
    try (final PrintWriter pw = new PrintWriter(System.out)) {
      for (Map.Entry<String, int[]> e : map.entrySet()) {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      }
      pw.flush();
    }
  } int max = 0; max 0 final Map<String, int[]> map = new TreeMap<>(); map new TreeMap<>() try (final BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      for (int n = Integer.parseInt(br.readLine()); n > 0; n--) {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      }
    } {
      for (int n = Integer.parseInt(br.readLine()); n > 0; n--) {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      }
    } final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) for (int n = Integer.parseInt(br.readLine()); n > 0; n--) {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      } int n = Integer.parseInt(br.readLine()); int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br n > 0 n 0 n-- n-- n {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      } {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      } final String s = br.readLine(); s br.readLine() br.readLine br final int[] c = map.get(s); c map.get(s) map.get map s if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        } c == null c null {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } map.put(s, new int[] { 1 }) map.put map s new int[] { 1 } if (max == 0) {
            max++;
          } max == 0 max 0 {
            max++;
          } max++ max {
          if (++c[0] > max) {
            max = c[0];
          };
        } if (++c[0] > max) {
            max = c[0];
          } ++c[0] > max ++c[0] c[0] c 0 max {
            max = c[0];
          } max = c[0] max c[0] c 0 try (final PrintWriter pw = new PrintWriter(System.out)) {
      for (Map.Entry<String, int[]> e : map.entrySet()) {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      }
      pw.flush();
    } {
      for (Map.Entry<String, int[]> e : map.entrySet()) {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      }
      pw.flush();
    } final PrintWriter pw = new PrintWriter(System.out) final PrintWriter pw = new PrintWriter(System.out) new PrintWriter(System.out) for (Map.Entry<String, int[]> e : map.entrySet()) {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      } Map.Entry<String, int[]> e map.entrySet() map.entrySet map {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      } {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      } if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        } e.getValue()[0] == max e.getValue()[0] e.getValue() e.getValue e 0 max {
          pw.println(e.getKey());
        } pw.println(e.getKey()) pw.println pw e.getKey() e.getKey e pw.flush() pw.flush pw final String[] args args public final class Main {
  public static void main(final String[] args) throws Exception {
    int max = 0;
    final Map<String, int[]> map = new TreeMap<>();

    try (final BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      for (int n = Integer.parseInt(br.readLine()); n > 0; n--) {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      }
    }
    try (final PrintWriter pw = new PrintWriter(System.out)) {
      for (Map.Entry<String, int[]> e : map.entrySet()) {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      }
      pw.flush();
    }
  }
} public final class Main {
  public static void main(final String[] args) throws Exception {
    int max = 0;
    final Map<String, int[]> map = new TreeMap<>();

    try (final BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      for (int n = Integer.parseInt(br.readLine()); n > 0; n--) {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      }
    }
    try (final PrintWriter pw = new PrintWriter(System.out)) {
      for (Map.Entry<String, int[]> e : map.entrySet()) {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      }
      pw.flush();
    }
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Map;
import java.util.TreeMap;

public final class Main {
  public static void main(final String[] args) throws Exception {
    int max = 0;
    final Map<String, int[]> map = new TreeMap<>();

    try (final BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      for (int n = Integer.parseInt(br.readLine()); n > 0; n--) {
        final String s = br.readLine();
        final int[] c = map.get(s);
        if (c == null) {
          map.put(s, new int[] { 1 });
          if (max == 0) {
            max++;
          }
        } else {
          if (++c[0] > max) {
            max = c[0];
          };
        }
      }
    }
    try (final PrintWriter pw = new PrintWriter(System.out)) {
      for (Map.Entry<String, int[]> e : map.entrySet()) {
        if (e.getValue()[0] == max) {
          pw.println(e.getKey());
        }
      }
      pw.flush();
    }
  }
}
