# Arup Guha
# 12/14/2024
# Solution to Kattis Problem Keys, Phone Wallet

# Get # of items.
n = int(input())

# See what we have.
hasKeys = False
hasPhone = False
hasWallet = False

# Read items.
for i in range(n):

    # Get next.
    item = input().strip()

    # Mark item.
    if item == "keys":
        hasKeys = True
    if item == "phone":
        hasPhone = True
    if item == "wallet":
        hasWallet = True

# Print accordingly.
if not hasKeys:
    print("keys")
if not hasPhone:
    print("phone")
if not hasWallet:
    print("wallet")

# Check this just in case we're good.
if hasKeys and hasPhone and hasWallet:
    print("ready")
