y, m, d = list(map(int, input().split("/")))

if y <= 2018:

    heisei = True

elif y == 2019 and m <= 4:

    heisei = True

else:

    heisei = False

if heisei:

    print("Heisei")

else:

    print("TBD")

S = eval(input())

if S > "2019/04/30":

    print("TBD")

else:

    print("Heisei")

y, m, d = list(map(int, input().split("/")))
if y <= 2018:
    heisei = True
elif y == 2019 and m <= 4:
    heisei = True
else:
    heisei = False
if heisei:
    print("Heisei")
else:
    print("TBD")

S = eval(input())
if S > "2019/04/30":
    print("TBD")
else:
    print("Heisei")

-y, m, d = list(map(int, input().split("/"))) -if y <= 2018: -    heisei = True -elif y == 2019 and m <= 4: -    heisei = True +S = eval(input()) +if S > "2019/04/30": +    print("TBD") -    heisei = False -if heisei: -else: -    print("TBD")