y,m,d = map(int,input().split(sep="/"))
if 4 > m:
    print("Heisei")
elif m == 4 and d <= 30:
    print("Heisei")
else:
    print("TBD") y,m,d = map(int,input().split(sep="/")) y map(int,input().split(sep="/")) map int input().split(sep="/") ().split () input split sep="/" sep "/" m d if 4 > m:
    print("Heisei")
elif m == 4 and d <= 30:
    print("Heisei")
else:
    print("TBD") 4 > m 4 m print("Heisei") print "Heisei" elif m == 4 and d <= 30:
    print("Heisei") m == 4 and d <= 30 m == 4 m 4 d <= 30 d 30 print("Heisei") print "Heisei" print("TBD") print "TBD" y,m,d = map(int,input().split(sep="/")) map(int,input().split(sep="/")) y d = map(int,input().split(sep="/")) map(int,input().split(sep="/")) d m,d = map(int,input().split(sep="/")) map(int,input().split(sep="/")) m
y,m,d = map(int,input().split(sep="/"))
if 4 > m:
    print("Heisei")
elif m == 4 and d <= 30:
    print("Heisei")
else:
    print("TBD")
