S=eval(input())

if int(S[:4])<2019:

  print('Heisei')

elif int(S[:4])==2019 and int(S[5:7])<4:

  print('Heisei')

elif int(S[:4])==2019 and int(S[5:7])==4 and int(S[8:10])<=30:

  print('Heisei')

else:

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

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

  print('Heisei')

else:

  print('TBD')
S = eval(input())
if int(S[:4]) < 2019:
    print("Heisei")
elif int(S[:4]) == 2019 and int(S[5:7]) < 4:
    print("Heisei")
elif int(S[:4]) == 2019 and int(S[5:7]) == 4 and int(S[8:10]) <= 30:
    print("Heisei")
else:
    print("TBD")

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

-if int(S[:4]) < 2019: -    print("Heisei") -elif int(S[:4]) == 2019 and int(S[5:7]) < 4: -    print("Heisei") -elif int(S[:4]) == 2019 and int(S[5:7]) == 4 and int(S[8:10]) <= 30: +if S <= "2019/04/30":