S=input()

num=int(S[:4]+S[5:7]+S[8:])


if num<=20190430:
	print("Heisei")
else:
	print("TBD") S=input() S input() input num=int(S[:4]+S[5:7]+S[8:]) num int(S[:4]+S[5:7]+S[8:]) int S[:4]+S[5:7]+S[8:] S[:4]+S[5:7] S[:4] S :4 4 S[5:7] S 5:7 5 7 S[8:] S 8: 8 if num<=20190430:
	print("Heisei")
else:
	print("TBD") num<=20190430 num 20190430 print("Heisei") print "Heisei" print("TBD") print "TBD" S=input() input() S num=int(S[:4]+S[5:7]+S[8:]) int(S[:4]+S[5:7]+S[8:]) num
S=input()

num=int(S[:4]+S[5:7]+S[8:])


if num<=20190430:
	print("Heisei")
else:
	print("TBD")