S = input()
if int(S[:4]) == 2019:
    if int(S[5:7]) == 4:
        if int(S[8:-1]) == 30:
            print('Heisei')
        elif int(S[8:-1]) >= 31:
            print('TBD')
        else:
            print('Heisei')
    elif int(S[5:7]) >= 5:
        print('TBD')
    else:
        print('Heisei')
elif int(S[:4]) >= 2020:
    print('TBD')
else:
    print('Heisei') S = input() S input() input if int(S[:4]) == 2019:
    if int(S[5:7]) == 4:
        if int(S[8:-1]) == 30:
            print('Heisei')
        elif int(S[8:-1]) >= 31:
            print('TBD')
        else:
            print('Heisei')
    elif int(S[5:7]) >= 5:
        print('TBD')
    else:
        print('Heisei')
elif int(S[:4]) >= 2020:
    print('TBD')
else:
    print('Heisei') int(S[:4]) == 2019 int(S[:4]) int S[:4] S :4 4 2019 if int(S[5:7]) == 4:
        if int(S[8:-1]) == 30:
            print('Heisei')
        elif int(S[8:-1]) >= 31:
            print('TBD')
        else:
            print('Heisei')
    elif int(S[5:7]) >= 5:
        print('TBD')
    else:
        print('Heisei') int(S[5:7]) == 4 int(S[5:7]) int S[5:7] S 5:7 5 7 4 if int(S[8:-1]) == 30:
            print('Heisei')
        elif int(S[8:-1]) >= 31:
            print('TBD')
        else:
            print('Heisei')
     int(S[8:-1]) == 30 int(S[8:-1]) int S[8:-1] S 8:-1 8 -1 30 print('Heisei') print 'Heisei' elif int(S[8:-1]) >= 31:
            print('TBD')
         int(S[8:-1]) >= 31 int(S[8:-1]) int S[8:-1] S 8:-1 8 -1 31 print('TBD') print 'TBD' print('Heisei') print 'Heisei' elif int(S[5:7]) >= 5:
        print('TBD')
     int(S[5:7]) >= 5 int(S[5:7]) int S[5:7] S 5:7 5 7 5 print('TBD') print 'TBD' print('Heisei') print 'Heisei' elif int(S[:4]) >= 2020:
    print('TBD') int(S[:4]) >= 2020 int(S[:4]) int S[:4] S :4 4 2020 print('TBD') print 'TBD' print('Heisei') print 'Heisei' S = input() input() S
S = input()
if int(S[:4]) == 2019:
    if int(S[5:7]) == 4:
        if int(S[8:-1]) == 30:
            print('Heisei')
        elif int(S[8:-1]) >= 31:
            print('TBD')
        else:
            print('Heisei')
    elif int(S[5:7]) >= 5:
        print('TBD')
    else:
        print('Heisei')
elif int(S[:4]) >= 2020:
    print('TBD')
else:
    print('Heisei')
