a, b, c = list(map(int, input().split("/")))
 
if (b<=4) and (c<=30):
    print("Heisei")
else:
    print("TBD") a, b, c = list(map(int, input().split("/"))) a list(map(int, input().split("/"))) list map(int, input().split("/")) map int input().split("/") ().split () input split "/" b c if (b<=4) and (c<=30):
    print("Heisei")
else:
    print("TBD") (b<=4) and (c<=30) b<=4 b 4 c<=30 c 30 print("Heisei") print "Heisei" print("TBD") print "TBD" a, b, c = list(map(int, input().split("/"))) list(map(int, input().split("/"))) a c = list(map(int, input().split("/"))) list(map(int, input().split("/"))) c b, c = list(map(int, input().split("/"))) list(map(int, input().split("/"))) b
a, b, c = list(map(int, input().split("/")))
 
if (b<=4) and (c<=30):
    print("Heisei")
else:
    print("TBD")