S  = input()
tmp = S[5:7]
if tmp =="01" or tmp =="02" or tmp =="03" or tmp =="04":
    print("Heisei")
else:
    print("TBD") S  = input() S input() input tmp = S[5:7] tmp S[5:7] S 5:7 5 7 if tmp =="01" or tmp =="02" or tmp =="03" or tmp =="04":
    print("Heisei")
else:
    print("TBD") tmp =="01" or tmp =="02" or tmp =="03" or tmp =="04" tmp =="01" or tmp =="02" or tmp =="03" tmp =="01" or tmp =="02" tmp =="01" tmp "01" tmp =="02" tmp "02" tmp =="03" tmp "03" tmp =="04" tmp "04" print("Heisei") print "Heisei" print("TBD") print "TBD" tmp = S[5:7] S[5:7] tmp S  = input() input() S
S  = input()
tmp = S[5:7]
if tmp =="01" or tmp =="02" or tmp =="03" or tmp =="04":
    print("Heisei")
else:
    print("TBD")
