y, m, d = map(int, input().split("/"))
flg = True
if y >= 2020:
    flg = False
if y == 2019 and m >= 5:
    flg = False
print("Heisei" if flg else "TBD") y, m, d = map(int, input().split("/")) y map(int, input().split("/")) map int input().split("/") ().split () input split "/" m d flg = True flg True if y >= 2020:
    flg = False y >= 2020 y 2020 flg = False flg False if y == 2019 and m >= 5:
    flg = False y == 2019 and m >= 5 y == 2019 y 2019 m >= 5 m 5 flg = False flg False print("Heisei" if flg else "TBD") print "Heisei" if flg else "TBD" flg "Heisei" "TBD" y, m, d = map(int, input().split("/")) map(int, input().split("/")) y flg = False False flg m, d = map(int, input().split("/")) map(int, input().split("/")) m d = map(int, input().split("/")) map(int, input().split("/")) d flg = False False flg flg = True True flg
y, m, d = map(int, input().split("/"))
flg = True
if y >= 2020:
    flg = False
if y == 2019 and m >= 5:
    flg = False
print("Heisei" if flg else "TBD")
