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

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

if m<=4 and d<=30: print('Heisei')
else: print('TBD')
