import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int [] in = new int [a];
        String [] str = new String [a];
        for(int i=0;i<a;i++){str[i] = sc.next();
                            }
        Arrays.sort(str);
        int b = 0;
        int c = 1;
        for(int i=0;i<a;i++){if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;}
                            }
        for(int i=0;i<a;i++){if(in[i]==c){System.out.println(str[i]);}
                              }
		
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int [] in = new int [a];
        String [] str = new String [a];
        for(int i=0;i<a;i++){str[i] = sc.next();
                            }
        Arrays.sort(str);
        int b = 0;
        int c = 1;
        for(int i=0;i<a;i++){if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;}
                            }
        for(int i=0;i<a;i++){if(in[i]==c){System.out.println(str[i]);}
                              }
		
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int [] in = new int [a];
        String [] str = new String [a];
        for(int i=0;i<a;i++){str[i] = sc.next();
                            }
        Arrays.sort(str);
        int b = 0;
        int c = 1;
        for(int i=0;i<a;i++){if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;}
                            }
        for(int i=0;i<a;i++){if(in[i]==c){System.out.println(str[i]);}
                              }
		
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int [] in = new int [a];
        String [] str = new String [a];
        for(int i=0;i<a;i++){str[i] = sc.next();
                            }
        Arrays.sort(str);
        int b = 0;
        int c = 1;
        for(int i=0;i<a;i++){if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;}
                            }
        for(int i=0;i<a;i++){if(in[i]==c){System.out.println(str[i]);}
                              }
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int [] in = new int [a]; in new int [a] a String [] str = new String [a]; str new String [a] a for(int i=0;i<a;i++){str[i] = sc.next();
                            } int i=0; int i=0; i 0 i<a i a i++ i++ i {str[i] = sc.next();
                            } {str[i] = sc.next();
                            } str[i] = sc.next() str[i] str i sc.next() sc.next sc Arrays.sort(str) Arrays.sort Arrays str int b = 0; b 0 int c = 1; c 1 for(int i=0;i<a;i++){if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;}
                            } int i=0; int i=0; i 0 i<a i a i++ i++ i {if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;}
                            } {if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;}
                            } if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;} i>=1 && str[i].equals(str[i-1]) i>=1 i 1 str[i].equals(str[i-1]) str[i].equals str[i] str i str[i-1] str i-1 i 1 {in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                } in[b]++ in[b] in b if(in[b]>c){c = in[b];} in[b]>c in[b] in b c {c = in[b];} c = in[b] c in[b] in b {b=i;in[i]++;} b=i b i in[i]++ in[i] in i for(int i=0;i<a;i++){if(in[i]==c){System.out.println(str[i]);}
                              } int i=0; int i=0; i 0 i<a i a i++ i++ i {if(in[i]==c){System.out.println(str[i]);}
                              } {if(in[i]==c){System.out.println(str[i]);}
                              } if(in[i]==c){System.out.println(str[i]);} in[i]==c in[i] in i c {System.out.println(str[i]);} System.out.println(str[i]) System.out.println System.out System System.out str[i] str i String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int [] in = new int [a];
        String [] str = new String [a];
        for(int i=0;i<a;i++){str[i] = sc.next();
                            }
        Arrays.sort(str);
        int b = 0;
        int c = 1;
        for(int i=0;i<a;i++){if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;}
                            }
        for(int i=0;i<a;i++){if(in[i]==c){System.out.println(str[i]);}
                              }
		
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int [] in = new int [a];
        String [] str = new String [a];
        for(int i=0;i<a;i++){str[i] = sc.next();
                            }
        Arrays.sort(str);
        int b = 0;
        int c = 1;
        for(int i=0;i<a;i++){if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;}
                            }
        for(int i=0;i<a;i++){if(in[i]==c){System.out.println(str[i]);}
                              }
		
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int [] in = new int [a];
        String [] str = new String [a];
        for(int i=0;i<a;i++){str[i] = sc.next();
                            }
        Arrays.sort(str);
        int b = 0;
        int c = 1;
        for(int i=0;i<a;i++){if(i>=1 && str[i].equals(str[i-1])){in[b]++;if(in[b]>c){c = in[b];}
                                                 
                                                                }else{b=i;in[i]++;}
                            }
        for(int i=0;i<a;i++){if(in[i]==c){System.out.println(str[i]);}
                              }
		
	}
}
