import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int [] num = new int [1001]; int max = 0; for(int i = 0; i < n; i++) { String s = sc.next(); int l = s.length()-2; num[l]++; max = Math.max(max, num[l]); } for(int j = num.length-1; j>=0; j--) { if(num[j] == max) { System.out.println(j); break; } } } }