y,m,d = map(int, input().split("/"))

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

if y == 2019:
    if m < 4:
        print ("Heisei")
        exit ()
    elif m == 4:
        if d <= 30:
            print ("Heisei")
            exit ()
    else:
        pass

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

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

if y == 2019:
    if m < 4:
        print ("Heisei")
        exit ()
    elif m == 4:
        if d <= 30:
            print ("Heisei")
            exit ()
    else:
        pass

print ("TBD")
