# n=int(input())
# a,b=map(int,input().split())
# l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
s = input()

month = int(s[5:7])
if month < 4:
    ans = 'Heisei'
elif month == 4:
    day = int(s[8:])
    if day <= 30:
        ans = 'Heisei'
else:
    ans = 'TBD'
print(ans) s = input() s input() input month = int(s[5:7]) month int(s[5:7]) int s[5:7] s 5:7 5 7 if month < 4:
    ans = 'Heisei'
elif month == 4:
    day = int(s[8:])
    if day <= 30:
        ans = 'Heisei'
else:
    ans = 'TBD' month < 4 month 4 ans = 'Heisei' ans 'Heisei' elif month == 4:
    day = int(s[8:])
    if day <= 30:
        ans = 'Heisei' month == 4 month 4 day = int(s[8:]) day int(s[8:]) int s[8:] s 8: 8 if day <= 30:
        ans = 'Heisei' day <= 30 day 30 ans = 'Heisei' ans 'Heisei' ans = 'TBD' ans 'TBD' print(ans) print ans s = input() input() s ans = 'Heisei' 'Heisei' ans ans = 'Heisei' 'Heisei' ans ans = 'TBD' 'TBD' ans day = int(s[8:]) int(s[8:]) day month = int(s[5:7]) int(s[5:7]) month
# n=int(input())
# a,b=map(int,input().split())
# l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
s = input()

month = int(s[5:7])
if month < 4:
    ans = 'Heisei'
elif month == 4:
    day = int(s[8:])
    if day <= 30:
        ans = 'Heisei'
else:
    ans = 'TBD'
print(ans)
