# ABC 119: A – Still TBD

s = eval(input())

parts = [int(c) for c in s.split('/')]

print(('Heisei' if parts[0] < 2019 or (parts[0] == 2019 and parts[1] <= 4) else 'TBD'))
# ABC 119: A – Still TBD

s = eval(input())

print(('Heisei' if s <= '2019/04/30' else 'TBD'))
# ABC 119: A – Still TBD
s = eval(input())
parts = [int(c) for c in s.split("/")]
print(("Heisei" if parts[0] < 2019 or (parts[0] == 2019 and parts[1] <= 4) else "TBD"))

# ABC 119: A – Still TBD
s = eval(input())
print(("Heisei" if s <= "2019/04/30" else "TBD"))

-parts = [int(c) for c in s.split("/")] -print(("Heisei" if parts[0] < 2019 or (parts[0] == 2019 and parts[1] <= 4) else "TBD")) +print(("Heisei" if s <= "2019/04/30" else "TBD"))