import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    Map<String,Integer> map = new TreeMap<String,Integer>();
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
    }
    
    //解答処理
    private List<String> solve() {
    	int max = 0;
        List<String> answer = new ArrayList<String>();
        
        for (int i=0; i<N; i++) {
        	String S = sc.next();
        	//キーが既にある場合は値を増やして上書き
        	if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	}
        }
        
        //最大値の算出
        for (String S : map.keySet()) {
        	max = Math.max(max, map.get(S));
        }
        
        //最大回数のキーをリストに格納
        for (String S : map.keySet()) {
        	if (max == map.get(S)) {
        		answer.add(S);
        	}
        }
        
        return answer;
    }
    
    //出力
    public void show(List<String> answer) {
        for (int i=0; i<answer.size(); i++) {
        	System.out.println(answer.get(i));
        }
    }

} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    Map<String,Integer> map = new TreeMap<String,Integer>();
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
    }
    
    //解答処理
    private List<String> solve() {
    	int max = 0;
        List<String> answer = new ArrayList<String>();
        
        for (int i=0; i<N; i++) {
        	String S = sc.next();
        	//キーが既にある場合は値を増やして上書き
        	if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	}
        }
        
        //最大値の算出
        for (String S : map.keySet()) {
        	max = Math.max(max, map.get(S));
        }
        
        //最大回数のキーをリストに格納
        for (String S : map.keySet()) {
        	if (max == map.get(S)) {
        		answer.add(S);
        	}
        }
        
        return answer;
    }
    
    //出力
    public void show(List<String> answer) {
        for (int i=0; i<answer.size(); i++) {
        	System.out.println(answer.get(i));
        }
    }

} Main //フィールド
    Scanner sc; sc int N; N Map<String,Integer> map = new TreeMap<String,Integer>(); map new TreeMap<String,Integer>() public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Main m = new Main(sc); m new Main(sc) m.show(m.solve()) m.show m m.solve() m.solve m sc.close() sc.close sc String[] args args //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
    } Main {
        this.sc = sc;
        this.N = sc.nextInt();
    } this.sc = sc this.sc this this.sc sc this.N = sc.nextInt() this.N this this.N sc.nextInt() sc.nextInt sc Scanner sc sc //解答処理
    private List<String> solve() {
    	int max = 0;
        List<String> answer = new ArrayList<String>();
        
        for (int i=0; i<N; i++) {
        	String S = sc.next();
        	//キーが既にある場合は値を増やして上書き
        	if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	}
        }
        
        //最大値の算出
        for (String S : map.keySet()) {
        	max = Math.max(max, map.get(S));
        }
        
        //最大回数のキーをリストに格納
        for (String S : map.keySet()) {
        	if (max == map.get(S)) {
        		answer.add(S);
        	}
        }
        
        return answer;
    } solve {
    	int max = 0;
        List<String> answer = new ArrayList<String>();
        
        for (int i=0; i<N; i++) {
        	String S = sc.next();
        	//キーが既にある場合は値を増やして上書き
        	if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	}
        }
        
        //最大値の算出
        for (String S : map.keySet()) {
        	max = Math.max(max, map.get(S));
        }
        
        //最大回数のキーをリストに格納
        for (String S : map.keySet()) {
        	if (max == map.get(S)) {
        		answer.add(S);
        	}
        }
        
        return answer;
    } int max = 0; max 0 List<String> answer = new ArrayList<String>(); answer new ArrayList<String>() for (int i=0; i<N; i++) {
        	String S = sc.next();
        	//キーが既にある場合は値を増やして上書き
        	if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	}
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
        	String S = sc.next();
        	//キーが既にある場合は値を増やして上書き
        	if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	}
        } {
        	String S = sc.next();
        	//キーが既にある場合は値を増やして上書き
        	if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	}
        } String S = sc.next(); S sc.next() sc.next sc if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	} map.containsKey(S) map.containsKey map S {
        		map.put(S, map.get(S)+1);
        	} map.put(S, map.get(S)+1) map.put map S map.get(S)+1 map.get(S) map.get map S 1 {
        		map.put(S, 1);
        	} map.put(S, 1) map.put map S 1 for (String S : map.keySet()) {
        	max = Math.max(max, map.get(S));
        } String S map.keySet() map.keySet map {
        	max = Math.max(max, map.get(S));
        } {
        	max = Math.max(max, map.get(S));
        } max = Math.max(max, map.get(S)) max Math.max(max, map.get(S)) Math.max Math max map.get(S) map.get map S for (String S : map.keySet()) {
        	if (max == map.get(S)) {
        		answer.add(S);
        	}
        } String S map.keySet() map.keySet map {
        	if (max == map.get(S)) {
        		answer.add(S);
        	}
        } {
        	if (max == map.get(S)) {
        		answer.add(S);
        	}
        } if (max == map.get(S)) {
        		answer.add(S);
        	} max == map.get(S) max map.get(S) map.get map S {
        		answer.add(S);
        	} answer.add(S) answer.add answer S return answer; answer //出力
    public void show(List<String> answer) {
        for (int i=0; i<answer.size(); i++) {
        	System.out.println(answer.get(i));
        }
    } show {
        for (int i=0; i<answer.size(); i++) {
        	System.out.println(answer.get(i));
        }
    } for (int i=0; i<answer.size(); i++) {
        	System.out.println(answer.get(i));
        } int i=0; int i=0; i 0 i<answer.size() i answer.size() answer.size answer i++ i++ i {
        	System.out.println(answer.get(i));
        } {
        	System.out.println(answer.get(i));
        } System.out.println(answer.get(i)) System.out.println System.out System System.out answer.get(i) answer.get answer i List<String> answer answer public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    Map<String,Integer> map = new TreeMap<String,Integer>();
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
    }
    
    //解答処理
    private List<String> solve() {
    	int max = 0;
        List<String> answer = new ArrayList<String>();
        
        for (int i=0; i<N; i++) {
        	String S = sc.next();
        	//キーが既にある場合は値を増やして上書き
        	if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	}
        }
        
        //最大値の算出
        for (String S : map.keySet()) {
        	max = Math.max(max, map.get(S));
        }
        
        //最大回数のキーをリストに格納
        for (String S : map.keySet()) {
        	if (max == map.get(S)) {
        		answer.add(S);
        	}
        }
        
        return answer;
    }
    
    //出力
    public void show(List<String> answer) {
        for (int i=0; i<answer.size(); i++) {
        	System.out.println(answer.get(i));
        }
    }

} public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    Map<String,Integer> map = new TreeMap<String,Integer>();
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
    }
    
    //解答処理
    private List<String> solve() {
    	int max = 0;
        List<String> answer = new ArrayList<String>();
        
        for (int i=0; i<N; i++) {
        	String S = sc.next();
        	//キーが既にある場合は値を増やして上書き
        	if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	}
        }
        
        //最大値の算出
        for (String S : map.keySet()) {
        	max = Math.max(max, map.get(S));
        }
        
        //最大回数のキーをリストに格納
        for (String S : map.keySet()) {
        	if (max == map.get(S)) {
        		answer.add(S);
        	}
        }
        
        return answer;
    }
    
    //出力
    public void show(List<String> answer) {
        for (int i=0; i<answer.size(); i++) {
        	System.out.println(answer.get(i));
        }
    }

} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    Map<String,Integer> map = new TreeMap<String,Integer>();
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
    }
    
    //解答処理
    private List<String> solve() {
    	int max = 0;
        List<String> answer = new ArrayList<String>();
        
        for (int i=0; i<N; i++) {
        	String S = sc.next();
        	//キーが既にある場合は値を増やして上書き
        	if (map.containsKey(S)) {
        		map.put(S, map.get(S)+1);
        	} else {
        		map.put(S, 1);
        	}
        }
        
        //最大値の算出
        for (String S : map.keySet()) {
        	max = Math.max(max, map.get(S));
        }
        
        //最大回数のキーをリストに格納
        for (String S : map.keySet()) {
        	if (max == map.get(S)) {
        		answer.add(S);
        	}
        }
        
        return answer;
    }
    
    //出力
    public void show(List<String> answer) {
        for (int i=0; i<answer.size(); i++) {
        	System.out.println(answer.get(i));
        }
    }

}
