import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int max=0;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==max) System.out.println(s[i]);
        }
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int max=0;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==max) System.out.println(s[i]);
        }
	}
} Main public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int max=0;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==max) System.out.println(s[i]);
        }
	} main {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int max=0;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==max) System.out.println(s[i]);
        }
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int n = scn.nextInt(); n scn.nextInt() scn.nextInt scn String[] s = new String[n]; s new String[n] n int[] count = new int[n]; count new int[n] n for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		} int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
			s[i] = scn.next();
          	count[i] = 0;
		} {
			s[i] = scn.next();
          	count[i] = 0;
		} s[i] = scn.next() s[i] s i scn.next() scn.next scn count[i] = 0 count[i] count i 0 Arrays.sort(s) Arrays.sort Arrays s int max=0; max 0 for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        } int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        } {
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        } for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            } int j=i+1; int j=i+1; j i+1 i 1 j<n j n j++ j++ j {
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            } {
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            } if(s[i].equals(s[j])) count[i]++;
              	else break; s[i].equals(s[j]) s[i].equals s[i] s i s[j] s j count[i]++ count[i] count i break; max = Math.max(max,count[i]) max Math.max(max,count[i]) Math.max Math max count[i] count i i+=count[i] i count[i] count i for(int i=0; i<s.length; i++){
        	if(count[i]==max) System.out.println(s[i]);
        } int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
        	if(count[i]==max) System.out.println(s[i]);
        } {
        	if(count[i]==max) System.out.println(s[i]);
        } if(count[i]==max) System.out.println(s[i]); count[i]==max count[i] count i max 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) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int max=0;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==max) System.out.println(s[i]);
        }
	}
} public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int max=0;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==max) System.out.println(s[i]);
        }
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int max=0;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else break;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==max) System.out.println(s[i]);
        }
	}
}
