S = str(input())
int_S = int(S.replace('/',''))

if int_S>=20190431:
  print("TBD")
else:
  print("Heisei") S = str(input()) S str(input()) str input() input int_S = int(S.replace('/','')) int_S int(S.replace('/','')) int S.replace('/','') S.replace S replace '/' '' if int_S>=20190431:
  print("TBD")
else:
  print("Heisei") int_S>=20190431 int_S 20190431 print("TBD") print "TBD" print("Heisei") print "Heisei" S = str(input()) str(input()) S int_S = int(S.replace('/','')) int(S.replace('/','')) int_S
S = str(input())
int_S = int(S.replace('/',''))

if int_S>=20190431:
  print("TBD")
else:
  print("Heisei")