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();print("Heisei") if s<="2019/04/30" else print("TBD")

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

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

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

Solution (Python):
def solve(string):
    return "Heisei" if string <= "2019/04/30" else "TBD"


if __name__ == '__main__':
    print(solve(input()))

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

Solution (Python):
import datetime
S = raw_input()
year, month, day = map(int, S.split('/'))
date1 = datetime.date(year, month, day)
if date1 <= datetime.date(2019, 04, 30):
    print("Heisei")
else:
    print("TBD")

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

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

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

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

def solve(year, month, day):
    s = 'Heisei'
    t = 'TBD'

    if year > 2019:
        return t
    if year == 2019 and month >= 5:
        return t
    return s

main()

Solution (Python):
import datetime

s = input()
t = '2019/04/30'
date_1 = datetime.datetime.strptime(s, '%Y/%m/%d')
date_2 = datetime.datetime.strptime(t, '%Y/%m/%d')

if date_1 <= date_2:
	print('Heisei')
else:
	print('TBD')

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

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

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

Solution (Python):
s = input()

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

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

Solution (Python):
print(["Heisei","TBD"][int(input().split('/')[1])>4])

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

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

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

Solution (Python):



S = input()
ls = [x for x in S.split("/")]
y = int(ls[0])
m = ls[1]
if y<=2018:
    a = "Heisei"
elif y == 2019 and m in ["01" ,"02", "03","04"]:
    a = "Heisei"
else:
    a = "TBD"
print(a)

Solution (Python):
s = input()

l = s.split("/")

n1 = int(l[0])
n2 = int(l[1])

if n1<2019:
    print("Heisei")
elif n1>2019:
    print("TBD")
elif n2<=4:
    print("Heisei")
elif n2>4:
    print("TBD")

Solution (Python):
import re

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

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

f = False
if y <= 2018:
    f = True
if y == 2019:
    if m <= 4:
        f = True

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

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

Solution (Python):
print("Heisei" if input() < "2019/05/01" else "TBD")

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

Solution (Python):
input_date = input()

str_date = input_date.split("/")
int_date = [int(n) for n in str_date]

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

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

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

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

import sys

if y<2019:
    print("Heisei")
    sys.exit()
if y==2019:
    if m<=4:
        print("Heisei")
        sys.exit()
print("TBD")

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

Solution (Python):
import datetime

a, b, c = map(int, input().split('/'))
comp = datetime.date(2019,4,30)


if datetime.date(a,b,c) <= comp:
	print('Heisei')
else:
	print('TBD')

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

Solution (Python):
s=str(input())
a=s.split('/')
year=int(a[0])
month=int(a[1])
day=int(a[2])
if year <= 2018:
  print('Heisei')
elif month <=4:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
import sys

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

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

Solution (Python):
yy,mm,dd =map(int,input().split('/'))

if yy>2019:
  print('TBD')
else:
  if mm>4:
    print('TBD')
  else:
    if mm==1 or mm==3:
      if dd>31:
        print('TBD')
      else:
        print('Heisei')
    if mm==2:
      if dd>29:
        print('TBD')
      else:
        print('Heisei')
    if mm==4:
      if dd>30:
        print('TBD')
      else:
        print('Heisei')

Solution (Python):
yy,mm,dd =map(int,input().split('/'))
x = 0
if(yy<=2019):
  if(mm<=4):
    if(dd<=30):
      x = 1
         
if(x == 1):
  print('Heisei')
else:
  print('TBD')

Solution (Python):
s = input()
temp = int(s[5]+s[6])

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

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

Solution (Python):
s = str(input())
a = s.split('/')
year = int(a[0])
month = int(a[1])
day = int(a[2])
if year <= 2018 :
    print('Heisei')
elif month <= 4 :
    print('Heisei')
else :
    print('TBD')

Solution (Python):
s = input().replace('/','')
if s[4:5] == '1':
  print('TBD')
else:
  if int(s[5:6]) > 4:
    print('TBD')
  else:
    print('Heisei')

Solution (Python):
S = input()

m = int(S.split("/")[1])

if m >= 5:
    ans = "TBD"
else:
    ans = "Heisei"

print(ans)
print()

Solution (Python):
import datetime

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

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

Solution (Python):
elem = input().split('/')
ans = "Heisei"

if int(elem[0], 10) > 2019:
    ans = "TBD"
elif int(elem[1], 10) > 4:
    ans = "TBD"
elif int(elem[2], 10) > 30:
    ans = "TBD"


print(ans)

Solution (Python):
import datetime
S = list(map(int,input().split("/")))
comp = datetime.datetime(2019,4,30)
target = datetime.datetime(S[0],S[1],S[2])

if comp >= target:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import datetime
S = str(input())
strs = S.split('/')

ANS = datetime.date(2019, 4, 30)
IN = datetime.date(int(strs[0]), int(strs[1]), int(strs[2]))
if IN <= ANS:
    print('Heisei')
else:
    print('TBD')

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

Solution (Python):
def main():
    year, month, day = map(str, input().split("/"))
    date_number = int(year+month+day)
    if date_number<=20190430:
        print("Heisei")
    else:
        print("TBD")
main()

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

Solution (Python):

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

Solution (Python):
list = input().split("/")
y = int(list[0])
m = int(list[1])

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

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

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

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

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

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

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

h = 'Heisei'; t = 'TBD'

if y<=2019 and m<=4 and d<=30:
    print(h)
else:
    print(t)

Solution (Python):
a = input().rstrip().split('/')
a = list(map(int, a))
if a[0] < 2019:
  print('Heisei')
elif a[1] < 5:
  print('Heisei')
else:
  print('TBD')

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

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

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

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

Solution (Python):
S = input().rstrip()
result = 'TBD'
if S <= '2019/04/30':
    result = 'Heisei'

print(result)

Solution (Python):
s=input()

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

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

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

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

Solution (Python):
import datetime;

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

d1= datetime.date(y,m,d)
Heisei=datetime.date(2019,4,30)

if(Heisei>=d1):
    print('Heisei')
else:
    print('TBD')

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

n = int(y + m + d)

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

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


n = int(y + m + d)

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

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

Solution (Python):
s=input()
a=int(s[0:4])
b=int(s[5:7])
c=int(s[8:])
if a>=2019 and b>4:
	print("TBD")
else:
	print("Heisei")

Solution (Python):
S = [int(x) for x in input().split('/')]
flag = True
if(S[0]<2019):
    flag = False
elif(S[0]==2019):
    if(S[1]<=4):
        flag = False

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

Solution (Python):
l = [int(i) for i in input().split('/')]
print('TBD' if l[1]>4 else 'Heisei')

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

isHeisei = True
if year > 2019:
  isHeisei = False
elif year == 2019:
  if month > 4:
    isHeisei = False
  elif month == 4:
    if date > 30:
      isHeisei = False
      
printstr = "Heisei" if isHeisei else "TBD"
print(printstr)

Solution (Python):
date=input().split("/")
date1=[int(i) for i in date]
if date1[0]>2019:
    print("TBD")
elif date1[1]>4:
    print("TBD")
elif date1[2]>30:
    print("TBD")
else:
    print("Heisei")

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

Solution (Python):



import datetime
s = input()

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

Solution (Python):
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))

s=input()
if s[5:7]<='04':
    print('Heisei')
else:
    print('TBD')

Solution (Python):



S = input() 

date = S.split('/')

year = int(date[0])
month = int(date[1])
day = int(date[2])

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

Solution (Python):
S = input()
ymd = "0"
iymd = None

for i in range(4):
    ymd = ymd + S[i]
for i in range(5,7):
    ymd = ymd + S[i]
for i in range(8,10):
    ymd = ymd + S[i]

iymd = int(ymd)

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

Solution (Python):
s = map(int, raw_input().split('/'))
d = [2019, 4, 30]
if s <= d:
	print "Heisei"
else:
	print "TBD"

Solution (Python):
import datetime

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

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

Solution (Python):
import numpy as np

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

y, m, d = int(y), int(m), int(d)

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

Solution (Python):


import sys, re
from collections import deque, defaultdict, Counter
from math import sqrt, hypot, factorial, pi, sin, cos, radians, log10
if sys.version_info.minor >= 5: from math import gcd
else: from fractions import gcd 
from heapq import heappop, heappush, heapify, heappushpop
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul, xor
from copy import copy, deepcopy
from functools import reduce, partial
from fractions import Fraction
from string import ascii_lowercase, ascii_uppercase, digits
from datetime import date

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def round(x): return int((x*2+1) // 2)
def fermat(x, y, MOD): return x * pow(y, MOD-2, MOD) % MOD
def lcm(x, y): return (x * y) // gcd(x, y)
def lcm_list(nums): return reduce(lcm, nums, 1)
def gcd_list(nums): return reduce(gcd, nums, nums[0])
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

y, m, d=map(int, input().split('/'))
d1=date(y, m, d)
d2=date(2019, 4, 30)

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

Solution (Python):
y, m, d = map(int, input().split('/'))
if y * 10000 + m * 100 + d <= 20190430:
    print('Heisei')
else:
    print('TBD')

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

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

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

if y<=2018 :
    c = 'Heisei'
elif y==2019 and m<=4 :
    c = 'Heisei'
else :
    c = 'TBD'

print(c)

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

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

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

y = int(a[0])
m = int(a[1])
d = int(a[2])
if m <= 4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()

T = "2019/05/01"

print("Heisei" if S < T else "TBD")

Solution (Python):
import datetime

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

T = datetime.datetime.strptime("2019/05/01", "%Y/%m/%d")

print("Heisei" if S < T else "TBD")

Solution (Python):
from datetime import datetime


s = raw_input()
f = '%Y/%m/%d'
c = datetime.strptime('2019/04/30', f).date()
d = datetime.strptime(s, f).date()

if d <= c:
  print 'Heisei'
else:
  print 'TBD'

Solution (Python):
from datetime import datetime


s = raw_input()
f = '%Y/%m/%d'
c = datetime.strptime('2019/04/30', f).date()
d = datetime.strptime(s, f).date()

if d <= c:
  print 'Heisei'
else:
  print 'TBD'

Solution (Python):
from datetime import datetime

s = raw_input()

f = '%Y/%m/%d'
c = datetime.strptime('2019/04/30', f).date()
d = datetime.strptime(s, f).date()

if d <= c:
  print 'Heisei'
else:
  print 'TBD'

Solution (Python):

"""
Created on Thu Feb 28 18:53:10 2019

@author: yuta
"""

S = input()
def main(s):
    yyyymmdd = s.rsplit("/")
    yyyy = int(yyyymmdd[0])
    mm   = int(yyyymmdd[1])
    dd   = int(yyyymmdd[2])
    if yyyy < 2019:
        print("Heisei")
    elif yyyy > 2019:
        print("TBD")
    else:
        if mm < 4:
            print("Heisei")
        elif mm > 4:
            print("TBD")
        else:
            if dd <= 30:
                print("Heisei")
            else:
                print("TBD")
main(S)

Solution (Python):
s = input()

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

Solution (Python):
S = input()
y, m, d = S.split('/')
if y <= '2018':
    print('Heisei')
elif y ==  '2019' and m <= '04':
    print('Heisei')
else:
    print('TBD')

Solution (Python):
n = str(input())
y = list(n.split("/"))

datetime = int(y[0] + y[1] + y[2])

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

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

if y < 2019:
  print('Heisei')
  sys.exit()

if y == 2019 and m < 5:
  print('Heisei')
  sys.exit()

print('TBD')

Solution (Python):
s=str(input())
if int(s[0:4])*10000+int(s[5:7])*100+int(s[8:10])>20190430:
  print('TBD')
else:
  print('Heisei')

Solution (Python):

"""
Created on Thu Feb 28 18:53:10 2019

@author: yuta
"""

S = input()
def main(s):
    yyyymmdd = s.rsplit("/")
    yyyy = int(yyyymmdd[0])
    mm   = int(yyyymmdd[1])
    dd   = int(yyyymmdd[2])
    if yyyy < 2019:
        print("Heisei")
    elif yyyy > 2019:
        print("TBD")
    else:
        if mm < 4:
            print("Heisei")
        elif mm > 4:
            print("TBD")
        else:
            if dd <= 30:
                print("Heisei")
            else:
                print("TBD")
main(S)

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

Solution (Python):
s = list(input())
for i in range(4):
    if i == 0:
        y = int(s[i])*1000
    elif i == 1:
        y += int(s[i])*100
    elif i == 2:
        y += int(s[i])*10
    else:
        y += int(s[i])
for i in range(5,7):
    if i == 5:
        m = int(s[i])*10
    else:
        m += int(s[i])
for i in range(8,10):
    if i == 8:
        d = int(s[i])*10
    else:
        d += int(s[i])
if y <= 2019:
    if m <= 4:
        if d <= 30:
            print("Heisei")
        else:
            print("TBD")
    else:
        print("TBD")

else:
    print("TBD")

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

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

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

Solution (Python):
S = input()
S_split = S.split("/")
(year, month, day) = (int(S_split[i]) for i in range(3))

if month > 4:
    print("TBD")

else:
    print("Heisei")

Solution (Python):
from datetime import datetime

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

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

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

Solution (Python):
a = input()
if(a[5] == "1"):
    print("TBD")
elif(int(a[6]) > 4):
    print("TBD")
else:
    print("Heisei")

Solution (Python):
s = input()
m = int(s[5:7])

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

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

Solution (Python):
def solve(month):
    return "Heisei" if month <= 4 else "TBD"


def main():
    s = input()
    month = int(s[5:7])

    ans = solve(month)
    print(ans)


main()

Solution (Python):
import os
import sys
import datetime

def main():
    sDate = datetime.datetime.strptime("2019/04/30", '%Y/%m/%d')

    inputdate = input()

    try:
        inputdate = datetime.datetime.strptime(inputdate, '%Y/%m/%d')
    except:
        print("Error: illegal date format.")
        return 1

    if inputdate <= sDate:
        print("Heisei")
    else:
        print("TBD")

    return 0

if __name__ == '__main__':
    sys.exit(main())

Solution (Python):
S = input()

list_dmy = S.split('/')

year = int(list_dmy[0])
month = int(list_dmy[1])
day = int(list_dmy[2])

if year <= 2018:
	print('Heisei')

elif year == 2019 and month <= 4 and day <= 30:
	print('Heisei')
else:
	print('TBD')

Solution (Python):

"""
oj dl https://atcoder.jp/contests/abc116/tasks/abc116_d -d test-d
oj test -d test-d -c "python abc116d.py"
oj test -d test-d -c "python abc116d.py" test-d/sample-3.in
"""
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(S):
    base = datetime.strptime("2019/04/30", '%Y/%m/%d')
    target = datetime.strptime(S, '%Y/%m/%d')
    return "Heisei" if target <= base else "TBD"


do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(int, line.split())) for line in lines]
    a, b, c = parsed_lines[0]
    return a, b, c


if not do_submit:
    a, b, c = input_parse("""
    45 28 53
    """)
    print(sol(a, b, c))
else:
    
    
    S = input().strip()
    print(sol(S))

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 sys import stdin
 
i = stdin.readline().strip()
d = tuple(map(int, i.split("/")))
print("Heisei" if d <= (2019,4,30) else "TBD")

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

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

Solution (Python):
YY, MM, DD = map(int, input().split('/'))

if YY > 2019:
    print('TBD')
elif MM > 4:
    print('TBD')
elif DD <= 30:
    print('Heisei')
else:
    print('TBD')

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

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

Solution (Python):
import datetime as dt
S_T='2019/04/30'
S_T=dt.datetime.strptime(S_T,'%Y/%m/%d')

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

t_delta=S-S_T
if t_delta.days <= 0:
    print('Heisei')
else:
    print('TBD')

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

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


if __name__ == "__main__":
    main()

Solution (Python):
S = input()

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

Solution (Python):
s = input()
y = int(s[0: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):
a = input().split('/')
if a[1][0] == '0':
  a[1] = a[1][1]
if int(a[0]) >= 2019 and int(a[1]) >= 5:
  print('TBD')
  
else:
  print('Heisei')

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

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

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

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

Solution (Python):
nyuryoku=input()
nyuryoku_spl=nyuryoku.split("/")
nyuryoku_num=nyuryoku_spl[0]+nyuryoku_spl[1]+nyuryoku_spl[2]
nyuryoku_num=int(nyuryoku_num)
nyuryoku_num

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

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

Solution (Python):
x=str(input())
if int(x[:4])>2019:
	print("TBD")
elif int(x[:4])==2019 and int(x[5:7])>4:
	print("TBD")
else:
  	print("Heisei")

Solution (Python):


import datetime

text = input()
time = datetime.datetime.strptime(text,"%Y/%m/%d")
heisei = datetime.datetime.strptime("2019/04/30","%Y/%m/%d")

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

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

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

Solution (Python):
s = input().rstrip("\n")

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

Solution (Python):
s = input()

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

Solution (Python):
S = input()

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

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

Solution (Python):
import datetime

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

if date_formatted < datetime.datetime(2019, 5, 1):
  print ("Heisei")
else:
  print ("TBD")

Solution (Python):
import datetime as dt

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

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

print("Heisei" if inp <= chkdt else "TBD")

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

Solution (Python):
from datetime import datetime

datestr = input()

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

end_heisei = datetime.strptime('2019/04/30', '%Y/%m/%d')

if date <= end_heisei:
    print('Heisei')

else:
    print('TBD')

Solution (Python):
s = input()
y,m,d = [int(_) for _ in s.split('/')]
if m <= 4:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
s = input()
if s[5]=="1":
  print("TBD")
  exit()
if s[6]=="5" or s[6]=="6" or s[6]=="7" or s[6]=="8" or s[6]=="9":
  print("TBD")
  exit()
print("Heisei")

Solution (Python):

S = input()
y = int(S[:4])
m = int(S[5:7])
d = int(S[8:10])
ans = False


def solve():
    if y != 2019:
        return y < 2019
    if m != 4:
        return m < 4
    if d != 30:
        return d < 30
    return True


print(['TBD', 'Heisei'][solve()])

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
s = input()
print("Heisei" if (int(s[0:4])*10000 + int(s[5:7])*100 + int(s[8:10]) <= 2019*10000+4*100+30) else "TBD")

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

Solution (Python):
s=input()

a=""
a+=s[0:4]
a+=s[5:7]
a+=s[8:10]

if int(a)>20190430:
    print("TBD")
else:
    print("Heisei")

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

BORDER = 20190430

if mod_S <= BORDER:
    print("Heisei")
else:
    print("TBD")

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

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):
year, month, day = map(int, input().split('/'))
if month < 5:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
S=input()
T=S[5:7]+S[8:10]
if int(T[:2]) > 4:
    print('TBD')
else:
    print('Heisei')

Solution (Python):

import copy
import numpy as np
import random

s = str(input())
yyyy,mm,dd = s.split("/")
ans = True
yyyy = int(yyyy)
mm = int(mm)
dd = int(dd)
if yyyy>=2020:
    ans = False
elif yyyy<=2018:
    pass
else:
    if mm>=5:
        ans = False
    elif mm<=3:
        pass
    else:
        pass

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

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

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

Solution (Python):
















S = input()

S = int(S[5:7])

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

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

Solution (Python):


import datetime

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

date2 = datetime.datetime(2019, 4, 30)

if date2 >= date1:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
from datetime import datetime

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