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 numpy


m = list(map(int, input().split("/")))
r = 'Heisei' if m[0] * 10000 + m[1]  * 100 + m[2] <= 20190430 else 'TBD'

print(r)

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

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

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

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

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

Solution (Python):
s = input().split('/')
date = ''
for i in s:
    date += i
print('Heisei') if int(date) <=20190430 else print('TBD')

Solution (Python):
S = input()
Y = S[0:4]
M = S[5:7]
D = S[8:10]
if int(Y)<2019:
  print("Heisei")
elif int(M) < 5 and int(Y) == 2019:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
l=list(map(int,input().split('/')))
from datetime import *
a=date(2019,4,30)
b=date(l[0],l[1],l[2])
if a<b:
    print('TBD')
else:
    print('Heisei')

Solution (Python):

from collections import defaultdict
from heapq import heappush, heappop
import math
import bisect
import random
def LI(): return list(map(int, input().split()))
def I(): return int(input())
def LS(): return input().split()
def S(): return list(input())
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
mod = 1000000007


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

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

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

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

Solution (Python):
date = list(map(int,input().split("/")))
year = date[0]
manth = date[1]
day = date[2]

if manth >= 5:
    print("TBD")
else:
    print("Heisei")

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

heisei=20190430
input_kai=int(input[0].zfill(4)+input[1].zfill(2)+input[2].zfill(2))

if input_kai<=heisei:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
if __name__ == "__main__":
    y, m, d = [int(i) for i in input().split(sep="/")]
    if y > 2019:
        print("TBD")
    elif y == 2019:
        if m >= 5:
            print("TBD")
        else:
            print("Heisei")
    else:
        print("Heisei")

Solution (Python):
import datetime

inp = str(input())
dateHeiseiEnd = datetime.datetime(2019, 5, 1, 0, 0, 0)
dateInput = datetime.datetime.strptime(inp, "%Y/%m/%d")

if dateInput < dateHeiseiEnd:
	print("Heisei")
else:
	print("TBD")

Solution (Python):
s = input()

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):
S = str(input()).split('/')
S_ = [int(x) for x in S]
if(S_[0]<=2019 and S_[1]<=4 and S_[2]<=30):
  print("Heisei")
else:
  print("TBD")

Solution (Python):

import sys

def io_generator():
	while True:
		yield raw_input()



def main(io):
	s=io.next()
	ret='Heisei' if s < '2019/04/31' else 'TBD'
	return ret




if __name__ == "__main__":
	io=io_generator()
	print main(io)

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

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

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

Solution (Python):


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

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

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

Solution (Python):
S=input()
tuki=int(S[5:7])
hi=int(S[8:10])
if tuki>=5:
  print("TBD")
else:
  print("Heisei")

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

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

Solution (Python):



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

heisei_flag = False
if year < 2019:
   heisei_flag = True
else:
    if month <= 4:
       heisei_flag = True
if heisei_flag:
   print('Heisei')
else:
   print('TBD')

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

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

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

Solution (Python):
S = input()

if 2019 < int(S[0:4]):
    print('TBD')

elif 2019 == int(S[0:4]):

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

else:
    print('Heisei')

Solution (Python):

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

ymd = y * 10000 + m * 100 + d

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

Solution (Python):
from sys import stdin
n = int(stdin.readline().rstrip().replace("/", ""))

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

Solution (Python):
A = input()









if int(A[5])!=0:
    mm = (int(A[5])*10) + (int(A[6]))
else:
    mm = int(A[6])

if int(A[8])!=0:
    dd = (int(A[8])*10) + (int(A[9]))
else:
    dd = int(A[9])
    








if mm>4:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
import datetime

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

y = datetime.datetime(2019, 4, 30, 0, 0, 0)

if x_date <= y :
    print('Heisei')
else:
    print('TBD')

Solution (Python):
from sys import stdin
yymmdd = int(stdin.readline().rstrip().replace("/", ""))

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

Solution (Python):
S = input()

SA = S.split("/")

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

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

Solution (Python):

s = input()

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

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

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

Solution (Python):
s = input().split('/')
mm = int(s[1])
dd = int(s[2])
if mm <= 4 and dd <= 31:
    print('Heisei')
else:
    print('TBD')

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

if 2019>l[0]:
    print("Heisei")
elif 5>l[1]:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
def func(a):
    if int(a[1]) < 5:
        return "Heisei"
    else:
        return "TBD"
P = input().split("/")
print(func(P))

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

Solution (Python):

import datetime

s = input()

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

if  dt > endheisei:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
S = input()
A= S[:4]
B =S[5:7]
C =S[8:]

ans = "TBD"

if int(A) == 2019:
    if B[0] == "0":
        if int(B[1]) <= 4:
            if C[0] == "0":
                ans = "Heisei"
            elif int(C) <= 30:
                ans = "Heisei"
elif int(A) < 2019:
    ans = "Heisei"

print(ans)

Solution (Python):
import datetime
a=input()
year=a[0:4]
month=a[5:7]
day=a[8:10]

comp1 = datetime.datetime(int(year), int(month), int(day))
comp2 = datetime.datetime(2019 , 4 , 30)   

if comp1 > comp2:
    print('TBD')
else :
    print('Heisei')

Solution (Python):
s = input()
year = int(s[:4])
month = int(s[5:7])
day = int(s[8:10])
if year < 2019:
  print("Heisei")
  exit()
elif year > 2019:
  print("TBD")
  exit()
if month < 4:
  print("Heisei")
  exit()
elif month > 4:
  print("TBD")
  exit()
print("Heisei")

Solution (Python):
a=input()
arr=a.split("/")
if int(arr[0])<=2018 or int(arr[1])<4 or int(arr[1])==4 and int(arr[2])<=30:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
S=input()
nen=int(S[0:4])
tuki=int(S[5:7])
hi=int(S[8:10])

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

Solution (Python):

import sys
import datetime

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

def check(date):
    a = datetime.datetime.strptime('2019/04/30', "%Y/%m/%d")
    if date <= a :
        return "Heisei"
    else :
        return "TBD"

print(check(S))

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

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


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

Solution (Python):
s =  input()

time = s.replace('/', '')
sliceyear=time[0:4]
slicemonth=time[4:6]

if int(sliceyear)<2019:
    print("Heisei")
elif int(sliceyear)==2019 and int(slicemonth)<5:
    print("Heisei")
else:
     print("TBD")

Solution (Python):
dateStr = input()
dateInt = int(dateStr[0:4] + dateStr[5:7] + dateStr[8:10])
if dateInt <= 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):
    if (mm>4):
        print('TBD')
    else:
        print('Heisei')
else:
    print('Heisei')

Solution (Python):
from datetime import datetime

input_ = raw_input()
date = datetime.strptime(input_, '%Y/%m/%d')
if date > datetime.strptime("2019/04/30", '%Y/%m/%d'):
    print("TBD")
else:
    print("Heisei")

Solution (Python):

 
date = input().split('/')
 
if(int(date[0]) >= 2020):
  print('TBD')
elif(int(date[0]) == 2019 and int(date[1]) >=5):
  print('TBD')
else:
  print('Heisei')

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

Solution (Python):

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

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

Solution (Python):
input_s = input()
elems = input_s.split('/')
date = [int(elem) for elem in elems]
year, month, day = date
if (year > 2019):
    print('TBD')
elif(year < 2019):
    print('Heisei')
else:
    if(month > 4):
        print('TBD')
    elif(month < 4):
        print('Heisei')
    else:
        print('Heisei')

Solution (Python):
print('TBD'*(input()[5:]>'04/30')or'Heisei')

Solution (Python):


if __name__ == "__main__":

    i = str(input())

    j = i.split('/')

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

Solution (Python):
a = input()

if int(a[0:4]) <= 2019:
    if int(a[5:7]) <= 4:
        print("Heisei")
    else:
        print("TBD")

else:
    print("TBD")

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

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

if __name__ == '__main__':
    main()

Solution (Python):
"""AtCoder"""

S = input()

S = S.replace('/', '')

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

Solution (Python):
D_str=input().split("/")
D=list(map(int,D_str))
if D[0]>=2020:
  print("TBD")
elif D[0]==2019 and D_str[1]=="01":
  print("Heisei")
elif D[0]==2019 and D_str[1]=="02":
  print("Heisei")
elif D[0]==2019 and D_str[1]=="03":
  print("Heisei")
elif D[0]==2019 and D_str[1]=="04":
  print("Heisei")  
elif D[0]==2019:
  print("TBD")
else:
  print('Heisei')

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

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

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 sys

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

Solution (Python):
import datetime
d1 = input().split("/")

y = int(d1[0])
m = int(d1[1])
d = int(d1[2])

dd = datetime.date(y,m,d)
d2 = datetime.date(2019,4,30)

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

Solution (Python):
date = input()
year = date[:4]
month = date[5:7]
if int(year) < 2019:
        print("Heisei")
elif int(year)==2019:
    if month == "04":
        print("Heisei")
    elif month == "03":
        print("Heisei")
    elif month == "02":
        print("Heisei")
    elif month == "01":
        print("Heisei")
    else:
        print("TBD")
else:
        print("TBD")

Solution (Python):
from datetime import datetime as dt

tstr = input()
tdatetime = dt.strptime(tstr, '%Y/%m/%d')
tdatetimea = dt.strptime('2019/05/01', '%Y/%m/%d')
if tdatetimea <= tdatetime:
    print('TBD')
else:
    print('Heisei')

Solution (Python):


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

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

else :
    print("TBD")

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

print("TBD" if (y>=2019) and (m>4) else "Heisei")

Solution (Python):


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



if a[0] <= 2018:
    print('Heisei')
else:
    if a[0] == 2019 and a[1] <= 4:
        print('Heisei')
    else:
        print('TBD')

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

Solution (Python):
a,b,c=input().split("/")
a=int(a)
b=int(b)
c=int(c)
if b>=5:
    print('TBD')
else:
    print('Heisei')

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

date=datetime.date(y,m,d)

Hdate=datetime.date(2019,4,30)

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

Solution (Python):
date = input()
year = date[:4]
month = date[5:7]
if int(year) < 2019:
        print("Heisei")
elif int(year)==2019:
    if month == "04":
        print("Heisei")
    elif month == "03":
        print("Heisei")
    elif month == "02":
        print("Heisei")
    elif month == "01":
        print("Heisei")
    else:
        print("TBD")
else:
        print("TBD")

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

Solution (Python):
from datetime import datetime

S = input()

date = datetime.strptime(S, '%Y/%m/%d')
cmp_date = datetime(year=2019,month=4,day=30)

if cmp_date >= date:
    print('Heisei')
else:
    print('TBD')

Solution (Python):


import sys
ans = input().split("/")
for i in range(3):
    ans[i] =int(ans[i])

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

Solution (Python):
from datetime import datetime

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

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

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

date = list[0] + list[1] + list[2]

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

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


if date>border:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
data = input().split('/')
year = int(data[0])
month = int(data[1])
day = int(data[2])

result = 'TBD'
if year < 2019:
  result = 'Heisei'
elif year == 2019:
  if month <= 4:
    result = 'Heisei'

print(result)

Solution (Python):
s=input()
s_list=s.split("/")
year=int(s_list[0])
month=int(s_list[1])
day=int(s_list[2])

if year<2019:
    string="Heisei"
elif year==2019 and month<=4:
    string="Heisei"
else:
    string="TBD"

print(string)

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

a = a[:4] + a[5:7] + a[8:]

a = int(a)

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

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

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

Solution (Python):
def main() -> None:
    S = input()
    Y, M, D = S.split("/")
    if int(Y) >= 2019 and int(M) <= 4:
        print("Heisei")
    else:
        print("TBD")



if __name__ == '__main__':
    main()

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

Solution (Python):
import sys

a = sys.stdin.readline().rstrip().split('/')

if(int(a[1]) > 4):
    print("TBD")
else:
	print("Heisei")

Solution (Python):
def solve():
  y,m,d = map(int, input().split("/"))
  if y < 2019: 
    return "Heisei"
  elif y > 2019: 
    return "TBD"
    
  if m < 4: 
    return "Heisei"
  elif m > 4: 
    return "TBD"
    
  if d > 30: 
    return "TBD"
  return "Heisei"

print(solve())

Solution (Python):
S = str(input())
if int(S[6]) >= 5 or int(S[5]) == 1:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
def solve(str_in_arr):
    _year, _month, _day = str_in_arr[0].split("/")
    year, month, day = int(_year), int(_month), int(_day)
    if year < 2020 and month < 5 and day < 31:
        return "Heisei"
    else:
        return "TBD"

      
def main():
    date = [input()]
    print(solve(date))


if __name__ == "__main__":
    main()

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

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

Solution (Python):
from datetime import datetime


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


if __name__ == "__main__":
    main()

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

Solution (Python):
from datetime import datetime

date = input()

if datetime.strptime(date, '%Y/%m/%d') <= 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")        
    if s[1] > 4:
        print("TBD")     
    if s[1] < 4:   
        print("Heisei")  
        
elif s[0]> 2019:
    print("TBD")     

elif s[0] < 2019:
    print("Heisei")

Solution (Python):
"""
A - Still TBD
"""
import datetime

if __name__ == '__main__':
    s = input()
    s = s.split('/')
    s = datetime.date(int(s[0]),int(s[1]),int(s[2]))
    border = datetime.date(2019,4,30)
    
    result = 'TBD'
    if(s <= border):
        result = 'Heisei'

    print(result)

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

if flg==1:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import re

s = input()
li = s.split("/")
month = int(li[1])

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

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

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

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

if(int(line[0]) >= 2019):
    if(int(line[1]) > 4):
        print("TBD")
        exit()

print("Heisei")

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

Solution (Python):
from sys import stdin


year, month, date = stdin.readline().rstrip().split(sep='/')

y = int(year)
m = int(month)
d = int(date)

heisei_y = 2019
heisei_m = 4
heisei_d = 30

if y < heisei_y:
  print('Heisei')
elif  (y == heisei_y) and (m < heisei_m):
  print('Heisei')
elif  ((y == heisei_y) and m == heisei_m) and (d <= heisei_d):
  print('Heisei')
else:
  print('TBD')

Solution (Python):
import datetime

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

kirikae = datetime.datetime(2019,4,30)
inputlist = datetime.datetime(int(slist[0]),int(slist[1]),int(slist[2]))
if kirikae < inputlist:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
S = input()
A = int(S[5:7])
if A <= 4:
  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:
    print('Heisei')
elif s[0] == 2019 and s[1] >= 5:
    print('TBD')
elif s[0] >= 2020:
    print('TBD')

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

Solution (Python):
s=input()
year=[]
month=[]
day=[]
g=0
for i in range(len(s)):
    if s[i]!='/':
        if g==0:
            year+=s[i]
        if g==1:
            month+=s[i]
        if g==2:
            break
    else:
        g+=1
figure=[0,1,2,3,4,5,6,7,8,9]
j=len(year)-1
Y=0
for i in year:
    Y+=figure[int(i)]*10**j
    j-=1
j=len(month)-1
M=0
for i in month:
    M+=figure[int(i)]*10**j
    j-=1
if Y<2019 or (Y>=2019 and M<5):
    print('Heisei')
elif Y>=2019 and M>=5 or Y>2019:
    print('TBD')

Solution (Python):
print('TBD'*(input()[5:]>'04/30')or'Heisei')

Solution (Python):
import sys

S=sys.stdin.readline()
y=int(S[:4])
m=int(S[5:7])-1
d=int(S[8:])-1
H='Heisei'
O='TBD'
v=y*400+m*32+d
t=2019*400+3*32+29
if v<=t:
    print(H)
else:
    print(O)

Solution (Python):
def solver():
	a = input().rstrip('\n').split('/')
	if int(a[0]) > 2019:
		print('TBD')
	elif int(a[0]) < 2019:
		print('Heisei')
	else:
		if int(a[1]) > 4:
			print('TBD')
		elif int(a[1]) < 4:
			print('Heisei')
		else:
			if int(a[2]) > 30:
				print('TBD')
			elif int(a[2]) < 30:
				print('Heisei')
			else:
				print('Heisei')

solver()

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

Solution (Python):
S = input()
wlist = S.split("/")
a="".join(wlist)
n = int(a)

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

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

Solution (Python):
from sys import stdin
a = stdin.readline().rstrip().split('/')
year = int(a[0])
month = int(a[1])
day = int(a[2])

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

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

if i[0] >= 2019 and i[1] >= 5:
  print("TBD")
elif i[0] == 2019 and i[1] == 4 and i[2] == 31:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
s = input()
if int(s[0:4])>2019:
    print("TBD")
    exit()
elif int(s[5:7])>4:
    print("TBD")
    exit()
elif int(s[6])==4 and int(s[8:10])>30:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
S = list(map(int, input().split('/')))
X = [2019, 4, 30]

print('Heisei') if all([S[i] <= X[i] for i in range(3)]) else print('TBD')

Solution (Python):


if __name__ == '__main__':
    S = input().split('/')

    ans = ''.join(S)
    ans = int(ans)

    if ans < 20190501:
        print('Heisei')
    else:
        print('TBD')

Solution (Python):
import sys

lines = sys.stdin.readlines()
S = lines[0]

Ss = S.split('/')

if int(Ss[0]) >= 2019:
  if int(Ss[1]) >= 5:
    print('TBD')
    exit(0)
print('Heisei')

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

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

year=[]
month=[]
date=[]

for i in range(4):
	year.append(s[i])

for i in range(5,7):
	if(s[5]!=0):
		month.append(s[i])
	elif(s[5]==0):
		month.append(s[i])

for i in range(8,10):
	if(s[8]!=0):
		date.append(s[i])
	else:
		date.append(s[9])

year=int(''.join(year))
month=int(''.join(month))
date=int(''.join(date))


if(year<=2019 and month<=4 and date<=30):
	print("Heisei")
elif(year>=2019 and month>=5 and date>=1):
	print("TBD")

Solution (Python):



str = input().strip()
splited = ''.join(str.split('/'))
i = int(splited)

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

Solution (Python):


import sys

def parse_input(lines_as_string = None):
    
    lines = []
    lines.append(input())

    params = lines[0].split(" ")
    a = params[0]

    return (a)


def solve(s):

    result = "TBD"
    if s <= "2019/04/30":
        result = "Heisei"
    else:
        result = "TBD"

    return result

def main():
    

    print("%s" % solve(parse_input()))

if __name__ == '__main__':

    main()

Solution (Python):
str_i = input()

str_v = str(str_i).split('/')

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

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

Solution (Python):

import datetime

dt = [int(s) for s in input().split("/")]
if datetime.date(*dt) <= datetime.date(2019, 4, 30):
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s = list(map(int, input().split("/")))
if s[1] < 5:
    print("Heisei")

else:
    print("TBD")

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

S_list = S.split("/")

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

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

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

Solution (Python):
S = input()

month = int(S[5:7])

print("Heisei" if month < 5 else "TBD")

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

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

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

Solution (Python):

"""
Created on Sun Feb 24 21:00:58 2019

@author: Wataru
"""

S=input()

Stmp=S.split('/')

YY=int(Stmp[0])
MM=int(Stmp[1])
DD=int(Stmp[2])

if YY<2019:
    print('Heisei')
else:
    if MM<5:
        print('Heisei')
    else:
        print('TBD')

Solution (Python):
s = input()

if int(s[5]) == 1:
    print("TBD")
    exit()

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

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

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

s = a.split('/')
x = int(s[1] + s[2])

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

Solution (Python):



s=input()
Y=int(s[0:4])
M=int(s[5:7])

if Y>2019:
    print('TBD')
    exit()
elif Y==2019:
    if M>4:
        print('TBD')
        exit()
    else:
        print('Heisei')
        exit()
    
else:
    print('Heisei')

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

Solution (Python):
s = str(input())
a = s[0:4]
b = s[5:7]
c = s[8:10]
ans = 0
if int(a) <= 2019:
    if int(b) <= 4:
        if int(c) <= 30:
            ans += 1
if ans == 1:
    print("Heisei")
else :
    print("TBD")

Solution (Python):


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

if int(a[1])<5:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import datetime





a  = (datetime.datetime.strptime('2019/04/30', '%Y/%m/%d') - datetime.datetime.strptime(input(), '%Y/%m/%d')).days
if a >= 0:
    print('Heisei')
else:
    print('TBD')

Solution (Python):


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


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

Solution (Python):
S = input()
character=[]
for c in S:
    character.append(c)

year=character[0]+character[1]+character[2]+character[3]
year=int(year)

month=character[5]+character[6]
month = int(month)
day=character[8]+character[9]
day = int(day)

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

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

Solution (Python):
s=input()
s1=int(s[:4])
s2=int(s[5:7])
s3=int(s[8:10])
if s1<2019:
    print('Heisei')
elif s1==2019:
    if s2<4:
        print('Heisei')
    elif s2==4:
        if s3<=30:
            print('Heisei')
        else:
            print('TBD')
    else:
        print('TBD')
else:
    print('TBD')

Solution (Python):
print('TBD'*(input()>'2019/04/30')or'Heisei')

Solution (Python):
S = list(input().split("/"))
new_s = []
for i in S:
    new_s.append(int(i))
if (new_s[0]>=2019) & (new_s[1]>4):
        print('TBD')
else:
    print('Heisei')

Solution (Python):
S=input()

if S[0:7]=="2019/01" or  S[0:7]=="2019/02"or  S[0:7]=="2019/03" or  S[0:7]=="2019/04":
    print("Heisei")
else:
    print("TBD")