date = eval(input())



import re

date_num = int(re.sub("\D", "", date))



if date_num <= 20190430:

    print("Heisei")

else:

    print("TBD")
date = int(input().replace("/", ""))

if date <= 20190430:

    print("Heisei")

else:

    print("TBD")
date = eval(input())
import re

date_num = int(re.sub("\D", "", date))
if date_num <= 20190430:
    print("Heisei")
else:
    print("TBD")

date = int(input().replace("/", ""))
if date <= 20190430:
    print("Heisei")
else:
    print("TBD")

-date = eval(input()) -import re - -date_num = int(re.sub("\D", "", date)) -if date_num <= 20190430: +date = int(input().replace("/", "")) +if date <= 20190430: