import java.io.*;
import java.math.*;
import java.util.*;

public class Main {

	static class Pair {
		public int x, y, id;
		public Pair() {
			x = y = 0;
		}
		public Pair(int x, int y, int i) {
			this.x = x;
			this.y = y;
			id = i;
		}
	}
	
	public static void main(String[] args) throws IOException {

		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = in.nextInt();
		String s;
		Map<String,Integer> mp=new HashMap<>();
		int y = 0;
		Vector<String>ans=new Vector<String>();
		for(int i=0;i<n;i++) {
			s = in.next();
		    if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    }
		}
		Collections.sort(ans);
		for(String _s: ans) {
			out.println(_s);
		}
		out.flush();

	}

	static class InputReader {
		StreamTokenizer tokenizer;

		public InputReader(InputStream stream) {
			tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(stream)));
			tokenizer.ordinaryChars(33, 126);
			tokenizer.wordChars(33, 126);
		}

		public String next() throws IOException {
			tokenizer.nextToken();
			return tokenizer.sval;
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean hasNext() throws IOException {
			int res = tokenizer.nextToken();
			tokenizer.pushBack();
			return res != StreamTokenizer.TT_EOF;
		}
	}

} import java.io.*; io.* java import java.math.*; math.* java import java.util.*; util.* java public class Main {

	static class Pair {
		public int x, y, id;
		public Pair() {
			x = y = 0;
		}
		public Pair(int x, int y, int i) {
			this.x = x;
			this.y = y;
			id = i;
		}
	}
	
	public static void main(String[] args) throws IOException {

		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = in.nextInt();
		String s;
		Map<String,Integer> mp=new HashMap<>();
		int y = 0;
		Vector<String>ans=new Vector<String>();
		for(int i=0;i<n;i++) {
			s = in.next();
		    if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    }
		}
		Collections.sort(ans);
		for(String _s: ans) {
			out.println(_s);
		}
		out.flush();

	}

	static class InputReader {
		StreamTokenizer tokenizer;

		public InputReader(InputStream stream) {
			tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(stream)));
			tokenizer.ordinaryChars(33, 126);
			tokenizer.wordChars(33, 126);
		}

		public String next() throws IOException {
			tokenizer.nextToken();
			return tokenizer.sval;
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean hasNext() throws IOException {
			int res = tokenizer.nextToken();
			tokenizer.pushBack();
			return res != StreamTokenizer.TT_EOF;
		}
	}

} Main public static void main(String[] args) throws IOException {

		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = in.nextInt();
		String s;
		Map<String,Integer> mp=new HashMap<>();
		int y = 0;
		Vector<String>ans=new Vector<String>();
		for(int i=0;i<n;i++) {
			s = in.next();
		    if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    }
		}
		Collections.sort(ans);
		for(String _s: ans) {
			out.println(_s);
		}
		out.flush();

	} main {

		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = in.nextInt();
		String s;
		Map<String,Integer> mp=new HashMap<>();
		int y = 0;
		Vector<String>ans=new Vector<String>();
		for(int i=0;i<n;i++) {
			s = in.next();
		    if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    }
		}
		Collections.sort(ans);
		for(String _s: ans) {
			out.println(_s);
		}
		out.flush();

	} InputReader in = new InputReader(System.in); in new InputReader(System.in) PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); out new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) int n = in.nextInt(); n in.nextInt() in.nextInt in String s; s Map<String,Integer> mp=new HashMap<>(); mp new HashMap<>() int y = 0; y 0 Vector<String>ans=new Vector<String>(); ans new Vector<String>() for(int i=0;i<n;i++) {
			s = in.next();
		    if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    }
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			s = in.next();
		    if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    }
		} {
			s = in.next();
		    if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    }
		} s = in.next() s in.next() in.next in if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    } mp.containsKey(s) mp.containsKey mp s {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    } int x = mp.get(s) + 1; x mp.get(s) + 1 mp.get(s) mp.get mp s 1 mp.put(s,x) mp.put mp s x if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	} x>y x y {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	} ans.clear() ans.clear ans ans.add(s) ans.add ans s y=x y x if(x==y) {
		    		ans.add(s);
		    	} x==y x y {
		    		ans.add(s);
		    	} ans.add(s) ans.add ans s {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    } mp.put(s,1) mp.put mp s 1 if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	} 1>y 1 y {
		    		y = 1;
		    		ans.add(s);
		    	} y = 1 y 1 ans.add(s) ans.add ans s if(1==y) {
		    		ans.add(s);
		    	} 1==y 1 y {
		    		ans.add(s);
		    	} ans.add(s) ans.add ans s Collections.sort(ans) Collections.sort Collections ans for(String _s: ans) {
			out.println(_s);
		} String _s ans {
			out.println(_s);
		} {
			out.println(_s);
		} out.println(_s) out.println out _s out.flush() out.flush out String[] args args static class Pair {
		public int x, y, id;
		public Pair() {
			x = y = 0;
		}
		public Pair(int x, int y, int i) {
			this.x = x;
			this.y = y;
			id = i;
		}
	} Pair public int x x y y id; id public Pair() {
			x = y = 0;
		} Pair {
			x = y = 0;
		} x = y = 0 x y = 0 y 0 public Pair(int x, int y, int i) {
			this.x = x;
			this.y = y;
			id = i;
		} Pair {
			this.x = x;
			this.y = y;
			id = i;
		} this.x = x this.x this this.x x this.y = y this.y this this.y y id = i id i int x x int y y int i i static class InputReader {
		StreamTokenizer tokenizer;

		public InputReader(InputStream stream) {
			tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(stream)));
			tokenizer.ordinaryChars(33, 126);
			tokenizer.wordChars(33, 126);
		}

		public String next() throws IOException {
			tokenizer.nextToken();
			return tokenizer.sval;
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean hasNext() throws IOException {
			int res = tokenizer.nextToken();
			tokenizer.pushBack();
			return res != StreamTokenizer.TT_EOF;
		}
	} InputReader StreamTokenizer tokenizer; tokenizer public InputReader(InputStream stream) {
			tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(stream)));
			tokenizer.ordinaryChars(33, 126);
			tokenizer.wordChars(33, 126);
		} InputReader {
			tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(stream)));
			tokenizer.ordinaryChars(33, 126);
			tokenizer.wordChars(33, 126);
		} tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(stream))) tokenizer new StreamTokenizer(new BufferedReader(new InputStreamReader(stream))) tokenizer.ordinaryChars(33, 126) tokenizer.ordinaryChars tokenizer 33 126 tokenizer.wordChars(33, 126) tokenizer.wordChars tokenizer 33 126 InputStream stream stream public String next() throws IOException {
			tokenizer.nextToken();
			return tokenizer.sval;
		} next {
			tokenizer.nextToken();
			return tokenizer.sval;
		} tokenizer.nextToken() tokenizer.nextToken tokenizer return tokenizer.sval; tokenizer.sval tokenizer tokenizer.sval public int nextInt() throws IOException {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws IOException {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public boolean hasNext() throws IOException {
			int res = tokenizer.nextToken();
			tokenizer.pushBack();
			return res != StreamTokenizer.TT_EOF;
		} hasNext {
			int res = tokenizer.nextToken();
			tokenizer.pushBack();
			return res != StreamTokenizer.TT_EOF;
		} int res = tokenizer.nextToken(); res tokenizer.nextToken() tokenizer.nextToken tokenizer tokenizer.pushBack() tokenizer.pushBack tokenizer return res != StreamTokenizer.TT_EOF; res != StreamTokenizer.TT_EOF res StreamTokenizer.TT_EOF StreamTokenizer StreamTokenizer.TT_EOF public class Main {

	static class Pair {
		public int x, y, id;
		public Pair() {
			x = y = 0;
		}
		public Pair(int x, int y, int i) {
			this.x = x;
			this.y = y;
			id = i;
		}
	}
	
	public static void main(String[] args) throws IOException {

		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = in.nextInt();
		String s;
		Map<String,Integer> mp=new HashMap<>();
		int y = 0;
		Vector<String>ans=new Vector<String>();
		for(int i=0;i<n;i++) {
			s = in.next();
		    if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    }
		}
		Collections.sort(ans);
		for(String _s: ans) {
			out.println(_s);
		}
		out.flush();

	}

	static class InputReader {
		StreamTokenizer tokenizer;

		public InputReader(InputStream stream) {
			tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(stream)));
			tokenizer.ordinaryChars(33, 126);
			tokenizer.wordChars(33, 126);
		}

		public String next() throws IOException {
			tokenizer.nextToken();
			return tokenizer.sval;
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean hasNext() throws IOException {
			int res = tokenizer.nextToken();
			tokenizer.pushBack();
			return res != StreamTokenizer.TT_EOF;
		}
	}

} public class Main {

	static class Pair {
		public int x, y, id;
		public Pair() {
			x = y = 0;
		}
		public Pair(int x, int y, int i) {
			this.x = x;
			this.y = y;
			id = i;
		}
	}
	
	public static void main(String[] args) throws IOException {

		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = in.nextInt();
		String s;
		Map<String,Integer> mp=new HashMap<>();
		int y = 0;
		Vector<String>ans=new Vector<String>();
		for(int i=0;i<n;i++) {
			s = in.next();
		    if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    }
		}
		Collections.sort(ans);
		for(String _s: ans) {
			out.println(_s);
		}
		out.flush();

	}

	static class InputReader {
		StreamTokenizer tokenizer;

		public InputReader(InputStream stream) {
			tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(stream)));
			tokenizer.ordinaryChars(33, 126);
			tokenizer.wordChars(33, 126);
		}

		public String next() throws IOException {
			tokenizer.nextToken();
			return tokenizer.sval;
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean hasNext() throws IOException {
			int res = tokenizer.nextToken();
			tokenizer.pushBack();
			return res != StreamTokenizer.TT_EOF;
		}
	}

} Main
import java.io.*;
import java.math.*;
import java.util.*;

public class Main {

	static class Pair {
		public int x, y, id;
		public Pair() {
			x = y = 0;
		}
		public Pair(int x, int y, int i) {
			this.x = x;
			this.y = y;
			id = i;
		}
	}
	
	public static void main(String[] args) throws IOException {

		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = in.nextInt();
		String s;
		Map<String,Integer> mp=new HashMap<>();
		int y = 0;
		Vector<String>ans=new Vector<String>();
		for(int i=0;i<n;i++) {
			s = in.next();
		    if(mp.containsKey(s)) {
		    	int x = mp.get(s) + 1;
		    	mp.put(s,x);
		    	if(x>y) {
		    		ans.clear();
		    		ans.add(s);
		    		y=x;
		    	}
		    	else if(x==y) {
		    		ans.add(s);
		    	}
		    }else {
		    	mp.put(s,1);
		    	if(1>y) {
		    		y = 1;
		    		ans.add(s);
		    	}else if(1==y) {
		    		ans.add(s);
		    	}
		    }
		}
		Collections.sort(ans);
		for(String _s: ans) {
			out.println(_s);
		}
		out.flush();

	}

	static class InputReader {
		StreamTokenizer tokenizer;

		public InputReader(InputStream stream) {
			tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(stream)));
			tokenizer.ordinaryChars(33, 126);
			tokenizer.wordChars(33, 126);
		}

		public String next() throws IOException {
			tokenizer.nextToken();
			return tokenizer.sval;
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean hasNext() throws IOException {
			int res = tokenizer.nextToken();
			tokenizer.pushBack();
			return res != StreamTokenizer.TT_EOF;
		}
	}

}
