s = int(input().replace("/",""))

if s<= 20190430:

  print("Heisei")

else:

  print("TBD")
y, m, d = list(map(int, input().split("/")))



if y < 2019:

    print("Heisei")

elif y == 2019 and m <= 4:

    print("Heisei")

else:

    print("TBD")
s = int(input().replace("/", ""))
if s <= 20190430:
    print("Heisei")
else:
    print("TBD")

y, m, d = list(map(int, input().split("/")))
if y < 2019:
    print("Heisei")
elif y == 2019 and m <= 4:
    print("Heisei")
else:
    print("TBD")

-s = int(input().replace("/", "")) -if s <= 20190430: +y, m, d = list(map(int, input().split("/"))) +if y < 2019: +    print("Heisei") +elif y == 2019 and m <= 4: