local n = io.read("*n", "*l") local t = {} for i = 1, n do local s = io.read() local key = #s - 2 if(t[key] == nil) then t[key] = 1 else t[key] = t[key] + 1 end end local kmax, vmax = 0, 0 for k, v in pairs(t) do if(vmax < v) then kmax, vmax = k, v elseif(vmax == v and kmax < k) then kmax = k end end print(kmax)