s=str(input())
ans="TBD"
if int(s[:4])>2019:
    ans="Heisei"
    
elif int(s[:4])==2019:
    if int(s[5:7])<=4:
        if int(s[8:])<=30:
            ans="Heisei"
print(ans) s=str(input()) s str(input()) str input() input ans="TBD" ans "TBD" if int(s[:4])>2019:
    ans="Heisei"
    
elif int(s[:4])==2019:
    if int(s[5:7])<=4:
        if int(s[8:])<=30:
            ans="Heisei" int(s[:4])>2019 int(s[:4]) int s[:4] s :4 4 2019 ans="Heisei" ans "Heisei" elif int(s[:4])==2019:
    if int(s[5:7])<=4:
        if int(s[8:])<=30:
            ans="Heisei" int(s[:4])==2019 int(s[:4]) int s[:4] s :4 4 2019 if int(s[5:7])<=4:
        if int(s[8:])<=30:
            ans="Heisei" int(s[5:7])<=4 int(s[5:7]) int s[5:7] s 5:7 5 7 4 if int(s[8:])<=30:
            ans="Heisei" int(s[8:])<=30 int(s[8:]) int s[8:] s 8: 8 30 ans="Heisei" ans "Heisei" print(ans) print ans ans="TBD" "TBD" ans ans="Heisei" "Heisei" ans ans="Heisei" "Heisei" ans s=str(input()) str(input()) s
s=str(input())
ans="TBD"
if int(s[:4])>2019:
    ans="Heisei"
    
elif int(s[:4])==2019:
    if int(s[5:7])<=4:
        if int(s[8:])<=30:
            ans="Heisei"
print(ans)