S = input()

year = int(S[0:4])
month = int(S[5:7])
day = int(S[8:])

if year<=2018:
    ans = 'Heisei'
elif year == 2019:
    if month<=4:
        ans = 'Heisei'
    else:
        ans = 'TBD'
else:
    ans = 'TBD'

print(ans) S = input() S input() input year = int(S[0:4]) year int(S[0:4]) int S[0:4] S 0:4 0 4 month = int(S[5:7]) month int(S[5:7]) int S[5:7] S 5:7 5 7 day = int(S[8:]) day int(S[8:]) int S[8:] S 8: 8 if year<=2018:
    ans = 'Heisei'
elif year == 2019:
    if month<=4:
        ans = 'Heisei'
    else:
        ans = 'TBD'
else:
    ans = 'TBD' year<=2018 year 2018 ans = 'Heisei' ans 'Heisei' elif year == 2019:
    if month<=4:
        ans = 'Heisei'
    else:
        ans = 'TBD' year == 2019 year 2019 if month<=4:
        ans = 'Heisei'
    else:
        ans = 'TBD' month<=4 month 4 ans = 'Heisei' ans 'Heisei' ans = 'TBD' ans 'TBD' ans = 'TBD' ans 'TBD' print(ans) print ans ans = 'Heisei' 'Heisei' ans ans = 'TBD' 'TBD' ans ans = 'Heisei' 'Heisei' ans month = int(S[5:7]) int(S[5:7]) month ans = 'TBD' 'TBD' ans year = int(S[0:4]) int(S[0:4]) year day = int(S[8:]) int(S[8:]) day S = input() input() S
S = input()

year = int(S[0:4])
month = int(S[5:7])
day = int(S[8:])

if year<=2018:
    ans = 'Heisei'
elif year == 2019:
    if month<=4:
        ans = 'Heisei'
    else:
        ans = 'TBD'
else:
    ans = 'TBD'

print(ans)
