print(sorted([input() for i in range(int(input()))])[0])