import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();

		String[] s = new String[n];
		for ( int i=0; i<n; i++ ) {
			s[i] = sc.next();
		}
		Arrays.sort(s);

		int t = 0;
		int[] a = new int[n];
		int g = 0;

		a[0] = 0;
		for ( int i=1; i<n; i++ ) {
			if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			}
			a[i] = t;
		}
		g = Math.max(g,t);

		for ( int i=0; i<n; i++ ) {
			if ( a[i] == g ) {
				System.out.println(s[i]);
			}
		}

	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();

		String[] s = new String[n];
		for ( int i=0; i<n; i++ ) {
			s[i] = sc.next();
		}
		Arrays.sort(s);

		int t = 0;
		int[] a = new int[n];
		int g = 0;

		a[0] = 0;
		for ( int i=1; i<n; i++ ) {
			if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			}
			a[i] = t;
		}
		g = Math.max(g,t);

		for ( int i=0; i<n; i++ ) {
			if ( a[i] == g ) {
				System.out.println(s[i]);
			}
		}

	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();

		String[] s = new String[n];
		for ( int i=0; i<n; i++ ) {
			s[i] = sc.next();
		}
		Arrays.sort(s);

		int t = 0;
		int[] a = new int[n];
		int g = 0;

		a[0] = 0;
		for ( int i=1; i<n; i++ ) {
			if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			}
			a[i] = t;
		}
		g = Math.max(g,t);

		for ( int i=0; i<n; i++ ) {
			if ( a[i] == g ) {
				System.out.println(s[i]);
			}
		}

	} main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();

		String[] s = new String[n];
		for ( int i=0; i<n; i++ ) {
			s[i] = sc.next();
		}
		Arrays.sort(s);

		int t = 0;
		int[] a = new int[n];
		int g = 0;

		a[0] = 0;
		for ( int i=1; i<n; i++ ) {
			if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			}
			a[i] = t;
		}
		g = Math.max(g,t);

		for ( int i=0; i<n; i++ ) {
			if ( a[i] == g ) {
				System.out.println(s[i]);
			}
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] s = new String[n]; s new String[n] n for ( int i=0; i<n; i++ ) {
			s[i] = sc.next();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			s[i] = sc.next();
		} {
			s[i] = sc.next();
		} s[i] = sc.next() s[i] s i sc.next() sc.next sc Arrays.sort(s) Arrays.sort Arrays s int t = 0; t 0 int[] a = new int[n]; a new int[n] n int g = 0; g 0 a[0] = 0 a[0] a 0 0 for ( int i=1; i<n; i++ ) {
			if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			}
			a[i] = t;
		} int i=1; int i=1; i 1 i<n i n i++ i++ i {
			if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			}
			a[i] = t;
		} {
			if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			}
			a[i] = t;
		} if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			} s[i].equals(s[i-1]) s[i].equals s[i] s i s[i-1] s i-1 i 1 {
				t++;
			} t++ t {
				g = Math.max(g,t);
				t = 0;
			} g = Math.max(g,t) g Math.max(g,t) Math.max Math g t t = 0 t 0 a[i] = t a[i] a i t g = Math.max(g,t) g Math.max(g,t) Math.max Math g t for ( int i=0; i<n; i++ ) {
			if ( a[i] == g ) {
				System.out.println(s[i]);
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if ( a[i] == g ) {
				System.out.println(s[i]);
			}
		} {
			if ( a[i] == g ) {
				System.out.println(s[i]);
			}
		} if ( a[i] == g ) {
				System.out.println(s[i]);
			} a[i] == g a[i] a i g {
				System.out.println(s[i]);
			} System.out.println(s[i]) System.out.println System.out System System.out s[i] s i String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();

		String[] s = new String[n];
		for ( int i=0; i<n; i++ ) {
			s[i] = sc.next();
		}
		Arrays.sort(s);

		int t = 0;
		int[] a = new int[n];
		int g = 0;

		a[0] = 0;
		for ( int i=1; i<n; i++ ) {
			if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			}
			a[i] = t;
		}
		g = Math.max(g,t);

		for ( int i=0; i<n; i++ ) {
			if ( a[i] == g ) {
				System.out.println(s[i]);
			}
		}

	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();

		String[] s = new String[n];
		for ( int i=0; i<n; i++ ) {
			s[i] = sc.next();
		}
		Arrays.sort(s);

		int t = 0;
		int[] a = new int[n];
		int g = 0;

		a[0] = 0;
		for ( int i=1; i<n; i++ ) {
			if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			}
			a[i] = t;
		}
		g = Math.max(g,t);

		for ( int i=0; i<n; i++ ) {
			if ( a[i] == g ) {
				System.out.println(s[i]);
			}
		}

	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();

		String[] s = new String[n];
		for ( int i=0; i<n; i++ ) {
			s[i] = sc.next();
		}
		Arrays.sort(s);

		int t = 0;
		int[] a = new int[n];
		int g = 0;

		a[0] = 0;
		for ( int i=1; i<n; i++ ) {
			if ( s[i].equals(s[i-1]) ) {
				t++;
			} else {
				g = Math.max(g,t);
				t = 0;
			}
			a[i] = t;
		}
		g = Math.max(g,t);

		for ( int i=0; i<n; i++ ) {
			if ( a[i] == g ) {
				System.out.println(s[i]);
			}
		}

	}
}