n = int(input())
l = []
for i in range(5):
    l.append(input())

l.sort(key=lambda x:len(x))
print(l[-n])

我这时间复杂度不知道符不符合要求