s = input()

year = s[:4]
month = s[5:7]
day = s[8:10]

a_day = int(year + month + day)

if 20190430 < a_day:
    print('TBD')
else:
    print('Heisei') s = input() s input() input year = s[:4] year s[:4] s :4 4 month = s[5:7] month s[5:7] s 5:7 5 7 day = s[8:10] day s[8:10] s 8:10 8 10 a_day = int(year + month + day) a_day int(year + month + day) int year + month + day year + month year month day if 20190430 < a_day:
    print('TBD')
else:
    print('Heisei') 20190430 < a_day 20190430 a_day print('TBD') print 'TBD' print('Heisei') print 'Heisei' year = s[:4] s[:4] year s = input() input() s month = s[5:7] s[5:7] month a_day = int(year + month + day) int(year + month + day) a_day day = s[8:10] s[8:10] day
s = input()

year = s[:4]
month = s[5:7]
day = s[8:10]

a_day = int(year + month + day)

if 20190430 < a_day:
    print('TBD')
else:
    print('Heisei')