s = input()

y = int(s[0:4])
m = int(s[5:7])
d = int(s[8:12])

if(m <= 4 and d <=30):
  print("Heisei")
else:
  print("TBD") s = input() s input() input y = int(s[0:4]) y int(s[0:4]) int s[0:4] s 0:4 0 4 m = int(s[5:7]) m int(s[5:7]) int s[5:7] s 5:7 5 7 d = int(s[8:12]) d int(s[8:12]) int s[8:12] s 8:12 8 12 if(m <= 4 and d <=30):
  print("Heisei")
else:
  print("TBD") m <= 4 and d <=30 m <= 4 m 4 d <=30 d 30 print("Heisei") print "Heisei" print("TBD") print "TBD" s = input() input() s m = int(s[5:7]) int(s[5:7]) m d = int(s[8:12]) int(s[8:12]) d y = int(s[0:4]) int(s[0:4]) y
s = input()

y = int(s[0:4])
m = int(s[5:7])
d = int(s[8:12])

if(m <= 4 and d <=30):
  print("Heisei")
else:
  print("TBD")