S = eval(input())

m = S[5:7]

if int(m) <= 4:

    print('Heisei')

else:

    print('TBD')
y, m, d = list(map(int, input().split('/')))

if int(m) <= 4:

    print('Heisei')

else:

    print('TBD')
S = eval(input())
m = S[5:7]
if int(m) <= 4:
    print("Heisei")
else:
    print("TBD")

y, m, d = list(map(int, input().split("/")))
if int(m) <= 4:
    print("Heisei")
else:
    print("TBD")

-S = eval(input()) -m = S[5:7] +y, m, d = list(map(int, input().split("/")))