s = list(input())
del s[7]
del s[4]
print("Heisei" if int(''.join(s)) <= 20190430 else "TBD") s = list(input()) s list(input()) list input() input del s[7] s[7] s 7 del s[4] s[4] s 4 print("Heisei" if int(''.join(s)) <= 20190430 else "TBD") print "Heisei" if int(''.join(s)) <= 20190430 else "TBD" int(''.join(s)) <= 20190430 int(''.join(s)) int ''.join(s) ''.join '' join s 20190430 "Heisei" "TBD" s = list(input()) list(input()) s
s = list(input())
del s[7]
del s[4]
print("Heisei" if int(''.join(s)) <= 20190430 else "TBD")
