import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		HashMap<String,Integer> x=new HashMap<>();
		int n=sc.nextInt();
		String[] z=new String[n];
		int max=1;
		for(int i=0;i<n;i++) {
			z[i]=sc.next();
		}
		Arrays.sort(z);
		for(int i=0;i<n;i++) {
			if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1);
		}
		for(int i=0;i<n;i++) {
			if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			}
		}
		pw.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		HashMap<String,Integer> x=new HashMap<>();
		int n=sc.nextInt();
		String[] z=new String[n];
		int max=1;
		for(int i=0;i<n;i++) {
			z[i]=sc.next();
		}
		Arrays.sort(z);
		for(int i=0;i<n;i++) {
			if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1);
		}
		for(int i=0;i<n;i++) {
			if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			}
		}
		pw.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		HashMap<String,Integer> x=new HashMap<>();
		int n=sc.nextInt();
		String[] z=new String[n];
		int max=1;
		for(int i=0;i<n;i++) {
			z[i]=sc.next();
		}
		Arrays.sort(z);
		for(int i=0;i<n;i++) {
			if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1);
		}
		for(int i=0;i<n;i++) {
			if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			}
		}
		pw.close();
	} main {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		HashMap<String,Integer> x=new HashMap<>();
		int n=sc.nextInt();
		String[] z=new String[n];
		int max=1;
		for(int i=0;i<n;i++) {
			z[i]=sc.next();
		}
		Arrays.sort(z);
		for(int i=0;i<n;i++) {
			if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1);
		}
		for(int i=0;i<n;i++) {
			if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			}
		}
		pw.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) HashMap<String,Integer> x=new HashMap<>(); x new HashMap<>() int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] z=new String[n]; z new String[n] n int max=1; max 1 for(int i=0;i<n;i++) {
			z[i]=sc.next();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			z[i]=sc.next();
		} {
			z[i]=sc.next();
		} z[i]=sc.next() z[i] z i sc.next() sc.next sc Arrays.sort(z) Arrays.sort Arrays z for(int i=0;i<n;i++) {
			if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1);
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1);
		} {
			if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1);
		} if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1); x.containsKey(z[i]) x.containsKey x z[i] z i {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			} x.put(z[i], x.get(z[i])+1) x.put x z[i] z i x.get(z[i])+1 x.get(z[i]) x.get x z[i] z i 1 max=Math.max(max, x.get(z[i])) max Math.max(max, x.get(z[i])) Math.max Math max x.get(z[i]) x.get x z[i] z i x.put(z[i], 1) x.put x z[i] z i 1 for(int i=0;i<n;i++) {
			if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			}
		} {
			if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			}
		} if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			} x.get(z[i])==max x.get(z[i]) x.get x z[i] z i max {
				pw.println(z[i]);
				x.put(z[i], -1);
			} pw.println(z[i]) pw.println pw z[i] z i x.put(z[i], -1) x.put x z[i] z i -1 1 pw.close() pw.close pw String[] args args static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	} Scanner StringTokenizer st; st BufferedReader br; br public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		} Scanner {
			br = new BufferedReader(new InputStreamReader(s));
		} br = new BufferedReader(new InputStreamReader(s)) br new BufferedReader(new InputStreamReader(s)) InputStream s s public Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		} Scanner {
			br = new BufferedReader(new FileReader(file));
		} br = new BufferedReader(new FileReader(file)) br new BufferedReader(new FileReader(file)) String file file public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		} next {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		} while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() throws IOException {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws IOException {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public String nextLine() throws IOException {
			return br.readLine();
		} nextLine {
			return br.readLine();
		} return br.readLine(); br.readLine() br.readLine br public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		} nextDouble {
			return Double.parseDouble(next());
		} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public boolean ready() throws IOException {
			return br.ready();
		} ready {
			return br.ready();
		} return br.ready(); br.ready() br.ready br public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		HashMap<String,Integer> x=new HashMap<>();
		int n=sc.nextInt();
		String[] z=new String[n];
		int max=1;
		for(int i=0;i<n;i++) {
			z[i]=sc.next();
		}
		Arrays.sort(z);
		for(int i=0;i<n;i++) {
			if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1);
		}
		for(int i=0;i<n;i++) {
			if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			}
		}
		pw.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		HashMap<String,Integer> x=new HashMap<>();
		int n=sc.nextInt();
		String[] z=new String[n];
		int max=1;
		for(int i=0;i<n;i++) {
			z[i]=sc.next();
		}
		Arrays.sort(z);
		for(int i=0;i<n;i++) {
			if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1);
		}
		for(int i=0;i<n;i++) {
			if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			}
		}
		pw.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
} Main
import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		HashMap<String,Integer> x=new HashMap<>();
		int n=sc.nextInt();
		String[] z=new String[n];
		int max=1;
		for(int i=0;i<n;i++) {
			z[i]=sc.next();
		}
		Arrays.sort(z);
		for(int i=0;i<n;i++) {
			if(x.containsKey(z[i])) {
				x.put(z[i], x.get(z[i])+1);
				max=Math.max(max, x.get(z[i]));
			}
			else
				x.put(z[i], 1);
		}
		for(int i=0;i<n;i++) {
			if(x.get(z[i])==max) {
				pw.println(z[i]);
				x.put(z[i], -1);
			}
		}
		pw.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}