S = list(map(int,input().rstrip().split('/')))
if S[0]>2019:
    print('TBD')
elif S[0]==2019:
    if S[1]>4:
        print('TBD')
    elif S[1]==4:
        if S[2]>30:
            print('TBD')
        else:
            print('Heisei')
    else:
        print('Heisei')
else:
    print('Heisei') S = list(map(int,input().rstrip().split('/'))) S list(map(int,input().rstrip().split('/'))) list map(int,input().rstrip().split('/')) map int input().rstrip().split('/') ().rstrip().split ().rstrip() ().rstrip () input rstrip split '/' if S[0]>2019:
    print('TBD')
elif S[0]==2019:
    if S[1]>4:
        print('TBD')
    elif S[1]==4:
        if S[2]>30:
            print('TBD')
        else:
            print('Heisei')
    else:
        print('Heisei')
else:
    print('Heisei') S[0]>2019 S[0] S 0 2019 print('TBD') print 'TBD' elif S[0]==2019:
    if S[1]>4:
        print('TBD')
    elif S[1]==4:
        if S[2]>30:
            print('TBD')
        else:
            print('Heisei')
    else:
        print('Heisei') S[0]==2019 S[0] S 0 2019 if S[1]>4:
        print('TBD')
    elif S[1]==4:
        if S[2]>30:
            print('TBD')
        else:
            print('Heisei')
    else:
        print('Heisei') S[1]>4 S[1] S 1 4 print('TBD') print 'TBD' elif S[1]==4:
        if S[2]>30:
            print('TBD')
        else:
            print('Heisei')
     S[1]==4 S[1] S 1 4 if S[2]>30:
            print('TBD')
        else:
            print('Heisei')
     S[2]>30 S[2] S 2 30 print('TBD') print 'TBD' print('Heisei') print 'Heisei' print('Heisei') print 'Heisei' print('Heisei') print 'Heisei' S = list(map(int,input().rstrip().split('/'))) list(map(int,input().rstrip().split('/'))) S
S = list(map(int,input().rstrip().split('/')))
if S[0]>2019:
    print('TBD')
elif S[0]==2019:
    if S[1]>4:
        print('TBD')
    elif S[1]==4:
        if S[2]>30:
            print('TBD')
        else:
            print('Heisei')
    else:
        print('Heisei')
else:
    print('Heisei')