import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }

    static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            Map<String, Integer> map = new TreeMap<>();
            int max = 0;
            for (int i = 0; i < N; i++) {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            }
            for (String key : map.keySet()) {
                if (map.get(key) == max) {
                    out.println(key);
                }
            }
        }
    }
} import java.io.InputStream; InputStream java.io import java.io.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }

    static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            Map<String, Integer> map = new TreeMap<>();
            int max = 0;
            for (int i = 0; i < N; i++) {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            }
            for (String key : map.keySet()) {
                if (map.get(key) == max) {
                    out.println(key);
                }
            }
        }
    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) Solver solver = new Solver(); solver new Solver() solver.solve(in, out) solver.solve solver in out out.close() out.close out String[] args args static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            Map<String, Integer> map = new TreeMap<>();
            int max = 0;
            for (int i = 0; i < N; i++) {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            }
            for (String key : map.keySet()) {
                if (map.get(key) == max) {
                    out.println(key);
                }
            }
        }
    } Solver public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            Map<String, Integer> map = new TreeMap<>();
            int max = 0;
            for (int i = 0; i < N; i++) {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            }
            for (String key : map.keySet()) {
                if (map.get(key) == max) {
                    out.println(key);
                }
            }
        } solve {
            int N = in.nextInt();
            Map<String, Integer> map = new TreeMap<>();
            int max = 0;
            for (int i = 0; i < N; i++) {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            }
            for (String key : map.keySet()) {
                if (map.get(key) == max) {
                    out.println(key);
                }
            }
        } int N = in.nextInt(); N in.nextInt() in.nextInt in Map<String, Integer> map = new TreeMap<>(); map new TreeMap<>() int max = 0; max 0 for (int i = 0; i < N; i++) {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            } {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            } String S = in.next(); S in.next() in.next in Integer val = map.get(S); val map.get(S) map.get map S if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                } val == null val null {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                } map.put(S, 1) map.put map S 1 if (max <= 1) {
                        max = 1;
                    } max <= 1 max 1 {
                        max = 1;
                    } max = 1 max 1 {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                } map.put(S, val + 1) map.put map S val + 1 val 1 if (max <= val + 1) {
                        max = val + 1;
                    } max <= val + 1 max val + 1 val 1 {
                        max = val + 1;
                    } max = val + 1 max val + 1 val 1 for (String key : map.keySet()) {
                if (map.get(key) == max) {
                    out.println(key);
                }
            } String key map.keySet() map.keySet map {
                if (map.get(key) == max) {
                    out.println(key);
                }
            } {
                if (map.get(key) == max) {
                    out.println(key);
                }
            } if (map.get(key) == max) {
                    out.println(key);
                } map.get(key) == max map.get(key) map.get map key max {
                    out.println(key);
                } out.println(key) out.println out key Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }

    static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            Map<String, Integer> map = new TreeMap<>();
            int max = 0;
            for (int i = 0; i < N; i++) {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            }
            for (String key : map.keySet()) {
                if (map.get(key) == max) {
                    out.println(key);
                }
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }

    static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            Map<String, Integer> map = new TreeMap<>();
            int max = 0;
            for (int i = 0; i < N; i++) {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            }
            for (String key : map.keySet()) {
                if (map.get(key) == max) {
                    out.println(key);
                }
            }
        }
    }
} Main
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }

    static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            Map<String, Integer> map = new TreeMap<>();
            int max = 0;
            for (int i = 0; i < N; i++) {
                String S = in.next();
                Integer val = map.get(S);
                if (val == null) {
                    map.put(S, 1);
                    if (max <= 1) {
                        max = 1;
                    }
                }
                else {
                    map.put(S, val + 1);
                    if (max <= val + 1) {
                        max = val + 1;
                    }
                }
            }
            for (String key : map.keySet()) {
                if (map.get(key) == max) {
                    out.println(key);
                }
            }
        }
    }
}