import datetime



s = eval(input())



inputDate = datetime.datetime.strptime(s, '%Y/%m/%d')

lastDate = datetime.datetime.strptime('2019/04/30', '%Y/%m/%d')



if inputDate > lastDate:

    print('TBD')

else:

    print('Heisei')

s = eval(input())

if s <= '2019/04/30':

    print('Heisei')

else:

    print('TBD')
import datetime

s = eval(input())
inputDate = datetime.datetime.strptime(s, "%Y/%m/%d")
lastDate = datetime.datetime.strptime("2019/04/30", "%Y/%m/%d")
if inputDate > lastDate:
    print("TBD")
else:
    print("Heisei")

s = eval(input())
if s <= "2019/04/30":
    print("Heisei")
else:
    print("TBD")

-import datetime - -inputDate = datetime.datetime.strptime(s, "%Y/%m/%d") -lastDate = datetime.datetime.strptime("2019/04/30", "%Y/%m/%d") -if inputDate > lastDate: +if s <= "2019/04/30": +    print("Heisei") +else: -else: -    print("Heisei")