import java.util.*;
import java.util.Map.Entry;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		Map<String, Integer> map = new TreeMap<String, Integer>();
		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 max = 0;
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote>max)
				max = vote;
		}
		
		StringBuilder ans = new StringBuilder();
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote==max)
				ans.append(key+"\n");
		}
		
		System.out.print(ans);
	}
} import java.util.*; util.* java import java.util.Map.Entry; Entry java.util.Map public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		Map<String, Integer> map = new TreeMap<String, Integer>();
		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 max = 0;
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote>max)
				max = vote;
		}
		
		StringBuilder ans = new StringBuilder();
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote==max)
				ans.append(key+"\n");
		}
		
		System.out.print(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		Map<String, Integer> map = new TreeMap<String, Integer>();
		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 max = 0;
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote>max)
				max = vote;
		}
		
		StringBuilder ans = new StringBuilder();
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote==max)
				ans.append(key+"\n");
		}
		
		System.out.print(ans);
	} main {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		Map<String, Integer> map = new TreeMap<String, Integer>();
		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 max = 0;
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote>max)
				max = vote;
		}
		
		StringBuilder ans = new StringBuilder();
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote==max)
				ans.append(key+"\n");
		}
		
		System.out.print(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Map<String, Integer> map = new TreeMap<String, Integer>(); map new TreeMap<String, Integer>() 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 map s map.get(s)+1 map.get(s) map.get map s 1 map.put(s, 1) map.put map s 1 int max = 0; max 0 for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote>max)
				max = vote;
		} Entry<String, Integer> e map.entrySet() map.entrySet map {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote>max)
				max = vote;
		} {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote>max)
				max = vote;
		} String key = e.getKey(); key e.getKey() e.getKey e int vote = e.getValue(); vote e.getValue() e.getValue e if(vote>max)
				max = vote; vote>max vote max max = vote max vote StringBuilder ans = new StringBuilder(); ans new StringBuilder() for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote==max)
				ans.append(key+"\n");
		} Entry<String, Integer> e map.entrySet() map.entrySet map {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote==max)
				ans.append(key+"\n");
		} {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote==max)
				ans.append(key+"\n");
		} String key = e.getKey(); key e.getKey() e.getKey e int vote = e.getValue(); vote e.getValue() e.getValue e if(vote==max)
				ans.append(key+"\n"); vote==max vote max ans.append(key+"\n") ans.append ans key+"\n" key "\n" System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		Map<String, Integer> map = new TreeMap<String, Integer>();
		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 max = 0;
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote>max)
				max = vote;
		}
		
		StringBuilder ans = new StringBuilder();
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote==max)
				ans.append(key+"\n");
		}
		
		System.out.print(ans);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		Map<String, Integer> map = new TreeMap<String, Integer>();
		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 max = 0;
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote>max)
				max = vote;
		}
		
		StringBuilder ans = new StringBuilder();
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote==max)
				ans.append(key+"\n");
		}
		
		System.out.print(ans);
	}
} Main
import java.util.*;
import java.util.Map.Entry;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		Map<String, Integer> map = new TreeMap<String, Integer>();
		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 max = 0;
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote>max)
				max = vote;
		}
		
		StringBuilder ans = new StringBuilder();
		for(Entry<String, Integer> e: map.entrySet()) {
			String key = e.getKey();
			int vote = e.getValue();
			if(vote==max)
				ans.append(key+"\n");
		}
		
		System.out.print(ans);
	}
}