import datetime

S = eval(input())

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

t = datetime.datetime(2019,4,30)

if s <= t:

  print('Heisei')

else:

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

if int(S[5:7]) <= 4:

  print('Heisei')

else:

  print('TBD')
import datetime

S = eval(input())
s = datetime.datetime.strptime(S, "%Y/%m/%d")
t = datetime.datetime(2019, 4, 30)
if s <= t:
    print("Heisei")
else:
    print("TBD")

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

-import datetime - -s = datetime.datetime.strptime(S, "%Y/%m/%d") -t = datetime.datetime(2019, 4, 30) -if s <= t: +if int(S[5:7]) <= 4: