import java.util.Scanner;
import java.util.TreeMap;

public class Main {
	public static void maxNoOfString(TreeMap<String, Integer> trr, Object[] keys) {
		int max = trr.get(keys[0]);
		for (int count = 1; count < keys.length; count++) {
			if(trr.get(keys[count]) > max) max = trr.get(keys[count]);
		}
		getKey(trr, max);
	}
	
	public static void getKey(TreeMap<String, Integer> trr, Integer value) {
		for (String key : trr.keySet()) {
			if(value.equals(trr.get(key))) System.out.println(key);
		}
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt(); scan.nextLine();
		TreeMap<String, Integer> trr = new TreeMap<>();
		for (int count = 0; count < t; count++) {
			String str = scan.nextLine();
			if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1);
		}
		maxNoOfString(trr, trr.keySet().toArray());
		scan.close();
	}
} import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {
	public static void maxNoOfString(TreeMap<String, Integer> trr, Object[] keys) {
		int max = trr.get(keys[0]);
		for (int count = 1; count < keys.length; count++) {
			if(trr.get(keys[count]) > max) max = trr.get(keys[count]);
		}
		getKey(trr, max);
	}
	
	public static void getKey(TreeMap<String, Integer> trr, Integer value) {
		for (String key : trr.keySet()) {
			if(value.equals(trr.get(key))) System.out.println(key);
		}
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt(); scan.nextLine();
		TreeMap<String, Integer> trr = new TreeMap<>();
		for (int count = 0; count < t; count++) {
			String str = scan.nextLine();
			if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1);
		}
		maxNoOfString(trr, trr.keySet().toArray());
		scan.close();
	}
} Main public static void maxNoOfString(TreeMap<String, Integer> trr, Object[] keys) {
		int max = trr.get(keys[0]);
		for (int count = 1; count < keys.length; count++) {
			if(trr.get(keys[count]) > max) max = trr.get(keys[count]);
		}
		getKey(trr, max);
	} maxNoOfString {
		int max = trr.get(keys[0]);
		for (int count = 1; count < keys.length; count++) {
			if(trr.get(keys[count]) > max) max = trr.get(keys[count]);
		}
		getKey(trr, max);
	} int max = trr.get(keys[0]); max trr.get(keys[0]) trr.get trr keys[0] keys 0 for (int count = 1; count < keys.length; count++) {
			if(trr.get(keys[count]) > max) max = trr.get(keys[count]);
		} int count = 1; int count = 1; count 1 count < keys.length count keys.length keys keys.length count++ count++ count {
			if(trr.get(keys[count]) > max) max = trr.get(keys[count]);
		} {
			if(trr.get(keys[count]) > max) max = trr.get(keys[count]);
		} if(trr.get(keys[count]) > max) max = trr.get(keys[count]); trr.get(keys[count]) > max trr.get(keys[count]) trr.get trr keys[count] keys count max max = trr.get(keys[count]) max trr.get(keys[count]) trr.get trr keys[count] keys count getKey(trr, max) getKey trr max TreeMap<String, Integer> trr trr Object[] keys keys public static void getKey(TreeMap<String, Integer> trr, Integer value) {
		for (String key : trr.keySet()) {
			if(value.equals(trr.get(key))) System.out.println(key);
		}
	} getKey {
		for (String key : trr.keySet()) {
			if(value.equals(trr.get(key))) System.out.println(key);
		}
	} for (String key : trr.keySet()) {
			if(value.equals(trr.get(key))) System.out.println(key);
		} String key trr.keySet() trr.keySet trr {
			if(value.equals(trr.get(key))) System.out.println(key);
		} {
			if(value.equals(trr.get(key))) System.out.println(key);
		} if(value.equals(trr.get(key))) System.out.println(key); value.equals(trr.get(key)) value.equals value trr.get(key) trr.get trr key System.out.println(key) System.out.println System.out System System.out key TreeMap<String, Integer> trr trr Integer value value public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt(); scan.nextLine();
		TreeMap<String, Integer> trr = new TreeMap<>();
		for (int count = 0; count < t; count++) {
			String str = scan.nextLine();
			if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1);
		}
		maxNoOfString(trr, trr.keySet().toArray());
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt(); scan.nextLine();
		TreeMap<String, Integer> trr = new TreeMap<>();
		for (int count = 0; count < t; count++) {
			String str = scan.nextLine();
			if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1);
		}
		maxNoOfString(trr, trr.keySet().toArray());
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int t = scan.nextInt(); t scan.nextInt() scan.nextInt scan scan.nextLine() scan.nextLine scan TreeMap<String, Integer> trr = new TreeMap<>(); trr new TreeMap<>() for (int count = 0; count < t; count++) {
			String str = scan.nextLine();
			if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1);
		} int count = 0; int count = 0; count 0 count < t count t count++ count++ count {
			String str = scan.nextLine();
			if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1);
		} {
			String str = scan.nextLine();
			if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1);
		} String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1); trr.containsKey(str) trr.containsKey trr str trr.put(str, trr.get(str) + 1) trr.put trr str trr.get(str) + 1 trr.get(str) trr.get trr str 1 trr.put(str, 1) trr.put trr str 1 maxNoOfString(trr, trr.keySet().toArray()) maxNoOfString trr trr.keySet().toArray() trr.keySet().toArray trr.keySet() trr.keySet trr scan.close() scan.close scan String[] args args public class Main {
	public static void maxNoOfString(TreeMap<String, Integer> trr, Object[] keys) {
		int max = trr.get(keys[0]);
		for (int count = 1; count < keys.length; count++) {
			if(trr.get(keys[count]) > max) max = trr.get(keys[count]);
		}
		getKey(trr, max);
	}
	
	public static void getKey(TreeMap<String, Integer> trr, Integer value) {
		for (String key : trr.keySet()) {
			if(value.equals(trr.get(key))) System.out.println(key);
		}
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt(); scan.nextLine();
		TreeMap<String, Integer> trr = new TreeMap<>();
		for (int count = 0; count < t; count++) {
			String str = scan.nextLine();
			if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1);
		}
		maxNoOfString(trr, trr.keySet().toArray());
		scan.close();
	}
} public class Main {
	public static void maxNoOfString(TreeMap<String, Integer> trr, Object[] keys) {
		int max = trr.get(keys[0]);
		for (int count = 1; count < keys.length; count++) {
			if(trr.get(keys[count]) > max) max = trr.get(keys[count]);
		}
		getKey(trr, max);
	}
	
	public static void getKey(TreeMap<String, Integer> trr, Integer value) {
		for (String key : trr.keySet()) {
			if(value.equals(trr.get(key))) System.out.println(key);
		}
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt(); scan.nextLine();
		TreeMap<String, Integer> trr = new TreeMap<>();
		for (int count = 0; count < t; count++) {
			String str = scan.nextLine();
			if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1);
		}
		maxNoOfString(trr, trr.keySet().toArray());
		scan.close();
	}
} Main
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
	public static void maxNoOfString(TreeMap<String, Integer> trr, Object[] keys) {
		int max = trr.get(keys[0]);
		for (int count = 1; count < keys.length; count++) {
			if(trr.get(keys[count]) > max) max = trr.get(keys[count]);
		}
		getKey(trr, max);
	}
	
	public static void getKey(TreeMap<String, Integer> trr, Integer value) {
		for (String key : trr.keySet()) {
			if(value.equals(trr.get(key))) System.out.println(key);
		}
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt(); scan.nextLine();
		TreeMap<String, Integer> trr = new TreeMap<>();
		for (int count = 0; count < t; count++) {
			String str = scan.nextLine();
			if(trr.containsKey(str)) trr.put(str, trr.get(str) + 1);
			else trr.put(str, 1);
		}
		maxNoOfString(trr, trr.keySet().toArray());
		scan.close();
	}
}