# Arup Guha
# 3/16/2026
# Solution to 2026 UCF HS Contest Problem A: Randomized Decisions

# Get both
toks = input().split()
total = int(toks[0])
heads = int(toks[1])

# Of course, do the programming team problems first!
for i in range(heads):
    print("Heads!")

# Okay, I guess I have to do homework.
for i in range(total-heads):
    print("Tails!")


