
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayList<String> ans = new ArrayList<String>();
		Map <String, Integer> hm = new HashMap<String,Integer>();
		
		int n = Integer.parseInt(sc.next());
		
		for(int i = 0; i < n ;i++) {
			String s = sc.next();
			if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			}
		}
		
		int max = 0; 
		for(String s : hm.keySet()) {
			max = Math.max(max,hm.get(s));
		}
		int num = 0;
		for(String s : hm.keySet()) {
			if(max == hm.get(s)) {
				ans.add(s);
				num++;
			}
		}
		Collections.sort(ans);
		
		for(int i = 0 ;i < num ;i++) {
			System.out.println(ans.get(i));
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayList<String> ans = new ArrayList<String>();
		Map <String, Integer> hm = new HashMap<String,Integer>();
		
		int n = Integer.parseInt(sc.next());
		
		for(int i = 0; i < n ;i++) {
			String s = sc.next();
			if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			}
		}
		
		int max = 0; 
		for(String s : hm.keySet()) {
			max = Math.max(max,hm.get(s));
		}
		int num = 0;
		for(String s : hm.keySet()) {
			if(max == hm.get(s)) {
				ans.add(s);
				num++;
			}
		}
		Collections.sort(ans);
		
		for(int i = 0 ;i < num ;i++) {
			System.out.println(ans.get(i));
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayList<String> ans = new ArrayList<String>();
		Map <String, Integer> hm = new HashMap<String,Integer>();
		
		int n = Integer.parseInt(sc.next());
		
		for(int i = 0; i < n ;i++) {
			String s = sc.next();
			if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			}
		}
		
		int max = 0; 
		for(String s : hm.keySet()) {
			max = Math.max(max,hm.get(s));
		}
		int num = 0;
		for(String s : hm.keySet()) {
			if(max == hm.get(s)) {
				ans.add(s);
				num++;
			}
		}
		Collections.sort(ans);
		
		for(int i = 0 ;i < num ;i++) {
			System.out.println(ans.get(i));
		}
	} main {
		Scanner sc = new Scanner(System.in);
		ArrayList<String> ans = new ArrayList<String>();
		Map <String, Integer> hm = new HashMap<String,Integer>();
		
		int n = Integer.parseInt(sc.next());
		
		for(int i = 0; i < n ;i++) {
			String s = sc.next();
			if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			}
		}
		
		int max = 0; 
		for(String s : hm.keySet()) {
			max = Math.max(max,hm.get(s));
		}
		int num = 0;
		for(String s : hm.keySet()) {
			if(max == hm.get(s)) {
				ans.add(s);
				num++;
			}
		}
		Collections.sort(ans);
		
		for(int i = 0 ;i < num ;i++) {
			System.out.println(ans.get(i));
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<String> ans = new ArrayList<String>(); ans new ArrayList<String>() Map <String, Integer> hm = new HashMap<String,Integer>(); hm new HashMap<String,Integer>() int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for(int i = 0; i < n ;i++) {
			String s = sc.next();
			if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String s = sc.next();
			if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			}
		} {
			String s = sc.next();
			if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			}
		} String s = sc.next(); s sc.next() sc.next sc if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			} !hm.containsKey(s) hm.containsKey(s) hm.containsKey hm s {
				hm.put(s, 1);
			} hm.put(s, 1) hm.put hm s 1 {
				hm.put(s,hm.get(s)+1);
			} hm.put(s,hm.get(s)+1) hm.put hm s hm.get(s)+1 hm.get(s) hm.get hm s 1 int max = 0; max 0 for(String s : hm.keySet()) {
			max = Math.max(max,hm.get(s));
		} String s hm.keySet() hm.keySet hm {
			max = Math.max(max,hm.get(s));
		} {
			max = Math.max(max,hm.get(s));
		} max = Math.max(max,hm.get(s)) max Math.max(max,hm.get(s)) Math.max Math max hm.get(s) hm.get hm s int num = 0; num 0 for(String s : hm.keySet()) {
			if(max == hm.get(s)) {
				ans.add(s);
				num++;
			}
		} String s hm.keySet() hm.keySet hm {
			if(max == hm.get(s)) {
				ans.add(s);
				num++;
			}
		} {
			if(max == hm.get(s)) {
				ans.add(s);
				num++;
			}
		} if(max == hm.get(s)) {
				ans.add(s);
				num++;
			} max == hm.get(s) max hm.get(s) hm.get hm s {
				ans.add(s);
				num++;
			} ans.add(s) ans.add ans s num++ num Collections.sort(ans) Collections.sort Collections ans for(int i = 0 ;i < num ;i++) {
			System.out.println(ans.get(i));
		} int i = 0 ; int i = 0 ; i 0 i < num i num i++ i++ i {
			System.out.println(ans.get(i));
		} {
			System.out.println(ans.get(i));
		} System.out.println(ans.get(i)) System.out.println System.out System System.out ans.get(i) ans.get ans i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayList<String> ans = new ArrayList<String>();
		Map <String, Integer> hm = new HashMap<String,Integer>();
		
		int n = Integer.parseInt(sc.next());
		
		for(int i = 0; i < n ;i++) {
			String s = sc.next();
			if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			}
		}
		
		int max = 0; 
		for(String s : hm.keySet()) {
			max = Math.max(max,hm.get(s));
		}
		int num = 0;
		for(String s : hm.keySet()) {
			if(max == hm.get(s)) {
				ans.add(s);
				num++;
			}
		}
		Collections.sort(ans);
		
		for(int i = 0 ;i < num ;i++) {
			System.out.println(ans.get(i));
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayList<String> ans = new ArrayList<String>();
		Map <String, Integer> hm = new HashMap<String,Integer>();
		
		int n = Integer.parseInt(sc.next());
		
		for(int i = 0; i < n ;i++) {
			String s = sc.next();
			if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			}
		}
		
		int max = 0; 
		for(String s : hm.keySet()) {
			max = Math.max(max,hm.get(s));
		}
		int num = 0;
		for(String s : hm.keySet()) {
			if(max == hm.get(s)) {
				ans.add(s);
				num++;
			}
		}
		Collections.sort(ans);
		
		for(int i = 0 ;i < num ;i++) {
			System.out.println(ans.get(i));
		}
	}
} Main

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayList<String> ans = new ArrayList<String>();
		Map <String, Integer> hm = new HashMap<String,Integer>();
		
		int n = Integer.parseInt(sc.next());
		
		for(int i = 0; i < n ;i++) {
			String s = sc.next();
			if(!hm.containsKey(s)) {
				hm.put(s, 1);
			}
			else {
				hm.put(s,hm.get(s)+1);
			}
		}
		
		int max = 0; 
		for(String s : hm.keySet()) {
			max = Math.max(max,hm.get(s));
		}
		int num = 0;
		for(String s : hm.keySet()) {
			if(max == hm.get(s)) {
				ans.add(s);
				num++;
			}
		}
		Collections.sort(ans);
		
		for(int i = 0 ;i < num ;i++) {
			System.out.println(ans.get(i));
		}
	}
}
