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):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby
    
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    

    
    

    s = input().rstrip()
    if s[5]=='1':
        print('TBD')
        exit()
    else:
        if s[6]=='4' or s[6]=='3' or s[6]=='2' or s[6]=='1':
            print('Heisei')
        else:
            print('TBD')


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys

y, m, d = map(int, sys.stdin.readline().rstrip().split('/'))

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

if __name__ ==  '__main__':
    main()

Solution (Python):
def main():
  
  
  
  s = list(map(int,input().split("/")))
  
  
  
  
  ans = 0
  count = 0
  lis = []
  
  if s[0] < 2019:
    print("Heisei")
  elif s[0] == 2019 and s[1] <= 4 and s[2] <= 30:
    print("Heisei")
  else:
    print("TBD")
  
if __name__ == '__main__':
  main()

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):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    s= input()
    ans = int(s[:4]+s[5:7]+s[8:])
    if ans > 20190430:
        print("TBD")
    else:
        print("Heisei")

Solution (Python):
s = input()

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

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

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

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

Solution (Python):
S = input()

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

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

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

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

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

Solution (Python):
s = input()

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

Solution (Python):

import datetime

H = datetime.datetime(2019, 4, 30)
S = input()

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


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

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

Solution (Python):
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

S = input()
y, m = int(S[:4]), int(S[5:7])
if y < 2019 or (y == 2019 and m <= 4):
    print('Heisei')
else:
    print('TBD')

Solution (Python):
inp=input()
date=inp.split('/')

if int(date[0]) <= 2019 and int(date[1]) <= 4 and int(date[2]) <= 30:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
import datetime

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

Solution (Python):
y, m, d = map(int, input().split("/"))
if y * 365 + m * 30 + d > 2019 * 365 + 4 * 30 + 30:
  print("TBD")
else:
  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):
import datetime
s = [int(i) for i in input().split("/")]

base = datetime.date(2019, 4, 30)
target = datetime.date(s[0], s[1], s[2])

print("TBD" if base < target else "Heisei")

Solution (Python):
S = list(map(str, input()))

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

Solution (Python):
seireki = list(input())
flag = "ok"
dummy = ""
dummy2 = ""
dummy3 = ""
for i in range(4):
  dummy = dummy + seireki[i]
if int(dummy) < 2019:
  print("Heisei")
elif int(dummy) > 2019:
  print("TBD")
else:
  dummy2 = seireki[5] + seireki[6]
  if int(dummy2) > 4:
    print("TBD")
  else:
    print("Heisei")

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

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

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

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

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = sys.stdin.buffer.readline().decode().rstrip()
    print('Heisei' if S <= '2019/04/30' else 'TBD')


if __name__ == '__main__':
    main()

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

main()

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

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

Solution (Python):


def main():
    s = input()
    
    month = int(s.split('/')[1])

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

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
S = input().split("/")
YY,MM,DD = map(int,S)
if (YY>2019) or (YY==2019 and MM>4):
    print("TBD")
else:
    print("Heisei")

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

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

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

Solution (Python):


import os
from sys import stdin, stdout

if(os.getenv('__LOCAL__')):
    __dirname = os.path.dirname(__file__)
    __basename = os.path.splitext(os.path.basename(__file__))[0]
    __inputname = './input/' + __basename + '.txt'
    __outputname = './output/' + __basename + '.txt'
    __input_path = os.path.join(__dirname, __inputname)
    __output_path = os.path.join(__dirname, __outputname)
    stdin = open(__input_path)
    

def main():
    S = list(map(int,stdin.readline().rstrip().split('/')))
    if(S[0] < 2019):
        ans = "Heisei"
        stdout.write("{}\n".format(ans))
        return 0
    if(S[0] == 2019 and S[1] <= 4):
        ans = "Heisei"
        stdout.write("{}\n".format(ans))
        return 0
    ans = "TBD"
    stdout.write("{}\n".format(ans))
    return 0
    

if __name__ == "__main__":
    main()

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

if Y>2019:
  print("TBD")
elif (Y==2019) & (M>=5):
  print("TBD")
else:
  print("Heisei")

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

if year <= 2019 and 1 <= mon <= 4 and 1 <= day <= 30:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()
year = int(S[0]+S[1]+S[2]+S[3])
mon = int(S[5]+S[6])
day = int(S[8]+S[9])
if year <= 2019 and 1 <= mon <= 4 and 1 <= day <= 30:
    print("Heisei")
else:
    print("TBD")

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

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

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

Solution (Python):
s = input()

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

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

Solution (Python):
s=input()

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

if int(m) < 4:
        print("Heisei")
elif int(m) > 4:
        print("TBD")
elif int(d)==31:
        print("TBD")
else:
        print("Heisei")

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

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

Solution (Python):
S=input()
s=list(S)
s.remove("/")
s.remove("/")
nu=int("".join(s))
if nu<= 20190430:
    print("Heisei")
else:
    print("TBD")

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

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

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

Solution (Python):
n = input()
f = False
year = int(n[0:4])
mon = int(n[5:7])
if year == 2019:
  if mon > 4:
    f = True
elif year > 2019:
    f = True

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

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

Solution (Python):
s = input()

month = int(s[5]+s[6])

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

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


if __name__ == "__main__":
    main()

Solution (Python):

s=input()
year=s[:4]
month=s[5:7]
day=s[8:]
flag=False
if year<"2019":
    flag=True
elif year=="2019":
    if month<="04":
        if day<="30":
            flag=True
if flag:
    print("Heisei")
else:
    print("TBD")

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

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

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

Solution (Python):
s=input()
if s[5]=="1":
    print("TBD")

else:
    if s[6] <="4":
        print("Heisei")

    elif s[6]>"4":
        print("TBD")

Solution (Python):
s=input()
if s[5]=="1":
  print("TBD")

else:
  if s[6] <="4":
    print("Heisei")
  
  elif s[6]>"4":
    print("TBD")

Solution (Python):
a = input()
d = 'TBD'
if int(a[0:4]) ==2019:
  if int(a[5:7]) == 4:
    if int(a[8:10]) <=30:
      d = 'Heisei'
  elif int(a[5:7]) <=3:
    d = 'Heisei'
elif int(a[0:4]) <= 2018:
  d = 'Heisei'
print(d)

Solution (Python):
S = input()

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

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

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

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

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

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

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

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

Solution (Python):
S = list(input().split('/'))
A = S[0]+S[1]+S[2]

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

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

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

Solution (Python):
s = input()
if s[5] == '1' or s[6] >= '5':
    print('TBD')
else:
    print('Heisei')

Solution (Python):

import datetime
s=input()
y,m,d=s.split("/")
d1=datetime.datetime(year=2019,month=4,day=30)
d2=datetime.datetime(year=int(y),month=int(m),day=int(d))

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

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

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

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

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

Solution (Python):
S = input()


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

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

def f(y, m, d):
    h = "Heisei"
    t = "TBD"
    if y > 2019:
        print(t)
        return
    if y < 2019:
        print(h)
        return
    if m > 4:
        print(t)
    else:
        print(h)

f(int(y), int(m), int(d))

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

Solution (Python):
S = input() 
y = int(S[0:4])
m = int(S[5:7])
d = int(S[8:10])
if m<=4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import datetime

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import datetime

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

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

print("Heisei" if in_date <= std_date else "TBD")

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

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

Solution (Python):
S = input()

if int(S[0:4]) < 2019:
    print('Heisei')
elif int(S[0:4]) == 2019:
    if int(S[5:7])*30 + int(S[9:11]) > 150:
        print('TBD')
    else:
        print('Heisei')
else:
    print('TBD')

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

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

Solution (Python):

import datetime


S = input().strip()

S_list=[int(i) for i in S.split("/")]

d = datetime.date( S_list[0],S_list[1],S_list[2] )
d_base=datetime.date(2019,4,30)
diff = d - d_base

if diff <= datetime.timedelta():
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s=input()
a=int(s[0]+s[1]+s[2]+s[3])
b=int(s[5]+s[6])
c=int(s[8]+s[9])
if a>2019:
    print("TBD")
elif a==2019 and b>=5:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
yyyy, mm, dd = [int(_) for _ in input().split('/')]
print('Heisei' if mm <= 4 else 'TBD')

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

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

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

if s > 20190430:
    print("TBD")
else:
    print("Heisei")

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

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

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

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

Solution (Python):

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

Solution (Python):
S = input().split("/")
n = int(S[0]+S[1]+S[2])

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

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

Solution (Python):
s = input()
ymd = s.split('/')
md = int(''.join(ymd[1:]))
ans = 'Heisei' if md <= 430 else  'TBD'
print(ans)

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

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

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

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

Solution (Python):
S=input()
def heisei(S):
    while True:
        if int(S[0:4])<2019:
            return 'Heisei'
        if int(S[0:4])==2019 and int(S[5:7])<4:
            return 'Heisei'
        if int(S[5:7])==4 and int(S[8:10])<=30:
            return 'Heisei'
        return 'TBD'
    
print(heisei(S))

Solution (Python):
S = input()

year = int(S[0:3])
month = int(S[5:6])
day = int(S[8:9])

if (S >= "2019/05/01"):
	print("TBD")
else:
	print("Heisei")

Solution (Python):
S = input()
a = int(S[5])
b = int(S[6])

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

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

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

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

Solution (Python):
s = input()
print("Heisei" if s <= "2019/04/30" else "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):
yyyy, mm, dd = map(int, input().split('/'))
if yyyy <= 2018:
  print('Heisei')
  quit()
elif yyyy == 2019:
  if mm <= 4:
    print('Heisei')
    quit()
  else:
    print('TBD')
    quit()
else:
  print('TBD')
  quit()

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

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

Solution (Python):
S = input()

if int(S[5]) == 0 and int(S[6]) < 5:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
S=input()

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

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

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

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

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

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

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

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

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

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

Solution (Python):
s = input()

d = s.split("/")
if int(d[0]) > 2019:
    print("TBD")
elif int(d[0]) < 2019:
    print("Heisei")
elif int(d[1]) < 5:
    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:
        print("TBD")
    else:
        print('Heisei')
else:
    print('Heisei')

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

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

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

Solution (Python):
S=list(input())
s=S[:4]+S[5:7]+S[8:]
print("Heisei" if int(''.join(s))<=20190430 else "TBD")

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

Solution (Python):
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

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

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

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

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

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

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

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

Solution (Python):




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


if __name__ == "__main__":
    main()

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

Solution (Python):
S = input()

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

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

if Y >= 2019 and M >= 5:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
S = str(input())
S1 = S[:4] + S[5:7] + S[8:]
S2 = int(S1)
if S2 <= 20190430:
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
import sys
import datetime
def input(): return sys.stdin.readline().rstrip()

def main():
    Y, M, D = map(int, input().split('/'))
    if datetime.date(Y, M, D) <= datetime.date(2019, 4, 30):
        print('Heisei')
    else:
        print('TBD')

if __name__ == '__main__':
    main()

Solution (Python):
import datetime as dt

def main(S):
    return 'Heisei' if S <= dt.datetime(2019,4,30,0,0,0) else 'TBD'

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

Solution (Python):
b = input()

if b[:7] == "2019/01":
  print("Heisei")
elif b[:7] == "2019/02":
  print("Heisei")
elif b[:7] == "2019/03":
  print("Heisei")
elif b[:7] == "2019/04":
  print("Heisei")
else:
  print("TBD")

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

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

Solution (Python):
S=str(input())
date=str(S[5])
date=date+S[6]
date=date+S[8]
date=date+S[9]
if date<='0430':
  print('Heisei')
else:
  print('TBD')

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

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

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

Solution (Python):
import sys

INPUT = lambda: sys.stdin.readline().rstrip()

sys.setrecursionlimit(10 ** 9)


def main():
    S = [int(s) for s in list(map(str, INPUT().split('/')))]
    print("Heisei" if S[0] < 2019 or (S[0] == 2019 and S[1] < 5) else "TBD")


if __name__ == '__main__':
    main()

Solution (Python):
S=input()

lis=S.split("/")

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

Solution (Python):
s = input()
s = s[0]+s[1]+s[2]+s[3]+s[5]+s[6]+s[8]+s[9]
if int(s) <= 20190430:
    print("Heisei")
else:
    print("TBD")

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

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

Solution (Python):
s = str(input())
year = ""
for i in range(0,4):
    year += s[i]
year = int(year)
if(s[5] == 0):
    mon = int(s[6])
else:
    mon = int(s[5] + s[6])
if(year >= 2019):
    if(year >= 2020):
        print("TBD")
    elif(mon >= 5):
        print("TBD")
    else:
        print("Heisei")
else:
    print("Heisei")

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

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

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

Solution (Python):
S = input()
ans = "TBD"
if int(S[:4]) <= 2018:
  ans = "Heisei"
elif int(S[:4]) ==2019 and int(S[5:7]) <=4:
  ans = "Heisei"
 
print( ans)

Solution (Python):
import sys
import math
import itertools

s=input()
year=int(s[0:4])
if not s[5]=="0":
	month=int(s[5:7])
else :
	month=int(s[6])
day=int(s[8:10])
if year>=2020:
	print("TBD")
elif year<=2018:
	print("Heisei")
elif month>=5:
	print("TBD")
else :
	print("Heisei")

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

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

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

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

isHeisei = False
if y <= 2019:
    if m <= 4:
        if d <= 30:
            isHeisei = True
print(["TBD", "Heisei"][isHeisei])

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

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

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 or (y >= 2019 and m < 5):
  print('Heisei')
else:
  print('TBD')

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

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

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

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

Solution (Python):
S=raw_input()
month=int(S[5:7])
if month>=5:
  print "TBD"
else:
  print "Heisei"

Solution (Python):
s = raw_input()

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

Solution (Python):
s = raw_input()

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

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

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

    print(result)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
S = input()

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

Solution (Python):
import datetime

year, month, day = map(int, input().split('/'))
date = datetime.datetime(year, month, day)
heisei = datetime.datetime(2019, 4, 30)

if date <= heisei:
    print('Heisei')
else:
    print('TBD')

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

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

Solution (Python):
"""
author : halo2halo
date : 16, Jan, 2020
"""

import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

YMD = readline().decode('utf8').rstrip().split('/')

MD=int(''.join(YMD[1:]))
print('Heisei' if MD <=430 else 'TBD')