import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list=new ArrayList<String>();
		//int[] array = new int[1000000000*2];
		int n = sc.nextInt();
		for(int i=0;n>i;i++) {
			String a = sc.next();
			list.add(a);
		}
		Collections.sort(list);
		List<Integer> list_count=new ArrayList<Integer>();
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			list_count.add(count);
		}
		int max = Collections.max(list_count);
		List<String> list_answer=new ArrayList<String>();
		if(max==0) {
			for(int i=0;list.size()>i;i++) {
				System.out.println(list.get(i));
			}
			System.exit(0);
		}
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			if(count==max)
				list_answer.add(list.get(i));
		}
		for(int i=0;list_answer.size()>i;i++) {
			System.out.println(list_answer.get(i));
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list=new ArrayList<String>();
		//int[] array = new int[1000000000*2];
		int n = sc.nextInt();
		for(int i=0;n>i;i++) {
			String a = sc.next();
			list.add(a);
		}
		Collections.sort(list);
		List<Integer> list_count=new ArrayList<Integer>();
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			list_count.add(count);
		}
		int max = Collections.max(list_count);
		List<String> list_answer=new ArrayList<String>();
		if(max==0) {
			for(int i=0;list.size()>i;i++) {
				System.out.println(list.get(i));
			}
			System.exit(0);
		}
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			if(count==max)
				list_answer.add(list.get(i));
		}
		for(int i=0;list_answer.size()>i;i++) {
			System.out.println(list_answer.get(i));
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list=new ArrayList<String>();
		//int[] array = new int[1000000000*2];
		int n = sc.nextInt();
		for(int i=0;n>i;i++) {
			String a = sc.next();
			list.add(a);
		}
		Collections.sort(list);
		List<Integer> list_count=new ArrayList<Integer>();
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			list_count.add(count);
		}
		int max = Collections.max(list_count);
		List<String> list_answer=new ArrayList<String>();
		if(max==0) {
			for(int i=0;list.size()>i;i++) {
				System.out.println(list.get(i));
			}
			System.exit(0);
		}
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			if(count==max)
				list_answer.add(list.get(i));
		}
		for(int i=0;list_answer.size()>i;i++) {
			System.out.println(list_answer.get(i));
		}
	} main {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list=new ArrayList<String>();
		//int[] array = new int[1000000000*2];
		int n = sc.nextInt();
		for(int i=0;n>i;i++) {
			String a = sc.next();
			list.add(a);
		}
		Collections.sort(list);
		List<Integer> list_count=new ArrayList<Integer>();
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			list_count.add(count);
		}
		int max = Collections.max(list_count);
		List<String> list_answer=new ArrayList<String>();
		if(max==0) {
			for(int i=0;list.size()>i;i++) {
				System.out.println(list.get(i));
			}
			System.exit(0);
		}
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			if(count==max)
				list_answer.add(list.get(i));
		}
		for(int i=0;list_answer.size()>i;i++) {
			System.out.println(list_answer.get(i));
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) List<String> list=new ArrayList<String>(); list new ArrayList<String>() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int i=0;n>i;i++) {
			String a = sc.next();
			list.add(a);
		} int i=0; int i=0; i 0 n>i n i i++ i++ i {
			String a = sc.next();
			list.add(a);
		} {
			String a = sc.next();
			list.add(a);
		} String a = sc.next(); a sc.next() sc.next sc list.add(a) list.add list a Collections.sort(list) Collections.sort Collections list List<Integer> list_count=new ArrayList<Integer>(); list_count new ArrayList<Integer>() for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			list_count.add(count);
		} int i=0; int i=0; i 0 n-1>i n-1 n 1 i i++ i++ i {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			list_count.add(count);
		} {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			list_count.add(count);
		} int count=0; count 0 if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			} list.get(i).equals(list.get(i+1)) list.get(i).equals list.get(i) list.get list i list.get(i+1) list.get list i+1 i 1 {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			} count++ count i++ i while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				} true {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				} if(i==n-1)
						break; i==n-1 i n-1 n 1 break; if(!list.get(i).equals(list.get(i+1)))
						break; !list.get(i).equals(list.get(i+1)) list.get(i).equals(list.get(i+1)) list.get(i).equals list.get(i) list.get list i list.get(i+1) list.get list i+1 i 1 break; count++ count i++ i list_count.add(count) list_count.add list_count count int max = Collections.max(list_count); max Collections.max(list_count) Collections.max Collections list_count List<String> list_answer=new ArrayList<String>(); list_answer new ArrayList<String>() if(max==0) {
			for(int i=0;list.size()>i;i++) {
				System.out.println(list.get(i));
			}
			System.exit(0);
		} max==0 max 0 {
			for(int i=0;list.size()>i;i++) {
				System.out.println(list.get(i));
			}
			System.exit(0);
		} for(int i=0;list.size()>i;i++) {
				System.out.println(list.get(i));
			} int i=0; int i=0; i 0 list.size()>i list.size() list.size list i i++ i++ i {
				System.out.println(list.get(i));
			} {
				System.out.println(list.get(i));
			} System.out.println(list.get(i)) System.out.println System.out System System.out list.get(i) list.get list i System.exit(0) System.exit System 0 for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			if(count==max)
				list_answer.add(list.get(i));
		} int i=0; int i=0; i 0 n-1>i n-1 n 1 i i++ i++ i {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			if(count==max)
				list_answer.add(list.get(i));
		} {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			if(count==max)
				list_answer.add(list.get(i));
		} int count=0; count 0 if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			} list.get(i).equals(list.get(i+1)) list.get(i).equals list.get(i) list.get list i list.get(i+1) list.get list i+1 i 1 {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			} count++ count i++ i while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				} true {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				} if(i==n-1)
						break; i==n-1 i n-1 n 1 break; if(!list.get(i).equals(list.get(i+1)))
						break; !list.get(i).equals(list.get(i+1)) list.get(i).equals(list.get(i+1)) list.get(i).equals list.get(i) list.get list i list.get(i+1) list.get list i+1 i 1 break; count++ count i++ i if(count==max)
				list_answer.add(list.get(i)); count==max count max list_answer.add(list.get(i)) list_answer.add list_answer list.get(i) list.get list i for(int i=0;list_answer.size()>i;i++) {
			System.out.println(list_answer.get(i));
		} int i=0; int i=0; i 0 list_answer.size()>i list_answer.size() list_answer.size list_answer i i++ i++ i {
			System.out.println(list_answer.get(i));
		} {
			System.out.println(list_answer.get(i));
		} System.out.println(list_answer.get(i)) System.out.println System.out System System.out list_answer.get(i) list_answer.get list_answer i String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list=new ArrayList<String>();
		//int[] array = new int[1000000000*2];
		int n = sc.nextInt();
		for(int i=0;n>i;i++) {
			String a = sc.next();
			list.add(a);
		}
		Collections.sort(list);
		List<Integer> list_count=new ArrayList<Integer>();
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			list_count.add(count);
		}
		int max = Collections.max(list_count);
		List<String> list_answer=new ArrayList<String>();
		if(max==0) {
			for(int i=0;list.size()>i;i++) {
				System.out.println(list.get(i));
			}
			System.exit(0);
		}
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			if(count==max)
				list_answer.add(list.get(i));
		}
		for(int i=0;list_answer.size()>i;i++) {
			System.out.println(list_answer.get(i));
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list=new ArrayList<String>();
		//int[] array = new int[1000000000*2];
		int n = sc.nextInt();
		for(int i=0;n>i;i++) {
			String a = sc.next();
			list.add(a);
		}
		Collections.sort(list);
		List<Integer> list_count=new ArrayList<Integer>();
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			list_count.add(count);
		}
		int max = Collections.max(list_count);
		List<String> list_answer=new ArrayList<String>();
		if(max==0) {
			for(int i=0;list.size()>i;i++) {
				System.out.println(list.get(i));
			}
			System.exit(0);
		}
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			if(count==max)
				list_answer.add(list.get(i));
		}
		for(int i=0;list_answer.size()>i;i++) {
			System.out.println(list_answer.get(i));
		}
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list=new ArrayList<String>();
		//int[] array = new int[1000000000*2];
		int n = sc.nextInt();
		for(int i=0;n>i;i++) {
			String a = sc.next();
			list.add(a);
		}
		Collections.sort(list);
		List<Integer> list_count=new ArrayList<Integer>();
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			list_count.add(count);
		}
		int max = Collections.max(list_count);
		List<String> list_answer=new ArrayList<String>();
		if(max==0) {
			for(int i=0;list.size()>i;i++) {
				System.out.println(list.get(i));
			}
			System.exit(0);
		}
		for(int i=0;n-1>i;i++) {
			int count=0;
			if(list.get(i).equals(list.get(i+1))) {
				count++;
				i++;
				while(true) {
					if(i==n-1)
						break;
					if(!list.get(i).equals(list.get(i+1)))
						break;
					count++;
					i++;
				}
			}
			if(count==max)
				list_answer.add(list.get(i));
		}
		for(int i=0;list_answer.size()>i;i++) {
			System.out.println(list_answer.get(i));
		}
	}
}