#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

s = input()

year = int(s[0:4])
month = int(s[5:7])
day = int(s[9:])



if (year > 2019):
    print("TBD")
elif (year < 2019):
    print("Heisei")
else:
    if (month > 4):
        print("TBD")
    elif (month < 4):
        print("Heisei")
    else:
        if (day > 30):
            print("TBD")
        else:
            print("Heisei")



 s = input() s input() input year = int(s[0:4]) year int(s[0:4]) int s[0:4] s 0:4 0 4 month = int(s[5:7]) month int(s[5:7]) int s[5:7] s 5:7 5 7 day = int(s[9:]) day int(s[9:]) int s[9:] s 9: 9 if (year > 2019):
    print("TBD")
elif (year < 2019):
    print("Heisei")
else:
    if (month > 4):
        print("TBD")
    elif (month < 4):
        print("Heisei")
    else:
        if (day > 30):
            print("TBD")
        else:
            print("Heisei") year > 2019 year 2019 print("TBD") print "TBD" elif (year < 2019):
    print("Heisei") year < 2019 year 2019 print("Heisei") print "Heisei" if (month > 4):
        print("TBD")
    elif (month < 4):
        print("Heisei")
    else:
        if (day > 30):
            print("TBD")
        else:
            print("Heisei") month > 4 month 4 print("TBD") print "TBD" elif (month < 4):
        print("Heisei")
     month < 4 month 4 print("Heisei") print "Heisei" if (day > 30):
            print("TBD")
        else:
            print("Heisei") day > 30 day 30 print("TBD") print "TBD" print("Heisei") print "Heisei" month = int(s[5:7]) int(s[5:7]) month year = int(s[0:4]) int(s[0:4]) year day = int(s[9:]) int(s[9:]) day s = input() input() s
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

s = input()

year = int(s[0:4])
month = int(s[5:7])
day = int(s[9:])



if (year > 2019):
    print("TBD")
elif (year < 2019):
    print("Heisei")
else:
    if (month > 4):
        print("TBD")
    elif (month < 4):
        print("Heisei")
    else:
        if (day > 30):
            print("TBD")
        else:
            print("Heisei")




