import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s[]=new String[n];
		int cnt[]=new int[n];
		String scheck[]=new String[n];
		for(int i=0;i<n;i++) {
			s[i]=scan.next();
			cnt[i]=0;
			scheck[i]="";
		}
		scan.close();
		Arrays.sort(s);
		int suffix=0;
		int max=0;
		for(int i=0;i<n;i++) {
			if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			}if(i==n-1)scheck[suffix]=s[i];

			if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i];
			cnt[suffix]+=1;
			if(max<cnt[suffix])max=cnt[suffix];
		}
		for(int i=0;i<=suffix;i++) {
			if(cnt[i]==max)System.out.println(scheck[i]);
		}
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s[]=new String[n];
		int cnt[]=new int[n];
		String scheck[]=new String[n];
		for(int i=0;i<n;i++) {
			s[i]=scan.next();
			cnt[i]=0;
			scheck[i]="";
		}
		scan.close();
		Arrays.sort(s);
		int suffix=0;
		int max=0;
		for(int i=0;i<n;i++) {
			if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			}if(i==n-1)scheck[suffix]=s[i];

			if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i];
			cnt[suffix]+=1;
			if(max<cnt[suffix])max=cnt[suffix];
		}
		for(int i=0;i<=suffix;i++) {
			if(cnt[i]==max)System.out.println(scheck[i]);
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s[]=new String[n];
		int cnt[]=new int[n];
		String scheck[]=new String[n];
		for(int i=0;i<n;i++) {
			s[i]=scan.next();
			cnt[i]=0;
			scheck[i]="";
		}
		scan.close();
		Arrays.sort(s);
		int suffix=0;
		int max=0;
		for(int i=0;i<n;i++) {
			if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			}if(i==n-1)scheck[suffix]=s[i];

			if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i];
			cnt[suffix]+=1;
			if(max<cnt[suffix])max=cnt[suffix];
		}
		for(int i=0;i<=suffix;i++) {
			if(cnt[i]==max)System.out.println(scheck[i]);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s[]=new String[n];
		int cnt[]=new int[n];
		String scheck[]=new String[n];
		for(int i=0;i<n;i++) {
			s[i]=scan.next();
			cnt[i]=0;
			scheck[i]="";
		}
		scan.close();
		Arrays.sort(s);
		int suffix=0;
		int max=0;
		for(int i=0;i<n;i++) {
			if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			}if(i==n-1)scheck[suffix]=s[i];

			if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i];
			cnt[suffix]+=1;
			if(max<cnt[suffix])max=cnt[suffix];
		}
		for(int i=0;i<=suffix;i++) {
			if(cnt[i]==max)System.out.println(scheck[i]);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan String s[]=new String[n]; s new String[n] n int cnt[]=new int[n]; cnt new int[n] n String scheck[]=new String[n]; scheck new String[n] n for(int i=0;i<n;i++) {
			s[i]=scan.next();
			cnt[i]=0;
			scheck[i]="";
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			s[i]=scan.next();
			cnt[i]=0;
			scheck[i]="";
		} {
			s[i]=scan.next();
			cnt[i]=0;
			scheck[i]="";
		} s[i]=scan.next() s[i] s i scan.next() scan.next scan cnt[i]=0 cnt[i] cnt i 0 scheck[i]="" scheck[i] scheck i "" scan.close() scan.close scan Arrays.sort(s) Arrays.sort Arrays s int suffix=0; suffix 0 int max=0; max 0 for(int i=0;i<n;i++) {
			if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			}if(i==n-1)scheck[suffix]=s[i];

			if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i];
			cnt[suffix]+=1;
			if(max<cnt[suffix])max=cnt[suffix];
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			}if(i==n-1)scheck[suffix]=s[i];

			if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i];
			cnt[suffix]+=1;
			if(max<cnt[suffix])max=cnt[suffix];
		} {
			if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			}if(i==n-1)scheck[suffix]=s[i];

			if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i];
			cnt[suffix]+=1;
			if(max<cnt[suffix])max=cnt[suffix];
		} if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			} i!=0&&s[i].equals(s[i-1])==false i!=0 i 0 s[i].equals(s[i-1])==false s[i].equals(s[i-1]) s[i].equals s[i] s i s[i-1] s i-1 i 1 false {
				scheck[suffix]=s[i-1];
				suffix+=1;
			} scheck[suffix]=s[i-1] scheck[suffix] scheck suffix s[i-1] s i-1 i 1 suffix+=1 suffix 1 if(i==n-1)scheck[suffix]=s[i]; i==n-1 i n-1 n 1 scheck[suffix]=s[i] scheck[suffix] scheck suffix s[i] s i if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i]; i==n-1 && s[i].equals(s[i-1])==false i==n-1 i n-1 n 1 s[i].equals(s[i-1])==false s[i].equals(s[i-1]) s[i].equals s[i] s i s[i-1] s i-1 i 1 false scheck[suffix]=s[i] scheck[suffix] scheck suffix s[i] s i cnt[suffix]+=1 cnt[suffix] cnt suffix 1 if(max<cnt[suffix])max=cnt[suffix]; max<cnt[suffix] max cnt[suffix] cnt suffix max=cnt[suffix] max cnt[suffix] cnt suffix for(int i=0;i<=suffix;i++) {
			if(cnt[i]==max)System.out.println(scheck[i]);
		} int i=0; int i=0; i 0 i<=suffix i suffix i++ i++ i {
			if(cnt[i]==max)System.out.println(scheck[i]);
		} {
			if(cnt[i]==max)System.out.println(scheck[i]);
		} if(cnt[i]==max)System.out.println(scheck[i]); cnt[i]==max cnt[i] cnt i max System.out.println(scheck[i]) System.out.println System.out System System.out scheck[i] scheck i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s[]=new String[n];
		int cnt[]=new int[n];
		String scheck[]=new String[n];
		for(int i=0;i<n;i++) {
			s[i]=scan.next();
			cnt[i]=0;
			scheck[i]="";
		}
		scan.close();
		Arrays.sort(s);
		int suffix=0;
		int max=0;
		for(int i=0;i<n;i++) {
			if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			}if(i==n-1)scheck[suffix]=s[i];

			if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i];
			cnt[suffix]+=1;
			if(max<cnt[suffix])max=cnt[suffix];
		}
		for(int i=0;i<=suffix;i++) {
			if(cnt[i]==max)System.out.println(scheck[i]);
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s[]=new String[n];
		int cnt[]=new int[n];
		String scheck[]=new String[n];
		for(int i=0;i<n;i++) {
			s[i]=scan.next();
			cnt[i]=0;
			scheck[i]="";
		}
		scan.close();
		Arrays.sort(s);
		int suffix=0;
		int max=0;
		for(int i=0;i<n;i++) {
			if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			}if(i==n-1)scheck[suffix]=s[i];

			if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i];
			cnt[suffix]+=1;
			if(max<cnt[suffix])max=cnt[suffix];
		}
		for(int i=0;i<=suffix;i++) {
			if(cnt[i]==max)System.out.println(scheck[i]);
		}
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s[]=new String[n];
		int cnt[]=new int[n];
		String scheck[]=new String[n];
		for(int i=0;i<n;i++) {
			s[i]=scan.next();
			cnt[i]=0;
			scheck[i]="";
		}
		scan.close();
		Arrays.sort(s);
		int suffix=0;
		int max=0;
		for(int i=0;i<n;i++) {
			if(i!=0&&s[i].equals(s[i-1])==false) {
				scheck[suffix]=s[i-1];
				suffix+=1;
			}if(i==n-1)scheck[suffix]=s[i];

			if(i==n-1 && s[i].equals(s[i-1])==false)scheck[suffix]=s[i];
			cnt[suffix]+=1;
			if(max<cnt[suffix])max=cnt[suffix];
		}
		for(int i=0;i<=suffix;i++) {
			if(cnt[i]==max)System.out.println(scheck[i]);
		}
	}
}