import java.io.FileNotFoundException; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main { public static void main(String[] args) throws FileNotFoundException { new Main().run(); } void run() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[][] cnt = new int[10000][2]; for (int i = 0; i < cnt.length; ++i) { cnt[i][0] = i; } for (int i = 0; i < N; ++i) { cnt[sc.next().length() - 2][1]++; } Arrays.sort(cnt, new Comparator() { @Override public int compare(int[] o1, int[] o2) { if (o1[1] != o2[1]) return -Integer.compare(o1[1], o2[1]); else return -Integer.compare(o1[0], o2[0]); } }); System.out.println(cnt[0][0]); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }