Problem:
 Score : 100 points    Problem Statement You are given a string S as input. This represents a valid date in the year 2019 in the yyyy/mm/dd format. (For example, April 30 , 2019 is represented as 2019/04/30 .)  Write a program that prints Heisei if the date represented by S is not later than April 30 , 2019 , and prints TBD otherwise.      Constraints  S is a string that represents a valid date in the year 2019 in the yyyy/mm/dd format.         Input Input is given from Standard Input in the following format:  S       Output Print Heisei if the date represented by S is not later than April 30 , 2019 , and print TBD otherwise.        Sample Input 1 2019/04/30      Sample Output 1 Heisei       Sample Input 2 2019/11/01      Sample Output 2 TBD

Solution (Python):
import datetime
y,m,d = map(int, input().split('/'))
d_in = datetime.date(y,m,d)
d_border = datetime.date(2019,4,30)
print('TBD' if d_in > d_border else 'Heisei')

Solution (Python):
ymd = int(input().replace("/", ""))

if ymd <= 20190430:
    ans = "Heisei"
else:
    ans = "TBD"

print(ans)

Solution (Python):
S=input()
print('Heisei' if int(S[5])*10+int(S[6])<5 else 'TBD')

Solution (Python):
print(["TBD","Heisei"][int(20190430>=int(str(input()).replace("/","")))])

Solution (Python):
print('Heisei' if input()<='2019/04/30' else 'TBD')

Solution (Python):
S = input()
num = int("1" + S[:4] + S[5:7] + S[8:10])
if num >120190430:
    print("TBD")
else: print("Heisei")

Solution (Python):
s = input()

if s <= "2019/04/30":
    print("Heisei")
else:
    print("TBD")

Solution (Python):
from datetime import datetime
s = input()
inputDate = datetime.strptime(s,'%Y/%m/%d')
heiseiDate = datetime.strptime('20190430','%Y%m%d')

if inputDate > heiseiDate:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
s = input()


def solve(s):
    y, m, d = map(int, s.split("/"))
    if y < 2019:
        return "Heisei"
    if m < 5:
        return "Heisei"
    return "TBD"


print(solve(s))

Solution (Python):
s = input()
if s <= "2019/04/30":
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
s=input().split("/")
m="".join(s)
if int(m)<=20190430:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
s = list(map(int,input().split("/")))
if s[0] <= 2018:
    print("Heisei")
elif s[0] == 2019 and s[1] <= 4 and s[2] <= 30:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
m = list(map(int, input().split('/')))[1]
print('Heisei' if m <= 4 else 'TBD')

Solution (Python):
print("Heisei") if input() <= "2019/04/30" else print("TBD")

Solution (Python):
S = input()
A = []
tmp = ""
for i in S:
    if i == "/":
        A.append(int(tmp))
        tmp = ""
    else:
        tmp += i

A.append(int(tmp))
m = A[1]
d = A[2]

if m <= 4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
source = input().split('/')
year, month, day = int(source[0]), int(source[1]), int(source[2])
if year < 2019:
    print('Heisei')
elif year == 2019:
    if month < 4:
        print('Heisei')
    elif month == 4:
        if day <= 30:
            print('Heisei')
    else:
        print('TBD')
else:
    print('TBD')

Solution (Python):
import sys
input = sys.stdin.readline


S = input().split()
S = list(S[0].split("/"))
Flag = False
if int(S[0]) < 2019:
    Flag = True
elif int(S[1]) <= 4:
    Flag = True
if Flag:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s = input()
print("Heisei" if s[6] < "5" and s[5]=="0" else "TBD")

Solution (Python):
a,b,c=map(int,input().split('/'))
print('Heisei' if b<=4 else 'TBD')

Solution (Python):
print('Heisei' if input()<='2019/04/30' else 'TBD')

Solution (Python):
S=input().split('/')
S_to_int = [int(n) for n in S]
if S_to_int[0]==2019:
  if S_to_int[1]>=5:
    print('TBD')
  if S_to_int[1]==4 and S_to_int[2]<=30:
    print('Heisei')
  if S_to_int[1]<=3:
    print('Heisei')

Solution (Python):
print("Heisei" if int(input().replace("/",""))<=20190430 else "TBD")

Solution (Python):
s = input()
print('Heisei' if s <= '2019/04/30' else 'TBD')

Solution (Python):
S=input()
m=int(S[5]+S[6])
if m <= 4:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
s=input()

print('Heisei' if s<='2019/04/30' else 'TBD')

Solution (Python):


y,m,d = map(int, input().split("/"))

if y <= 2018:
    print("heisei")
elif y > 2020:
    print("TBD")
else: 
    if m <= 4:
        print("Heisei")
    else:
        print("TBD")

Solution (Python):
def main():
    S = list(input().split('/'))

    if int(S[1]) <= 4:
        print('Heisei')
    else:
        print('TBD') 

    

main()

Solution (Python):
s = input()
y, m, d = s.split('/')
y = int(y)
m = int(m)
d = int(d)
if y >= 2019 and m >= 5:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
S = input()
if S <= '2019/04/30':
    print('Heisei')
else:
    print('TBD')

Solution (Python):

S = input()
if int(S.replace("/","")) <= 20190430:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s=input()
print("Heisei" if s<="2019/04/30" else "TBD")

Solution (Python):
S = input()
y, m, d = map(int, S.split("/"))
ans = "TBD"
if y < 2019:
    ans = "Heisei"
elif y == 2019 and m <= 4:
    ans = "Heisei"
print(ans)

Solution (Python):
if int(input()[5:7])<5:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
print('Heisei' if input() <= '2019/04/30' else 'TBD')

Solution (Python):
print('Heisei' if int(''.join(input().split('/'))) <= 20190430 else 'TBD')

Solution (Python):
s = input()

if int(s[6]) >= 5:
    print('TBD')
elif int(s[5]) == 1:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
y,m,d = map(int,input().split("/"))

if y<2019 or (y==2019 and m<4) or (y==2019 and m==4 and d<31):
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

S = input()
S = int("".join(S.split("/")))

if S <= 20190430:
	print("Heisei")
else:
	print("TBD")

Solution (Python):
from datetime import datetime
S = input()

d = datetime.strptime(S, "%Y/%m/%d")
d_kijun = datetime.strptime("2019/04/30", "%Y/%m/%d")

if d <= d_kijun:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
y, m, d = map(int, input().split('/'))
if m > 4:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
a,b,c = map(int,input().split("/"))

if a<2019:
  print('Heisei')
elif a == 2019:
  if b<4:
    print('Heisei')
  elif b==4:
    if c<=30:
      print('Heisei')
    else:
      print('TBD')
  else:
    print('TBD')
else:
  print('TBD')

Solution (Python):
a=input()
print('TBD' if int(a[5:7])>4 else 'Heisei')

Solution (Python):
s=input()
print('Heisei' if s<='2019/04/30' else "TBD")

Solution (Python):
month = int(list(input().split('/'))[1])
if month <= 4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
if int(input()[5:7])<5:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
s = input()
s = s.replace("/","")
s = int(s)
print("Heisei" if s - 20190430 <= 0 else "TBD")

Solution (Python):
from datetime import datetime as dt

a = dt.strptime(str(input()), "%Y/%m/%d")

if a <= dt.strptime('2019/04/30', "%Y/%m/%d"):
  print('Heisei')
else:
  print('TBD')

Solution (Python):
s=list(input())
a=int(s[5])*10+int(s[6])
if(a<5):
    print("Heisei")
else:
    print("TBD")

Solution (Python):
print('Heisei' if input().replace('/','') <= '20190430' else 'TBD')

Solution (Python):
s = input()
d = int(s[:4] + s[5:7] + s[8:10])
if d <= 20190430:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S=input()
print("Heisei" if S<="2019/04/30" else "TBD")

Solution (Python):
S=input()
print("Heisei" if int(S[5:7])<=4 else "TBD")

Solution (Python):
S = int(input().replace("/",""))

if S <= 20190430:
  print("Heisei")
else:
  print("TBD")

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

Solution (Python):
import datetime

s = datetime.datetime.strptime(input(),'%Y/%m/%d')
h = datetime.datetime.strptime('2019/4/30','%Y/%m/%d')

if s <= h:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
_, M, _ = map(int, input().split("/"))
print("TBD") if 5 <= M else print("Heisei")

Solution (Python):
s = input()
if s <= '2019/04/30':
    print('Heisei')
else:
    print('TBD')

Solution (Python):
print('TBD' if int(input().replace('/', '')) > 20190430 else 'Heisei')

Solution (Python):

s = input()



if int(s[5:7])  >= 5:
    print("TBD")
else:
    print("Heisei")

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

Solution (Python):
a,b,c=map(int,input().split("/"))
if a<2019 or a==2019 and b<=4:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
s = int(input().replace('/', ''))
print(['Heisei', 'TBD'][s > 20190430])

Solution (Python):
print("TBD" if input()>"2019/04/30" else "Heisei")

Solution (Python):
s = input()
s = s.split("/")
s[0]=int(s[0])
s[1]=int(s[1])
s[2]=int(s[2])
if s[0]<2019:
	print('Heisei')
elif s[0]==2019 and s[1]<4:
	print('Heisei')
elif s[0]==2019 and s[1]==4 and s[2]<=30:
	print('Heisei')
else:
	print('TBD')

Solution (Python):
def main():
    S = input()
    month = int(S[5:7])
    if month < 5: return "Heisei"
    else: return "TBD"

if __name__ == '__main__':
    print(main())

Solution (Python):
s=input()
if s<='2019/04/30':
  print('Heisei')
else:
  print('TBD')

Solution (Python):
import datetime


def main():
    print("TBD" if datetime.datetime.strptime(input(), '%Y/%m/%d') >
          datetime.datetime.strptime("20190430", '%Y%m%d') else "Heisei")


if __name__ == '__main__':
    main()

Solution (Python):
s = str(input())
datetime = s.split('/')
if int(datetime[0]) >= 2019 and int(datetime[1]) >= 5 and int(datetime[2]) >= 1:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
a = list(map(int,input().split("/")))
if a[0] >= 2020 or (a[0] == 2019 and a[1] >= 5):
  print("TBD")
else:
  print("Heisei")

Solution (Python):
print("Heisei" if input()<="2019/04/30" else "TBD")

Solution (Python):
S=str(input())
if (int(S[0:4])==2019 and int(S[5:7])>=5) or int(S[0:4])>=2020:
  print('TBD')
else:
  print('Heisei')

Solution (Python):
l = str(input()).split('/')
if int(l[0]) < 2019:
    print('Heisei')
elif int(l[0]) == 2019:
    if int(l[1]) < 4:
        print('Heisei')
    elif int(l[1]) == 4 and int(l[2]) <=30:
        print('Heisei')
    else:
        print('TBD')
else:
    print('TBD')

Solution (Python):
ans = "TBD"
S = list(map(int, input().split("/")))
if S[1] <= 4:
    ans = "Heisei"
print(ans)

Solution (Python):
t='2019/04/30'
s=input()
print('Heisei' if s<=t else 'TBD')

Solution (Python):
print("Heisei" if int(input().replace("/", "")) < 20190501 else "TBD")

Solution (Python):
S = input().split("/")
if int(S[1])==4 and int(S[2])<=30:
    print("Heisei")
elif int(S[1])>4:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
s = input()
print('Heisei' if int(s[5]+s[6])<=4 else 'TBD')

Solution (Python):
s = input()
print('Heisei' if s <= '2019/04/30' else 'TBD')

Solution (Python):
s = input()
if int(s[:4]) < 2019 or int(s[5:7]) < 5:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
y, m, d = map(int, input().split('/'))
print('Heisei' if m <= 4 and d <= 30 else 'TBD')

Solution (Python):
y,m,d = map(int,input().split('/'))
print('Heisei' if y<2019 or (y==2019 and m<=4) else 'TBD')

Solution (Python):
s=input()
print("Heisei" if s<="2019/04/30" else "TBD")

Solution (Python):
s = int("".join(input().split("/")))
if s > 20190430:
	print("TBD")
else:
	print("Heisei")

Solution (Python):
s = input()
print("Heisei" if  s <= "2019/04/30" else "TBD" )

Solution (Python):
S = input()
S = S = S[:4]+S[5:7]+S[8:]
if S <= '20190430':
  print('Heisei')
else:
  print('TBD')

Solution (Python):
S = input()
S = S = S[:4]+S[5:7]+S[8:]
if S <= '20190430':
  print('Heisei')
else:
  print('TBD')

Solution (Python):
s=input()

if int(s[6]) >= 5 or int(s[5:7:1]) >=10:
    if int(s[0:4:1]) >= 2019:
        print('TBD')
else:
    print('Heisei')

Solution (Python):
x = list(map(int,input().split("/")))
if x[0]<=2019 and x[1]<=4:
  print("Heisei")
else:
  print("TBD")

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

Solution (Python):
ymd=list(map(int,input().split("/")))
print("Heisei" if ymd<=[2019,4,30] else "TBD")

Solution (Python):
yyyy, mm, dd = map(int, input().split("/"))
if yyyy < 2019:
  print("Heisei")
elif yyyy > 2019:
  print("TBD")
else:
  if mm < 5:
    print("Heisei")
  else:
    print("TBD")

Solution (Python):
ymd=list(map(int,input().split("/")))
print("Heisei" if ymd<=[2019,4,30] else "TBD")

Solution (Python):
N=int(input().replace('/',''))
if N <= 20190430:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()

yyyy, mm, dd = S.split('/')
yyyy = int(yyyy)
mm = int(mm)
dd = int(dd)

if yyyy > 2019:
  print('TBD')

elif yyyy <= 2019:
  if mm <= 4:
    print('Heisei')
  else:
    print('TBD')
else:
  print('TBD')

Solution (Python):
s = input()
d = s.split('/')
if int(d[0]) >= 2019 and int(d[1]) > 4 and int(d[2]) >= 1:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
if(20190430<int("".join(str(e) for e in input().split("/")))):print("TBD")
else:print("Heisei")

Solution (Python):
list1 = [i for i in input().split('/')]

n2=list1[1]

if n2 <= '04':
    print ('Heisei')
else:
    print ('TBD')

Solution (Python):
def heisei():
  print('Heisei')
  exit(0)


def tbd():
  print('TBD')
  exit(0)


s = input()

y = int(s[0:4])
m = int(s[5:7])
d = int(s[8:10])

if y < 2019:
  heisei()
elif y == 2019:
  if m < 4:
    heisei()
  elif m == 4:
    if d <= 30:
      heisei()

tbd()

Solution (Python):
s = input()

print('Heisei' if s <= '2019/04/30' else 'TBD')

Solution (Python):
print("Heisei" if input() <= "2019/04/30" else "TBD")

Solution (Python):


s = input()

def heisei_checker(string):
    if int(string[:4]) >= 2019 and int(string[5:7]) >= 5:
        return "TBD"
    else:
        return "Heisei"


print(heisei_checker(s))

Solution (Python):
s=input()
print("Heisei" if s<="2019/04/30" else "TBD")

Solution (Python):
s=input()

if int(s[6])>4:
  print('TBD')
elif int(s[5])==1:
  print('TBD')
else:
  print('Heisei')

Solution (Python):
print(['Heisei','TBD'][input()>'2019/04/30'])

Solution (Python):
s=str(input())

if int(s[:4])>=2020:
        print('TBD')
else:
        if int(s[:4])<=2018:
                print('Heisei')
        elif int(s[5:7])>=5:
                print('TBD')
        else:
                print('Heisei')

Solution (Python):
s = input()
print("Heisei" if s <= "2019/04/30" else "TBD")

Solution (Python):
y,m,d = map(int,input().split("/"))
print("Heisei" if y < 2019 else "Heisei" if y == 2019 and m < 4 else "Heisei" if y == 2019 and m == 4 and d <= 30 else "TBD")

Solution (Python):
def solve():
    s = input()
    d = int(s.replace("/", ""))
    return "Heisei" if d <= 20190430 else "TBD"


if __name__ == "__main__":
    print(solve())

Solution (Python):
S=input()
print('Heisei' if S <= '2019/04/30' else 'TBD')

Solution (Python):
s=input()

s=s[5:7]

if s[0]=="0":
    s=int(s[1])
    if s>4:
        print("TBD")
    else:
        print("Heisei")
else:
    print("TBD")

Solution (Python):
import math





inputa = input().split("/")


a = int(inputa[0])
b = int(inputa[1])
c = int(inputa[2])




if b < 5:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
def test():
    a = list(map(int,input().split("/")))

    if a[0] <= 2019:
        if a[1] <= 4:
            if a[2] <= 30:
                print("Heisei")
                return
    print("TBD")


if __name__ == "__main__":
    test()

Solution (Python):
s=str(input())
if s<="2019/04/30":
  ans = "Heisei"
else:
  ans = "TBD"
print(ans)

Solution (Python):
S=input()

if S<='2019/04/30':
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s = input()
if int(s[:4]) < 2019 or int(s[5:7]) < 5:
    print('Heisei')
else:
    print('TBD')

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

Solution (Python):
s = str(input())
a = list(map(int,s.split('/')))
if a[1]<=2019 and a[1] <=4 and a[2]<=30:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s = input()
d = s.split('/')
if int(d[0]) >= 2019 and int(d[1]) > 4 and int(d[2]) >= 1:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
S = input()

if int(S[:4]+S[5:7]+S[8:10]) <= 20190430:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
print ("Heisei" if int(input().replace("/","")) <= 20190430 else "TBD")

Solution (Python):
s = input()

day = int(s[0:4])*10000 + int(s[5:7])*100 + int(s[8:])
if day <= 20190430:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
import datetime

y, m, d = map(int, input().split("/"))

s = datetime.date(y, m, d)
boundary = datetime.date(2019, 4, 30)

if s <= boundary:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s = str(input())
day = int(s[5]+s[6]+s[8]+s[9])
if day <= 430:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s = input()
print('Heisei' if s <= "2019/04/30" else 'TBD')

Solution (Python):
_,m,_=map(int, input().split('/'))
if 4 < m:  print('TBD')
else:      print('Heisei')

Solution (Python):
y,m,_=map(int, input().split('/'))
if 2018 < y and 4 < m:
  print('TBD')
else:
  print('Heisei')

Solution (Python):
year,month,day = map(int,input().split("/"))

if year < 2019:
    print("Heisei")
elif year == 2019 and month <= 4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
from datetime import datetime as dt

S = input()
H = dt.strptime("2019/04/30","%Y/%m/%d")
d = dt.strptime(S, "%Y/%m/%d")
print("Heisei" if d<=H else "TBD")

Solution (Python):
import datetime

Date = datetime.datetime.strptime(input(), "%Y/%m/%d")
if Date <= datetime.datetime(2019, 4, 30):
  print("Heisei")
else:
  print("TBD")

Solution (Python):
s = input().split("/")
t = int("".join(s))
if t <= 20190430:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s = input()

if int(s[5:7]) >= 5:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
s = input()
yy = s[:4]
mm = s[5:7]
dd = s[8:10]
if int(yy + mm + dd) <= 20190430:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s = input()
s = s.replace("/","")
if int(s[0:4])<2019:
  print("Heisei")
elif int(s[0:4]) ==2019:
  if int(s[4:6]) <=4:
    print("Heisei")
  else:
    print("TBD")
else:
  print("TBD")

Solution (Python):
y,m,d=map(int, input().split("/"))
if y<2019 or (y==2019 and m<=4 and d<=30):
    print("Heisei")
else:
    print("TBD")

Solution (Python):

import datetime

S = input()
y, m, d = map(int, S.split('/'))

if (datetime.date(y, m, d) <= datetime.date(2019, 4, 30)):
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s = input()
ss = s.split('/')
sss = int(''.join(ss[1:]))

if sss <= 430:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = input()
if int(S[:4]) <= 2019:
  if int(S[5:7]) <= 4:
    if int(S[8:10]) <= 30:
      print("Heisei")
    else:
      print("TBD")
  else:
    print("TBD")
else:
  print("TBD")

Solution (Python):
a = list(map(int,input().split("/")))
if a[1] > 4:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
date = input().split("/")
year = int(date[0])
month = int(date[1])
day = int(date[2])
if (year == 2019 and month <= 4) or year <= 2018:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
a = list(map(int,input().split("/")))
if a[1] > 4:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
print('Heisei' if input() <= '2019/04/30' else 'TBD')

Solution (Python):
s=input()
y=int(s[0:4])
m=int(s[5:7])
d=int(s[8:])
if 100*y+m<=201904:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    S = sys.stdin.readline().rstrip()
    if int(S[5:7]) < 5:
        print("Heisei")
    else:
        print("TBD")

Solution (Python):
s = input()
a = s[5:7]
if int(a) <= 4:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
S = input()
a = S.split("/")
y = int(a[0])
m = int(a[1])
d = int(a[2])

if y<=2018:
	print("Heisei")
elif y==2019 and m<=3:
	print("Heisei")
elif y==2019 and m==4 and d<=30:
	print("Heisei")
else:
	print("TBD")

Solution (Python):
from datetime import datetime
def main():
    S = input()
    S = datetime.strptime(S,'%Y/%m/%d')

    if S <= datetime(2019, 4, 30):
        print('Heisei')
    else:
        print('TBD')



if __name__ == '__main__' :
    main()

Solution (Python):
s=(input().split('/'))
if int(s[0]) > 2019 or int(s[0]) == 2019 and int(s[1]) > 4:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
S = input().split('/')
if int(S[0]) > 2019:
    print('TBD')
elif int(S[0]) < 2019:
    print('Heisei')
else:
    if int(S[1]) > 4:
        print('TBD')
    elif int(S[1]) <= 4:
        print('Heisei')

Solution (Python):
s = input().split('/')

if int(s[0]) <= 2019:
  if int(s[1]) <= 4:
    if int(s[2]) <= 30:
      print("Heisei")
    else:
      print("TBD")
  else:
    print("TBD")
else:
  print("TBD")

Solution (Python):
import datetime

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

i_date = datetime.date(y, m, d)
b_date = datetime.date(2019, 4, 30)

if i_date <= b_date:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = input()
if int((S).replace('/', '')) <= 20190430:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
from datetime import datetime
D = input()
day = datetime.strptime(D, '%Y/%m/%d')

if day <= datetime(2019, 4, 30):
    print('Heisei')
else:
    print('TBD')

Solution (Python):
import datetime
S = input()
D = datetime.datetime.strptime(S, "%Y/%m/%d")
if(D > datetime.datetime(2019,4,30)):
  print("TBD")
else:
  print("Heisei")

Solution (Python):
a,b,c = list(map(int,input().split("/")))
if b*100 + c <= 430:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
a,b,c = map(int,input().split('/'))
print('Heisei') if a<=2019 and b<=4 and c<=30 else print('TBD')

Solution (Python):


S = input()

if int(S[5]+S[6]) >= 5:
    print("TBD")
else:
    print("Heisei")

Solution (Python):


arr = list(map(int,input().split("/")))



flag = False

if arr[0] <= 2019:
    if arr[1] <= 4:
        if arr[2] <= 30:
            flag = True


if not flag:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
S = input()

if S <= '2019/04/30':
  nengou = 'Heisei'
else :
   nengou =  'TBD'

print( nengou)

Solution (Python):
num = input().split('/')
if int(num[0])<2018: print('Heisei')
elif int(num[1])<=4: print('Heisei')
else: print('TBD')

Solution (Python):
S = list(map(int,input().split("/")))
if S[0]<2019:
    print("Heisei")
elif S[0] == 2019 and S[1]<=4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()
if (S[5] == "0") and ((S[6] == "1") or (S[6] == "2") or (S[6] == "3") or (S[6] == "4")):
    print("Heisei")
else:
    print("TBD")

Solution (Python):
Y, M, D = map(int, input().split('/'))
if Y>2019:
    print('TBD')
elif Y==2019 and M>=5:
    print('TBD')
elif Y==2019 and M==4 and D>30:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
y, m, d = map(int, input().split("/"))

if m < 5:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import datetime

s=list(map(int,input().split('/')))

s=datetime.date(s[0],s[1],s[2])
print('Heisei' if s<=datetime.date(2019,4,30) else 'TBD')

Solution (Python):
s = input()

s1 = int(s[5])
s2 = int(s[6])

if s1 == 1:
    print('TBD')
elif s2 <= 4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):

import datetime as dt
s_date = dt.datetime.strptime(input(), '%Y/%m/%d').date()
print('Heisei' if (s_date - dt.date(2019, 4, 30)).days <= 0 else 'TBD')

Solution (Python):
s = input()

s = s.split("/")
temp = ["01", "02", "03", "04"]

if int(s[0]) < 2019:
    print("Heisei")
elif int(s[0]) == 2019 and s[1] in temp:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s=input()
print("Heisei" if int(s[5:7])<5 else "TBD")

Solution (Python):
s=input()
y=int(s[:4])
print("Heisei" if y<2019 or (y==2019 and int(s[5:7])<5) else "TBD")

Solution (Python):
S=str(input())
X=int(S[5:7])
if X>=5:
	print('TBD')
else:
	print('Heisei')

Solution (Python):
y, m, d = (str(_) for _ in input().split('/'))
if int(y) > 2019:
    print('TBD')
elif int(y) == 2019 and int(m) >= 5:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
y,m,d = map(int, input().split('/'))
ans = ''
if y<2019:
  ans = 'Heisei'
elif y==2019:
  if m<4 or (m==4 and d<=30):
    ans = 'Heisei'
  else:
    ans = 'TBD'
else:
  ans = 'TBD'

print(ans)

Solution (Python):
import datetime as dt
s = dt.datetime.strptime(input(), '%Y/%m/%d')
lastD = dt.datetime.strptime('2019/4/30', '%Y/%m/%d')

if s <= lastD:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
import datetime
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    S = sys.stdin.readline().rstrip()
    d = datetime.datetime.strptime(S,"%Y/%m/%d")
    k = "2019/04/30"
    if k >= S:
        print("Heisei")
    else:
        print("TBD")

Solution (Python):
import datetime 
s = datetime.datetime.strptime(input(), "%Y/%m/%d")
given_date = datetime.datetime(2019,4,30)
if s.date() <= given_date.date():
  print("Heisei")
else:
  print("TBD")

Solution (Python):
y,m,d = map(int,input().split("/"))

s = 10000*y+100*m+d
if s < 20190500:
    print("Heisei") 
else:
    print("TBD")

Solution (Python):
s = input()
if int(s[5:7]) < 5:
    print("Heisei")
else:
    print("TBD")

Solution (Python):



S = input()

month = int(S.split('/')[1])

if month <= 4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
y,m,d = [int(i) for i in input().split('/')]

if y < 2019:
    print('Heisei')
elif y > 2019:
    print('TBD')
else:
    if m < 4:
        print('Heisei')
    elif m > 4:
        print('TBD')
    else:
        if d <= 30:
            print('Heisei')
        else:
            print('TBD')

Solution (Python):
s = input()
if int(s[5:7]) <= 4:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
year, month, day = map(int, input().split("/"))
if (year >= 2019) & (month >= 5):
  print("TBD")
else:
  print("Heisei")

Solution (Python):
print("HTeBiDs e i"[int(input().replace("/",""))>20190430::2])

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

Solution (Python):
x = input()
y=x.replace('/','')
if int(y) <=20190430:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
S = str(input())
month = S[5:7]
heisei = ["01","02","03","04"]
if month in heisei:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
S = input().split("/")
year, month, day = map(int, S)
if year < 2019:
    print('Heisei')

elif year > 2019:
    print('TBD')
    
else:
    if month < 5:
        print('Heisei')
    else:
        print('TBD')

Solution (Python):
s = input().split("/")
num = int(s[0]+s[1]+s[2])
if num > 20190430:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
s = [int(i) for i in input().split('/')]

y = s[0]
m = s[1]
d = s[2]

if y < 2019:
	print('Heisei')
elif y > 2019:
	print('TBD')
else:
	if m < 4:
		print('Heisei')
	elif m > 4:
		print('TBD')
	else:
		if d <= 30:
			print('Heisei')
		else:
			print('TBD')

Solution (Python):
print('Heisei' if int(input()[5:7])<=4 else 'TBD')

Solution (Python):
print('Heisei') if int(input()[5:7])<=4 else print('TBD')

Solution (Python):
str_in = input().split('/')

year  = int(str_in[0])
month = int(str_in[1])

if(month >= 5):
  print('TBD')
else:
  print('Heisei')

Solution (Python):
a,b,c=map(int,input().split("/"))
print(["Heisei","TBD"][(a>=2019) & (b>=5)])

Solution (Python):
S = input()

if S<= "2019/04/30":
  print("Heisei")
else:
  print("TBD")

Solution (Python):
s = str(input())
mon = int(s[5:7])
if mon >= 5:
  print('TBD')
else:
  print('Heisei')

Solution (Python):
s=input().split("/")

a=int(s[0])*10000+int(s[1])*100+int(s[2])
                     
if a>20190430:
  print("TBD")
else:
  print("Heisei")

Solution (Python):

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


heisei = False
heisei = heisei or y < 2019
heisei = heisei or y == 2019 and m < 4
heisei = heisei or y == 2019 and m == 4 and d <= 30

print("Heisei" if heisei else "TBD")

Solution (Python):
s = input()

if int(s[5]) == 0:
    month = int(s[6])
else:
    month = int(s[5:7])

if int(s[8]) == 0:
    day = int(s[9])
else:
    day = int(s[8:10])

if month < 4:
    flag = True

elif month == 4 and day < 31:
        flag = True
else:
    flag = False

if flag:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s = input()
if s[5] == "0" and int(s[6]) < 5:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()
y = int(S[0:4])
m = int(S[5:7])
d = int(S[8:10])

isH = True
if y > 2019:
    isH = False
elif y == 2019:
    if m > 4:
        isH = False
    elif m == 4:
        if d > 30:
            isH = False
if isH:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
y,m,d=map(int,input().split('/'))

import datetime as dte

a=dte.datetime(y,m,d)
b=dte.datetime(2019,4,30)

res='TBD'

if a<=b:
	res='Heisei'

print(res)

Solution (Python):
s = input().split("/")

if int(s[1]) >= 5:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
y, m, d = map(int, input().split('/'))
if m < 5:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S=list(map(int,input().split('/')))
if S[1]<=4:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
y, m, d = list(map(int, input().split("/")))

ans = "TBD"
if y < 2019:
    ans = "Heisei"
elif y == 2019 and m <= 4:
    ans = "Heisei"
print(ans)

Solution (Python):
date = input().split("/")
bomb = 0
for d in range(len(date)):
  if d == 0:
    if int(date[d]) < 2019:
      bomb += 1
      break
  elif d == 1:
    if int(date[0]) == 2019:
      if int(date[d]) <= 4:
        bomb += 1
        break
if bomb == 0:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
import datetime

date_str = str(input())
date_formatted = datetime.datetime.strptime(date_str, "%Y/%m/%d")

heisei_end = "2019/04/30"
heisei_end_formatted = datetime.datetime.strptime(heisei_end, "%Y/%m/%d")

print("Heisei" if date_formatted <= heisei_end_formatted else "TBD")