import time

from datetime import date

S = list(map(int, input().split("/")))

day = date(S[0], S[1], S[2])

border = date(2019, 4, 30)

if day <= border:

  print("Heisei")

else:

  print("TBD")
S = eval(input())



if int(S[5:7]) >= 5:

  print("TBD")

else:

  print("Heisei")
import time
from datetime import date

S = list(map(int, input().split("/")))
day = date(S[0], S[1], S[2])
border = date(2019, 4, 30)
if day <= border:
    print("Heisei")
else:
    print("TBD")

S = eval(input())
if int(S[5:7]) >= 5:
    print("TBD")
else:
    print("Heisei")

-import time -from datetime import date - -S = list(map(int, input().split("/"))) -day = date(S[0], S[1], S[2]) -border = date(2019, 4, 30) -if day <= border: +S = eval(input()) +if int(S[5:7]) >= 5: +    print("TBD") +else: -else: -    print("TBD")