import datetime



S = datetime.datetime.strptime(eval(input()), "%Y/%m/%d")



T = datetime.datetime.strptime("2019/05/01", "%Y/%m/%d")



print(("Heisei" if S < T else "TBD"))

S = eval(input())



T = "2019/05/01"



print(("Heisei" if S < T else "TBD"))

import datetime

S = datetime.datetime.strptime(eval(input()), "%Y/%m/%d")
T = datetime.datetime.strptime("2019/05/01", "%Y/%m/%d")
print(("Heisei" if S < T else "TBD"))

S = eval(input())
T = "2019/05/01"
print(("Heisei" if S < T else "TBD"))

-import datetime - -S = datetime.datetime.strptime(eval(input()), "%Y/%m/%d") -T = datetime.datetime.strptime("2019/05/01", "%Y/%m/%d") +S = eval(input()) +T = "2019/05/01"