n=int(input());a=[input()for _ in[0]*n]; f=input()
print(*(a if f in a else["fruit not found]))