s = eval(input())

m = s[5:7]





if m=='01'or m=='02' or m=='03' or m=='04':

    print('Heisei')

else:

    print('TBD')
ri = lambda: int(eval(input()))

rl = lambda: list(map(int,input().split()))



s=eval(input())

if s[5:7]<='04':

    print('Heisei')

else:

    print('TBD')
s = eval(input())
m = s[5:7]
if m == "01" or m == "02" or m == "03" or m == "04":
    print("Heisei")
else:
    print("TBD")

ri = lambda: int(eval(input()))
rl = lambda: list(map(int, input().split()))
s = eval(input())
if s[5:7] <= "04":
    print("Heisei")
else:
    print("TBD")

+ri = lambda: int(eval(input())) +rl = lambda: list(map(int, input().split())) -m = s[5:7] -if m == "01" or m == "02" or m == "03" or m == "04": +if s[5:7] <= "04":