import datetime

H = '2019/04/30'

S = str(eval(input()))

print(('TBD' if H<S else 'Heisei'))
print(('TBD' if '20190430'<str(eval(input())).replace('/','') else 'Heisei'))
import datetime

H = "2019/04/30"
S = str(eval(input()))
print(("TBD" if H < S else "Heisei"))

print(("TBD" if "20190430" < str(eval(input())).replace("/", "") else "Heisei"))

-import datetime - -H = "2019/04/30" -S = str(eval(input())) -print(("TBD" if H < S else "Heisei")) +print(("TBD" if "20190430" < str(eval(input())).replace("/", "") else "Heisei"))