n, k = map(int, input().split()) pos = list(map(int, input().split())) if pos[0] == k: print("fyrst") elif pos[1] == k: print("naestfyrst") else: print(f"{pos.index(k)+1} fyrst")