# abc119_a

from datetime import datetime

S=eval(input())

to_dt=datetime.strptime(S,'%Y/%m/%d')

# 2019/04/30

from_dt=datetime(2019,4,30)

# 2019/04/30以前であれば、"Heisei"

# 以降は"TBD"

if to_dt <= from_dt:

 print("Heisei")

else:

 print("TBD")

# abc119_a

year, month, day = list(map(int, input().split("/")))

if month <= 4:

 print("Heisei")

else:

 print("TBD")



"""

from datetime import datetime

S=input()

to_dt=datetime.strptime(S,'%Y/%m/%d')

# 2019/04/30

from_dt=datetime(2019,4,30)

# 2019/04/30以前であれば、"Heisei"

# 以降は"TBD"

if to_dt <= from_dt:

 print("Heisei")

else:

 print("TBD")

"""

# abc119_a
from datetime import datetime

S = eval(input())
to_dt = datetime.strptime(S, "%Y/%m/%d")
# 2019/04/30
from_dt = datetime(2019, 4, 30)
# 2019/04/30以前であれば、"Heisei"
# 以降は"TBD"
if to_dt <= from_dt:
    print("Heisei")
else:
    print("TBD")

# abc119_a
year, month, day = list(map(int, input().split("/")))
if month <= 4:
    print("Heisei")
else:
    print("TBD")
"""
from datetime import datetime
S=input()
to_dt=datetime.strptime(S,'%Y/%m/%d')
# 2019/04/30
from_dt=datetime(2019,4,30)
# 2019/04/30以前であれば、"Heisei"
# 以降は"TBD"
if to_dt <= from_dt:
 print("Heisei")
else:
 print("TBD")
"""

+year, month, day = list(map(int, input().split("/"))) +if month <= 4: +    print("Heisei") +else: +    print("TBD") +""" - -S = eval(input()) -to_dt = datetime.strptime(S, "%Y/%m/%d") +S=input() +to_dt=datetime.strptime(S,'%Y/%m/%d') -from_dt = datetime(2019, 4, 30) +from_dt=datetime(2019,4,30) -    print("Heisei") + print("Heisei") -    print("TBD") + print("TBD") +"""