S = input()

y = S[0:4]
m = S[5:7]
d = S[8:10]

if y < "2019":
    print("Heisei")

elif (y == "2019") and (m < "04"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d <= "30"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d > "30"):
    print("TBD")

elif (y == "2019") and (m >= "05"):
    print("TBD")

elif (y > "2019"):
    print("TBD") S = input() S input() input y = S[0:4] y S[0:4] S 0:4 0 4 m = S[5:7] m S[5:7] S 5:7 5 7 d = S[8:10] d S[8:10] S 8:10 8 10 if y < "2019":
    print("Heisei")

elif (y == "2019") and (m < "04"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d <= "30"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d > "30"):
    print("TBD")

elif (y == "2019") and (m >= "05"):
    print("TBD")

elif (y > "2019"):
    print("TBD") y < "2019" y "2019" print("Heisei") print "Heisei" elif (y == "2019") and (m < "04"):
    print("Heisei") (y == "2019") and (m < "04") y == "2019" y "2019" m < "04" m "04" print("Heisei") print "Heisei" elif (y == "2019") and (m == "04") and (d <= "30"):
    print("Heisei") (y == "2019") and (m == "04") and (d <= "30") (y == "2019") and (m == "04") y == "2019" y "2019" m == "04" m "04" d <= "30" d "30" print("Heisei") print "Heisei" elif (y == "2019") and (m == "04") and (d > "30"):
    print("TBD") (y == "2019") and (m == "04") and (d > "30") (y == "2019") and (m == "04") y == "2019" y "2019" m == "04" m "04" d > "30" d "30" print("TBD") print "TBD" elif (y == "2019") and (m >= "05"):
    print("TBD") (y == "2019") and (m >= "05") y == "2019" y "2019" m >= "05" m "05" print("TBD") print "TBD" elif (y > "2019"):
    print("TBD") y > "2019" y "2019" print("TBD") print "TBD" m = S[5:7] S[5:7] m d = S[8:10] S[8:10] d y = S[0:4] S[0:4] y S = input() input() S
S = input()

y = S[0:4]
m = S[5:7]
d = S[8:10]

if y < "2019":
    print("Heisei")

elif (y == "2019") and (m < "04"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d <= "30"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d > "30"):
    print("TBD")

elif (y == "2019") and (m >= "05"):
    print("TBD")

elif (y > "2019"):
    print("TBD")