import itertools

import math

import fractions

import functools

s = eval(input())

y = int(s[0]) * 1000 + int(s[1]) * 100 + int(s[2]) * 10 + int(s[3])



m = int(s[5]) * 10 + int(s[6])

d = int(s[8]) * 10 + int(s[9])



if (y == 2019 and m > 4) or y >= 2020:

    print('TBD')

else:

    print('Heisei')
s = eval(input())



if s > "2019/04/30":

    print("TBD")

else: print("Heisei")

import itertools
import math
import fractions
import functools

s = eval(input())
y = int(s[0]) * 1000 + int(s[1]) * 100 + int(s[2]) * 10 + int(s[3])
m = int(s[5]) * 10 + int(s[6])
d = int(s[8]) * 10 + int(s[9])
if (y == 2019 and m > 4) or y >= 2020:
    print("TBD")
else:
    print("Heisei")

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

-import itertools -import math -import fractions -import functools - -y = int(s[0]) * 1000 + int(s[1]) * 100 + int(s[2]) * 10 + int(s[3]) -m = int(s[5]) * 10 + int(s[6]) -d = int(s[8]) * 10 + int(s[9]) -if (y == 2019 and m > 4) or y >= 2020: +if s > "2019/04/30":