import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicInteger;

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

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

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

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

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

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

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

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

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