s = input().split('/')

if int(s[0]) <= 2019 and int(s[1]) <= 4 and int(s[2]) <= 30:
    print('Heisei')
else:
    print('TBD') s = input().split('/') s input().split('/') ().split () input split '/' if int(s[0]) <= 2019 and int(s[1]) <= 4 and int(s[2]) <= 30:
    print('Heisei')
else:
    print('TBD') int(s[0]) <= 2019 and int(s[1]) <= 4 and int(s[2]) <= 30 int(s[0]) <= 2019 and int(s[1]) <= 4 int(s[0]) <= 2019 int(s[0]) int s[0] s 0 2019 int(s[1]) <= 4 int(s[1]) int s[1] s 1 4 int(s[2]) <= 30 int(s[2]) int s[2] s 2 30 print('Heisei') print 'Heisei' print('TBD') print 'TBD' s = input().split('/') input().split('/') s
s = input().split('/')

if int(s[0]) <= 2019 and int(s[1]) <= 4 and int(s[2]) <= 30:
    print('Heisei')
else:
    print('TBD')
