s = str(input())

year = ''
for i in range(4):
    y = s[i]
    flag1 = True
    if y == '0':
        if len(year) == 0:
            flag1 = False
        if flag1:
            year += y
    else:
        year += y
year = int(year)

month = ''
for i in range(5, 7):
    m = s[i]
    if i == 5 and m == '0':
        continue
    else:
        month += m
month = int(month)


if year < 2019:
    answer = 'Heisei'

elif year == 2019 and month <= 4:
    answer = 'Heisei'

else:
    answer = 'TBD'

print(answer) s = str(input()) s str(input()) str input() input year = '' year '' for i in range(4):
    y = s[i]
    flag1 = True
    if y == '0':
        if len(year) == 0:
            flag1 = False
        if flag1:
            year += y
    else:
        year += y i range(4) range 4 y = s[i] y s[i] s i flag1 = True flag1 True if y == '0':
        if len(year) == 0:
            flag1 = False
        if flag1:
            year += y
    else:
        year += y y == '0' y '0' if len(year) == 0:
            flag1 = False
         len(year) == 0 len(year) len year 0 flag1 = False flag1 False if flag1:
            year += y
     flag1 year += y year y year += y year y year = int(year) year int(year) int year month = '' month '' for i in range(5, 7):
    m = s[i]
    if i == 5 and m == '0':
        continue
    else:
        month += m i range(5, 7) range 5 7 m = s[i] m s[i] s i if i == 5 and m == '0':
        continue
    else:
        month += m i == 5 and m == '0' i == 5 i 5 m == '0' m '0' continue month += m month m month = int(month) month int(month) int month if year < 2019:
    answer = 'Heisei'

elif year == 2019 and month <= 4:
    answer = 'Heisei'

else:
    answer = 'TBD' year < 2019 year 2019 answer = 'Heisei' answer 'Heisei' elif year == 2019 and month <= 4:
    answer = 'Heisei' year == 2019 and month <= 4 year == 2019 year 2019 month <= 4 month 4 answer = 'Heisei' answer 'Heisei' answer = 'TBD' answer 'TBD' print(answer) print answer month += m m month month = int(month) int(month) month year += y y year flag1 = True True flag1 flag1 = False False flag1 answer = 'Heisei' 'Heisei' answer s = str(input()) str(input()) s month = '' '' month y = s[i] s[i] y year = int(year) int(year) year answer = 'Heisei' 'Heisei' answer year = '' '' year year += y y year answer = 'TBD' 'TBD' answer m = s[i] s[i] m
s = str(input())

year = ''
for i in range(4):
    y = s[i]
    flag1 = True
    if y == '0':
        if len(year) == 0:
            flag1 = False
        if flag1:
            year += y
    else:
        year += y
year = int(year)

month = ''
for i in range(5, 7):
    m = s[i]
    if i == 5 and m == '0':
        continue
    else:
        month += m
month = int(month)


if year < 2019:
    answer = 'Heisei'

elif year == 2019 and month <= 4:
    answer = 'Heisei'

else:
    answer = 'TBD'

print(answer)