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):
s = input()
if s[5] == '1' or s[6] >= '5':
    print("TBD")
else:
    print("Heisei")

Solution (Python):
import datetime

y,m,d = map(int,input().split('/'))
dt1 = datetime.date(y,m,d)
dt2 = datetime.date(2019,4,30)
if dt1 <= dt2:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
from datetime import datetime as dt

S = input()

tdatetime = dt.strptime(S, "%Y/%m/%d")
end_h = dt.strptime("2019/04/30", "%Y/%m/%d")

if tdatetime <= end_h:
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
import datetime 

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

Solution (Python):
day = input().rstrip().split("/")
day = [int(i) for i in day]
if day[0]  <= 2018:
    print("Heisei")
elif day[0] == 2019 and day[1] < 5:
    print("Heisei")
else:
    print("TBD")

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

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

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

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

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

Solution (Python):
import re

date_s = input()

date_l = int(date_s.replace("/", ""))

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

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

if(y > 2019):
    print('TBD')
elif(y == 2019 and m >= 5):
    print('TBD')
else:
    print('Heisei')

Solution (Python):
s = input()
if int(s[0:4]) > 2019:
    print("TBD")
    exit()
if int(s[0:4]) < 2019:
    print("Heisei")

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

Solution (Python):
S=input()
N,M,T=S.split("/")
N=int(N)
M=int(M)
T=int(T)
if(N<2019):
    print("Heisei")
elif(N==2019):
    if(M<=4):
        print("Heisei")
    else:
        print("TBD")
else:
    print("TBD")

Solution (Python):
s = input()
s = s[:4]+s[5:7]+s[8:]

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

Solution (Python):
s=map(int,raw_input().split("/"))
if not (s[0]<=2019 and s[1]<=04 and s[2]<=30):
	print "TBD"
else: print "Heisei"

Solution (Python):
import datetime

s = input()
a = datetime.datetime.strptime(s, '%Y/%m/%d')

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

Solution (Python):

y, m, d = map(int, input().split("/"))
heisei = 0
if y <= 2019:
    heisei += 1
    if m <= 4:
        heisei += 1
        if d >= 30:
            heisei += 1
if heisei > 1:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
a = str(input())
list = a.split('/')
output = 'TBD'
if(int(list[0])<=2019):
  if(int(list[1])<=4):
    if(int(list[2])<=30):
      output = 'Heisei'
print(output)

Solution (Python):
def main():
    s=input()
    mm = int(s[5:7])
    
    if mm > 4:
        print('TBD')
        return
    elif mm <= 4:
        print('Heisei')
        return

main()

Solution (Python):
a, b, c = [int(i) for i in input().split("/")]
if a == 2019 and b > 4:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
from sys import stdin

A,B,C=[int(x) for x in stdin.readline().rstrip().split('/')]
if A <2019:
  print('Heisei')
elif A==2019:
  if B<=4:
  	print('Heisei')
  else:
    print('TBD')
else:
  print('TBD')

Solution (Python):
from sys import stdin


def heisei_or_tbd(date_string):
    year, month, day = date_string.split('/')
    int_date = int(year+month+day)
    
    if int_date <= 20190430:
        return 'Heisei'
    else:
        return 'TBD'


def main():
    input_line = stdin.readline().rstrip()
    answer = heisei_or_tbd(input_line)
    print(answer)


if __name__ == '__main__':
    main()

Solution (Python):
from datetime import datetime as dt

tstr = input()
tdatetime = dt.strptime(tstr, '%Y/%m/%d')

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

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

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

Solution (Python):



s = input().split("/")
if int(s[1]) <= 4:
    print("Heisei")
else:
    print("TBD")


"""
n = int(input())
ans = 0
for i in range(n):
    a = input().split()
    if a[1] == "JPY":
        ans += int(a[0])
    else:
        ans +=  float(a[0]) * 380000
print(ans)
"""

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


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

Solution (Python):
HEISEI = 'Heisei'
TBD = 'TBD'

def main():
    s = input()
    s = s.split('/')
    year = int(s[0])
    month = int(s[1])
    day = int(s[2])
    if year > 2019:
        print(TBD)
    elif year < 2019:
        print(HEISEI)
    else:
        if month > 4:
            print(TBD)
        else:
            if day > 30:
                print(TBD)
            else:
                print(HEISEI)
main()

Solution (Python):
print("TBD"if[int(s) for s in input().split("/")]>[2019,4,31]else"Heisei")

Solution (Python):

S = input()
if int(S[:4]) <2019 or (int(S[:4]) ==2019 and int(S[5:7])<4) or (int(S[:4]) ==2019 and int(S[5:7])==4 and int(S[-2:])<=30):
    print('Heisei')
else :
    print('TBD')

Solution (Python):
Y,M,D=map(int,input().split("/"))

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

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

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

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

if y < 2019:
    print('Heisei')
elif y == 2019:
    if m < 5:
        print('Heisei')
    else:
        print('TBD')
else:
    print('TBD')

Solution (Python):


S = input()

year, month, day = map(int, S.split("/"))

h = "Heisei"
t = "TBD"

if year < 2019:
    output = h
elif year == 2019:
    if month < 4:
        output = h
    elif month == 4:
        output = h
    else:
        output = t
else:
    output = t

print(output)

Solution (Python):
s = input()
y = int(s[0:4])
m = int(s[5:7])
d = int(s[9:11])
if y <= 2019 and m <= 4 and d <= 30:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s = input()
word = s.split("/")
for i in range(3):
    word[i] = int(word[i])
if word[0] <= 2018:
    print('Heisei')
elif word[0] > 2020:
    print('TBD')
else:
    if word[1] <= 4:
        if word[2] <= 30:
            print('Heisei')
        else:
            print('TBD')
    else:
        print('TBD')

Solution (Python):
s = input()
y = int(s[0:4])
m = int(s[5:7])
d = int(s[-2:])
if y < 2019 or y == 2019 and m <= 4:
    print('Heisei')
else:
    print('TBD')

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

Solution (Python):
import datetime

input = input()

dte = datetime.datetime.strptime(input, '%Y/%m/%d')

if dte < datetime.datetime(2019, 5, 1):
  print('Heisei')
else:
  print('TBD')

Solution (Python):
s = input()
li = s.split('/')
date = int(li[0])*10000 + int(li[1])*100 + int(li[2])
if date <= 20190430:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s=input()

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

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

flag=0
if 2019 < y:
  flag=1
elif 2019 == y:
  if 5<=m:
    flag=1

print('Heisei' if flag==0 else 'TBD')

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

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

Solution (Python):
y, m, d = map(int, input().split('/'))
c1 = y >= 2020
c2 = y == 2019 and m >= 5
if c1 or c2:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
s =list(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])
if y < 2019:
    print('Heisei')
elif y > 2019:
    print('TBD')
else:
    if m <= 4:
        print('Heisei')
    elif m > 4:
        print('TBD')

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

if dt[0] >= 2019 and dt[1] >= 5:
    print("TBD")
else :
    print("Heisei")

Solution (Python):
S = input()

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

Solution (Python):


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

if a[0]==2019 and a[1]>4:
  print("TBD")
elif a[0]>2019:
  print("TBD")
else:
  print("Heisei")

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

Solution (Python):
import sys

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

if y < 2019:
    print("Heisei")
    sys.exit()
elif m < 5:
    print("Heisei")
    sys.exit()

else:
    print("TBD")

Solution (Python):
if "201905" > input().replace("/","")[:6]:
    print("Heisei")
else:
    print("TBD")

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

if y < 2019:
    flag = 1
elif y == 2019:
    if m <= 4:
        flag = 1

print(["TBD", "Heisei"][flag])

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

Solution (Python):
a = input()
b = a.split("/")
if (int(b[0]) <= 2019):
  if(int(b[1])<=4):
    print("Heisei")
  else:
    print("TBD")
else:
    print("TBD")

Solution (Python):
import datetime
S = str(input())
S_formatted = datetime.datetime.strptime(S, "%Y/%m/%d")
start_of_tbd = datetime.datetime(2019,5,1,0,0,0)
if S_formatted.date() < start_of_tbd.date():
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
from datetime import datetime

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

dt = datetime(y, m, d)

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

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

Solution (Python):
from datetime import datetime

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

Solution (Python):
S = input()

l = S.split('/')

if int(l[0]) < 2019:
    print('Heisei')
elif int(l[1]) < 5:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
from datetime import datetime

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

d1 = datetime(year=y, month=m, day=d)
d2 = datetime(year=2019, month=4, day=30)

if d1 <= d2:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
S = input()

year, month, day = [int(item) for item in S.split('/')]

if (int(year) >= 2019) & (int(month) >= 5):
	print('TBD')
else:
	print('Heisei')

Solution (Python):
from datetime import datetime as dt

date = dt.strptime(input(), '%Y/%m/%d')

Heisei = dt.strptime("2019/04/30", '%Y/%m/%d')

if date <= Heisei:
    print("Heisei")
else:
    print("TBD")

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

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

if y < 2019:
	print("Heisei")
elif y > 2019:
	print("TBD")
elif m <= 4:
	print("Heisei")
elif m >= 5:
	print("TBD")

Solution (Python):
s = str(input())
y = int(s[:4])
m = int(s[5:7])
d = int(s[8:10])
if y >= 2019:
  if m >=5:
    print("TBD")
  else:
    print("Heisei")

Solution (Python):
s = input()
if (int(s[0:4]) < 2019):
    print("Heisei")
elif (int(s[0:4]) > 2019):
    print("TBD")
else:
    if (s[5:7] == "01" or s[5:7] == "02" or s[5:7] == "03" or s[5:7] == "04"):
        print("Heisei")
    else:
        print("TBD")

Solution (Python):
from datetime import datetime

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

Solution (Python):
input_raw = input() 
str_list = input_raw.split("/")

yyyymmdd = int(str_list[0]) * 10000 + int(str_list[1]) * 100 + int(str_list[2])

if yyyymmdd <= 20190430:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
import datetime
chk_date = datetime.datetime.strptime("2019/4/30", "%Y/%m/%d")

S = input()
inp_date = datetime.datetime.strptime(S, "%Y/%m/%d")

if inp_date <= chk_date:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
S = input()
y = int(S[0:4])
m = int(S[5:7])
d = int(S[8:10])
heisei_flag = 0
if y < 2018:
    heisei_flag = 1
elif y == 2019 and m <= 4:
    heisei_flag = 1

if heisei_flag == 1:
    print('Heisei')
else:
    print('TBD')

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

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

if s[0] >= 2020:
    print('TBD')
elif s[0] == 2019 and s[1] >= 5:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
year, month, day = map(int, input().split('/'))
if (year < 2019):
  print('Heisei')
elif (year > 2019):
  print('TBD')
else:
  if (month <= 4):
    print('Heisei')
  else:
    print('TBD')

Solution (Python):
S = input()
m = int(S[-5:-3])
d = int(S[-2:])

def f(m, d):
    if m >= 5:
        return False
    elif m < 4:
        return True
    else:
        return d <= 30


print("Heisei" if f(m, d) else "TBD")

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

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

if a<2019:
    print("Heisei")
elif a>2019:
    print("TBD")
else :
    if b<5:
        print("Heisei")
    else:
        print("TBD")

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

Solution (Python):
s = list(input())
a = s[:4]
b = s[5:7]
c = s[8:10]

year = ''.join(a)
year = int(year)

month = ''.join(b)
month = int(month)

day = ''.join(c)
day = int(day)

if year > 2018:
    if month > 4:
        print('TBD')
    else:
        print('Heisei')
else:
    print('Heisei')

Solution (Python):
s = list(map(int, input().split("/")))
ans = "Heisei"
if s[0] > 2019:
    ans = "TBD"
if s[0] >= 2019 and s[1] >= 5 and s[2] >= 1:
    ans = "TBD"
print(ans)

Solution (Python):
def main():
    x, y, z = (int(i) for i in input().split('/'))

    if(x>2019):
        print("TBD")
        return
    elif(y>4):
        print("TBD")
        return
    elif(z>30):
        print("TBD")
        return
    else:
        print("Heisei")
        return

if __name__ == "__main__":
    main()

Solution (Python):


import math
import sys
import itertools
import numpy as np




a = list(input())

y=int(a[0])*1000+int(a[1])*100+int(a[2])*10+int(a[3])
m=int(a[5])*10+int(a[6])
d=int(a[8])*10+int(a[9])



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

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

year = int(s[0:4])
month = int (s[5:7])
day = int(s[8:10])

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

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

if int(y) > 2019:
    print("TBD")
    exit()
if int(m) > 4:
    print("TBD")
    exit()
if int(d) > 30:
    print("TBD")
    exit()

print("Heisei")

Solution (Python):
a = list(input())

b = a[0:4]

c = a[5:7]

d = a[8:10]

su = 0
bb = 0
cc =0
dd = 0
for i in range(4):
	bb = 10*bb + int(b[i])
for i in range(2):
	cc = 10*cc + int(c[i])
for i in range(2):
	dd = 10*dd + int(d[i])


if bb == 2019:
	if cc >= 5:
		print("TBD")
	elif cc == 4:
		if dd == 30:
			print("Heisei")
		else:
			print("Heisei")
	else:
		print("Heisei")
elif bb > 2019:
	print("TBD")
else:
	print("Heisei")

Solution (Python):
s=input()

year,m,d=s.split('/')
year=int(year)
m=int(m)
d=int(d)

if( year > 2020 or (year==2019 and m > 4 )):
    print("TBD")
else:
    print("Heisei")

Solution (Python):
S = input()
yyyy = S[0:4]
mm = S[5:7]
dd = S[8:10]

yyyymmdd = int(yyyy + mm + dd)

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

Solution (Python):
year,month,date = list(map(int, input().split('/')))
if year < 2019:
	print("Heisei")
elif year == 2019 and month < 5:
	print("Heisei")
else:
	print("TBD")

Solution (Python):
import datetime
S = input()
y, m, d = [int(x) for x in S.split("/")]
s = datetime.datetime(y, m, d, 0, 0)
ss = datetime.datetime(2019, 4, 30, 0, 0)

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

Solution (Python):
s=input()
m=s[5:7]
d=s[-2:]
if m[0]=="0":
    m=int(m[1])
else:
    m=int(m)
if d[0]=="0":
    d=int(d[1])
else:
    d=int(d)
if m<=4:
    print("Heisei")
else:
    print("TBD")

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

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

t = datetime(y,m,d)
t2 = datetime(2019,4,30)

if t <= t2:
    print("Heisei")

else:
    print("TBD")

Solution (Python):
import datetime

s = input()


th =  datetime.datetime.strptime("2019/04/30","%Y/%m/%d")
dt = datetime.datetime.strptime(s,"%Y/%m/%d")

if dt <= th:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
def inpl():
    return list(map(int, input().split("/")))


y, m, d = inpl()
if m < 5:
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
from datetime import datetime, date

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

Solution (Python):
import datetime

heisei = datetime.date(2019, 4, 30)
y, m, d = map(int, input().split('/'))
s = datetime.date(y, m, d)

if s > heisei:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
import numpy as np
from collections import defaultdict






S = input().split('/')




if (int(S[0]) == 2019 and int(S[1]) >= 5) or int(S[0]) >= 2020:
    print("TBD")
else:
    print("Heisei")

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

Solution (Python):


import sys

def _main():
    
    
    text = input()
    datelist = text.split('/')
    year, month, day = [int(i) for i in datelist]

    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')
    else:
        print('TBD')

if __name__ == '__main__':
    _main()

Solution (Python):
s = input()

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

Solution (Python):

import re
from datetime import datetime as dt
if __name__ == '__main__':
    s = dt.strptime(raw_input(), '%Y/%m/%d')
    a = dt(2019, 4, 30, 0, 0,0)
    if (s - a).days <= 0:
        print 'Heisei'
    else:
        print 'TBD'

Solution (Python):
S = input()

S = int(S.replace("/" , ""))

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

Solution (Python):
import datetime
raw_date = input()
dates = list(map(int,raw_date.split("/")))
date = datetime.date(*dates)
deadline = datetime.date(2019,5,1)
if date >= deadline:
    print("TBD")
else:
    print("Heisei")

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

    if month > 4:
        print('TBD')
    else:
        print('Heisei')


if __name__ == '__main__':
    main()

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

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

Solution (Python):
Y, M, D = map(int, input().split("/"))

if Y < 2019:
    print("Heisei")
    exit()
if Y == 2019 :
    if M <= 4:
        print("Heisei")
        exit()
    if M == 4:
        if D <= 30:
            print("Heisei")
            exit()

print("TBD")

Solution (Python):
import datetime

i = datetime.datetime.strptime(input(), '%Y/%m/%d')


if i.year <= 2019 and i.month <= 4 and i.day <= 30:
    print("Heisei")
else:
    print("TBD")

Solution (Python):

S = input()
m = int(S[5:7])
d = int(S[8:])

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

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

Solution (Python):
a = input().rstrip().split("/")
if(int(a[1]) <=4):
    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 = list(input())
SList=S[0:4]+S[5:7]+S[8:]
Sint=int(''.join(SList))

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

Solution (Python):
year,month,day = input().split('/')

if int(year) >= 2019 :
	if int(month) >= 5 :
		print('TBD')
		exit()
	else:
		print('Heisei')
		exit()
	print('TBD')
	exit()
else:
	print('Heisei')
	exit()

Solution (Python):
import datetime
date = list(map(int,input().split("/")))
date2 = datetime.datetime(date[0],date[1],date[2])
date3 = datetime.datetime(2019,4,30)
if date2 > date3:
    print("TBD")
else:
    print("Heisei")

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

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

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

Solution (Python):
from datetime import datetime

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

Solution (Python):

s = input()
S = s.split('/')

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

Solution (Python):
s = input().split('/')
heisei = True
if int(s[0]) > 2019:
    heisei = False
if int(s[0]) == 2019:
    if int(s[1]) >= 5:
        heisei = False
print('Heisei' if heisei else 'TBD')

Solution (Python):
S = input()

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

if y == 2019 and m <= 4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
y, m, d = input().split('/')
border = 20190430
date = int(y+m+d)
if border >= date:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = input()
k = S[5]+S[6]
if k == '01' or k == '02' or k == '03' or k == '04':
  print('Heisei')
else:
  print('TBD')

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

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

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

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

Solution (Python):
s = list(input().split("/"))
flag = int(s[1]) >= 5
print("TBD" if flag else "Heisei")

Solution (Python):
s = input()


if int(s[5:7]) <= 4 and int(s[8:10]) <= 30:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()

a = int(S[0:4])
b = int(S[5:7])
c = int(S[8:10])

if a < 2019:
    print("Heisei")
elif a == 2019:
    if b <= 4:
        print("Heisei")
    else:
        print("TBD")
else:
    print("TBD")

Solution (Python):
a,b,c=map(int,input().split("/"))
if a<2018:
    print("Heisei")

elif a==2019 and b<=4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):


"""
Created on 2019/2/24
Solved on 2019/2/24
@author: shinjisu
"""



def getInt(): return int(input())


def getIntList(): return [int(x) for x in input().split()]


def zeros(n): return [0]*n


def getIntLines(n): return [int(input()) for i in range(n)]


def getIntMat(n):
    mat = []
    for i in range(n):
        mat.append(getIntList())
    return mat


def zeros2(n, m): return [zeros(m)]*n


ALPHABET = [chr(i+ord('a')) for i in range(26)]
DIGIT = [chr(i+ord('0')) for i in range(10)]
N1097 = 10**9 + 7


def dmp(x, cmt=''):
    global debug
    if debug:
        if cmt != '':
            print(cmt, ':  ', end='')
        print(x)
    return x


def probA():
    S = input()
    dmp(S)
    y = int(S[0:4])
    m = int(S[5:7])
    d = int(S[8:10])
    dmp((y,m,d))
    HEI = 'Heisei'
    if y <= 2018:
        return HEI
    if m <= 4:
        return HEI
    else:
        return 'TBD'


debug = False  
print(probA())


def probB():
    N, M = getIntList()
    A = getIntMat(N)
    dmp((N, M))
    dmp(A)
    food = set([])
    food = set(A[0][1:])
    dmp(food)
    for i in range(N):
        food2 = set(A[i][1:])
        food = food & food2
        dmp(food)
    return len(food)


def gcd(x, y):  
    m = max(x, y)
    n = min(x, y)
    while m % n != 0:
        w = m % n
        m = n
        n = w
    return n


def probC():
    N = getInt()
    A = getIntList()
    dmp((N, A))
    hp = A[N-1]
    for i in range(N-1):
        hp = gcd(hp, A[i])
        dmp(hp)
    return hp


def probD():
    N, M = getIntList()
    A = getIntList()
    dmp((N, M))
    dmp(A)
    return num

Solution (Python):
S = list(map(int, input().split("/")))

if S[0] < 2019:
    print("Heisei")
elif S[0] == 2019:
    if S[1]<=4:
        print("Heisei")
    else:
        print("TBD")
else:
    print("TBD")

Solution (Python):
S = input()
S1 = S[0:4]
if int(S1) < 2019:
    print("Heisei")
else:
    if int(S[5:7]) >= 5:
        print("TBD")
    elif int(S[6]) < 5:
        print("Heisei")

Solution (Python):

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

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

Solution (Python):
from datetime import datetime

date_str = input()
date = datetime.strptime(date_str, '%Y/%m/%d')

if date <= datetime(2019, 4, 30):
	print("Heisei")
else:
	print("TBD")

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

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

Solution (Python):
date = input().split("/")
sum = int(date[0]) * 365 + int(date[1]) * 30 + int(date[2])

if 737085 < sum:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
s = input().strip()
s_replaced = s.replace('/', '')
s_int = int(s_replaced)

if s_int > 20190430:
  print('TBD')
else:
  print('Heisei')

Solution (Python):
array = list(map(int, input().strip().split('/')))

if array[0] < 2019:
  print("Heisei")
elif array[0] == 2019:
  if array[1] <= 4:
    print("Heisei")
  else:
    print("TBD")
else:
  print("TBD")

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

y,m,d = [int(x) for x in input().split('/')]
if y <= 2018:
    print('Heisei')
elif y == 2019 and m <= 4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
day = list(map(int, raw_input().split("/")))

if day[0] > 2019: print 'TBD'
elif day[0] < 2019: print 'Heisei'
elif day[1] > 4: print 'TBD'
elif day[1] < 4: print 'Heisei'
elif day[2] <= 30: print 'Heisei'
else: print 'TBD'

Solution (Python):
S = input()
year = int(S[0:4])
month = int(S[5:7])
day = int(S[8:10])

isBefore = False
if year < 2019:
    isBefore = True
elif year == 2019:
    if month < 4:
        isBefore = True
    elif month == 4:
        if day <= 30:
            isBefore = True

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

Solution (Python):


def main():
    arr = list(map(lambda x: int(x), input().split("/")))
    if arr[1] > 4:
        print("TBD")
    else:
        print("Heisei")

main()

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

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

b,c,d=map(str,a.split())

if(c=="01" or c=="02" or c=="03" or c=="04"):
  print("Heisei")
else:
  print("TBD")

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

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


if int(S[0])>2019:
    print("TBD")
    exit()
elif int(S[0])==2019:
    if int(S[1])>4:
        print("TBD")
        exit()
    else:
        print("Heisei")
        exit()
else:
    print("Heisei")
    exit()

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

Solution (Python):
S = input()

def f(s):
    y, m, d = [int(i) for i in s.split("/")]
    if y == 2019:
        if m == 4:
            if d == 30:
                return True
            else:
                return d < 30
        else:
            return m < 4
    else:
        return y < 2019

print("Heisei" if f(S) else "TBD")

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