
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);
		int n = sc.nextInt();
		List<String> list = new ArrayList<>();
		for(int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		List<Text> ans = new ArrayList<>();
		int max = 0;
		int num = 0;
		String b = "";
		for(String e : list) {
			if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			}
		}
		max = Math.max(max, num);
		for(Text e : ans) {
			if(e.getNum() == max) {
				System.out.println(e.getS());
			}
		}
	}

}

class Text {
	private String s;
	private int num;

	protected Text(String s, int num) {
		super();
		this.s = s;
		this.num = num;
	}

	public String getS() {
		return s;
	}

	public void setS(String s) {
		this.s = s;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

} 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);
		int n = sc.nextInt();
		List<String> list = new ArrayList<>();
		for(int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		List<Text> ans = new ArrayList<>();
		int max = 0;
		int num = 0;
		String b = "";
		for(String e : list) {
			if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			}
		}
		max = Math.max(max, num);
		for(Text e : ans) {
			if(e.getNum() == max) {
				System.out.println(e.getS());
			}
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<String> list = new ArrayList<>();
		for(int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		List<Text> ans = new ArrayList<>();
		int max = 0;
		int num = 0;
		String b = "";
		for(String e : list) {
			if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			}
		}
		max = Math.max(max, num);
		for(Text e : ans) {
			if(e.getNum() == max) {
				System.out.println(e.getS());
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<String> list = new ArrayList<>();
		for(int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		List<Text> ans = new ArrayList<>();
		int max = 0;
		int num = 0;
		String b = "";
		for(String e : list) {
			if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			}
		}
		max = Math.max(max, num);
		for(Text e : ans) {
			if(e.getNum() == max) {
				System.out.println(e.getS());
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<String> list = new ArrayList<>(); list new ArrayList<>() for(int i = 0; i < n; i++) {
			list.add(sc.next());
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			list.add(sc.next());
		} {
			list.add(sc.next());
		} list.add(sc.next()) list.add list sc.next() sc.next sc Collections.sort(list) Collections.sort Collections list List<Text> ans = new ArrayList<>(); ans new ArrayList<>() int max = 0; max 0 int num = 0; num 0 String b = ""; b "" for(String e : list) {
			if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			}
		} String e list {
			if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			}
		} {
			if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			}
		} if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			} ans.isEmpty() ans.isEmpty ans {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} ans.add(new Text(e, 1)) ans.add ans new Text(e, 1) num++ num continue; {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			} Text ee = ans.get(ans.size() - 1); ee ans.get(ans.size() - 1) ans.get ans ans.size() - 1 ans.size() ans.size ans 1 if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				} ee.getS().equals(e) ee.getS().equals ee.getS() ee.getS ee e {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1) ans.get(ans.size() - 1).setNum ans.get(ans.size() - 1) ans.get ans ans.size() - 1 ans.size() ans.size ans 1 ans.get(ans.size() - 1).getNum() + 1 ans.get(ans.size() - 1).getNum() ans.get(ans.size() - 1).getNum ans.get(ans.size() - 1) ans.get ans ans.size() - 1 ans.size() ans.size ans 1 1 num++ num {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				} max = Math.max(max, num) max Math.max(max, num) Math.max Math max num ans.add(new Text(e, 1)) ans.add ans new Text(e, 1) num = 1 num 1 max = Math.max(max, num) max Math.max(max, num) Math.max Math max num for(Text e : ans) {
			if(e.getNum() == max) {
				System.out.println(e.getS());
			}
		} Text e ans {
			if(e.getNum() == max) {
				System.out.println(e.getS());
			}
		} {
			if(e.getNum() == max) {
				System.out.println(e.getS());
			}
		} if(e.getNum() == max) {
				System.out.println(e.getS());
			} e.getNum() == max e.getNum() e.getNum e max {
				System.out.println(e.getS());
			} System.out.println(e.getS()) System.out.println System.out System System.out e.getS() e.getS e String[] args args class Text {
	private String s;
	private int num;

	protected Text(String s, int num) {
		super();
		this.s = s;
		this.num = num;
	}

	public String getS() {
		return s;
	}

	public void setS(String s) {
		this.s = s;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

} Text private String s; s private int num; num protected Text(String s, int num) {
		super();
		this.s = s;
		this.num = num;
	} Text {
		super();
		this.s = s;
		this.num = num;
	} super() super this.s = s this.s this this.s s this.num = num this.num this this.num num String s s int num num public String getS() {
		return s;
	} getS {
		return s;
	} return s; s public void setS(String s) {
		this.s = s;
	} setS {
		this.s = s;
	} this.s = s this.s this this.s s String s s public int getNum() {
		return num;
	} getNum {
		return num;
	} return num; num public void setNum(int num) {
		this.num = num;
	} setNum {
		this.num = num;
	} this.num = num this.num this this.num num int num num public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<String> list = new ArrayList<>();
		for(int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		List<Text> ans = new ArrayList<>();
		int max = 0;
		int num = 0;
		String b = "";
		for(String e : list) {
			if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			}
		}
		max = Math.max(max, num);
		for(Text e : ans) {
			if(e.getNum() == max) {
				System.out.println(e.getS());
			}
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<String> list = new ArrayList<>();
		for(int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		List<Text> ans = new ArrayList<>();
		int max = 0;
		int num = 0;
		String b = "";
		for(String e : list) {
			if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			}
		}
		max = Math.max(max, num);
		for(Text e : ans) {
			if(e.getNum() == max) {
				System.out.println(e.getS());
			}
		}
	}

} 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);
		int n = sc.nextInt();
		List<String> list = new ArrayList<>();
		for(int i = 0; i < n; i++) {
			list.add(sc.next());
		}
		Collections.sort(list);
		List<Text> ans = new ArrayList<>();
		int max = 0;
		int num = 0;
		String b = "";
		for(String e : list) {
			if(ans.isEmpty()) {
				ans.add(new Text(e, 1));
				num++;
				continue;
			} else {
				Text ee = ans.get(ans.size() - 1);
				if(ee.getS().equals(e)) {
					ans.get(ans.size() - 1).setNum(ans.get(ans.size() - 1).getNum() + 1);
					num++;
				} else {
					max = Math.max(max, num);
					ans.add(new Text(e, 1));
					num = 1;
				}
			}
		}
		max = Math.max(max, num);
		for(Text e : ans) {
			if(e.getNum() == max) {
				System.out.println(e.getS());
			}
		}
	}

}

class Text {
	private String s;
	private int num;

	protected Text(String s, int num) {
		super();
		this.s = s;
		this.num = num;
	}

	public String getS() {
		return s;
	}

	public void setS(String s) {
		this.s = s;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

}