S = input().rstrip()
if int(S[:4]) >=2020:
    print("TBD")
    exit()
elif int(S[:4]) ==2019:
    if int(S[5:7]) >= 5:
        print("TBD")
        exit()
    elif int(S[5:7]) >= 4:
        if int(S[8:]) >= 31:
            print("TBD")
            exit()
print("Heisei") S = input().rstrip() S input().rstrip() ().rstrip () input rstrip if int(S[:4]) >=2020:
    print("TBD")
    exit()
elif int(S[:4]) ==2019:
    if int(S[5:7]) >= 5:
        print("TBD")
        exit()
    elif int(S[5:7]) >= 4:
        if int(S[8:]) >= 31:
            print("TBD")
            exit() int(S[:4]) >=2020 int(S[:4]) int S[:4] S :4 4 2020 print("TBD") print "TBD" exit() exit elif int(S[:4]) ==2019:
    if int(S[5:7]) >= 5:
        print("TBD")
        exit()
    elif int(S[5:7]) >= 4:
        if int(S[8:]) >= 31:
            print("TBD")
            exit() int(S[:4]) ==2019 int(S[:4]) int S[:4] S :4 4 2019 if int(S[5:7]) >= 5:
        print("TBD")
        exit()
    elif int(S[5:7]) >= 4:
        if int(S[8:]) >= 31:
            print("TBD")
            exit() int(S[5:7]) >= 5 int(S[5:7]) int S[5:7] S 5:7 5 7 5 print("TBD") print "TBD" exit() exit elif int(S[5:7]) >= 4:
        if int(S[8:]) >= 31:
            print("TBD")
            exit() int(S[5:7]) >= 4 int(S[5:7]) int S[5:7] S 5:7 5 7 4 if int(S[8:]) >= 31:
            print("TBD")
            exit() int(S[8:]) >= 31 int(S[8:]) int S[8:] S 8: 8 31 print("TBD") print "TBD" exit() exit print("Heisei") print "Heisei" S = input().rstrip() input().rstrip() S
S = input().rstrip()
if int(S[:4]) >=2020:
    print("TBD")
    exit()
elif int(S[:4]) ==2019:
    if int(S[5:7]) >= 5:
        print("TBD")
        exit()
    elif int(S[5:7]) >= 4:
        if int(S[8:]) >= 31:
            print("TBD")
            exit()
print("Heisei")