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()
S = S.split("/")

list = ""

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

list = int(list)


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

Solution (Python):
import datetime
a = input().split("/")
a = datetime.date(int(a[0]), int(a[1]), int(a[2]))
b = datetime.date(2019,4, 30)

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

Solution (Python):
import datetime
a = input().split("/")
a = datetime.date(int(a[0]), int(a[1]), int(a[2]))
b = datetime.date(2019,4, 30)

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

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

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

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

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

Solution (Python):
S = input()

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

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

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

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

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

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

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

if int(s[1]) == 4 and int(s[2])<=30:
  print('Heisei')
elif int(s[1]) <= 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*10000 + m*100 + d <= 20190430 :
  print('Heisei')
else:
  print('TBD')

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

Solution (Python):
import datetime

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

Solution (Python):
a = ["01", "02", "03", "04"]
li = list(input().split("/"))
if li[1] in a:
    print("Heisei")
else:
    print("TBD")

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

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

if m*100+d <= 430:
    out = "Heisei"
else:
    out ="TBD"
    
print(out)

Solution (Python):
import sys
s=list(map(int,(input().split('/'))))
month=s[1]
day=s[2]

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

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

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

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):
S = input()
test = S.split("/")
x = int(test[0])
y = int(test[1])
if x <= 2018 :
  print('Heisei')
if x == 2019:
  if y <= 4:
    print('Heisei')
  else:
    print('TBD')
else:
    print('TBD')

Solution (Python):
A = input()

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

Solution (Python):

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

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

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

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

Solution (Python):
s1, s2, s3 = map(int, input().split('/'))

if s1 > 2019:
    print('TBD')
elif s1 < 2019:
    print('Heisei')
else:
    if s2 >= 5:
        print('TBD')
    else:
        print('Heisei')

Solution (Python):
def main():

    """ convenient functions
    
    
    
    
    
    """

    """convenient decorator
    
    
        
        
        
        
        
        
        
        
        
        
    """
    
    
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product 
    
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  
        b, e = 2, 0  
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        numerator = [n - r + k + 1 for k in range(r)]
        denominator = [k + 1 for k in range(r)]
        for p in range(2,r+1):
            pivot = denominator[p - 1]
            if pivot > 1:
                offset = (n - r) % p
                for k in range(p-1,r,p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot
        result = 1
        for k in range(r):
            if numerator[k] > 1:
                result *= int(numerator[k])
        return result
    def combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict 
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest 
    from copy import deepcopy, copy 
    import operator
    from operator import itemgetter
    
    
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd 
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)

    
    
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) 
    def modinv(a, p = MOD):
        
        
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        
        
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    """ initialize variables and set inputs
    
        
        
    
        
        
        
        
        
    
        
        
        
        
    
        
        
    """

    
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    R = lambda: list(map(int, r().split()))
    Rmap = lambda: map(int, r().split())
    Rfloat = lambda: list(map(float, r().split()))
    Rtuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    
    
    
    
    
    
    
    """

    if __name__ != '__main__':
        
        sys.stdin = open('sample.txt')

    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    S = r()
    if int(S[:4]) <= 2018 or int(S[:4]+S[5:7]) < 201905:
        print('Heisei')
    else:
        print('TBD')
    
    
    

    """memo: how to use defaultdict of list
    
    Dic = defaultdict(list)
    
    Dic[x].append(y)
    
    for k, v in Dic.items():
    """

if __name__ == '__main__':
    main()

Solution (Python):
import datetime

s = input()

date = datetime.datetime.strptime(s, '%Y/%m/%d')
border = datetime.datetime(2019,4,30,0,0)

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

Solution (Python):
s=input()
if s[5]==str(1):
    print("TBD")
else:
    if eval(s[6])>4:
        print("TBD")
    else:
        print("Heisei")

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

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

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

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

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

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

Solution (Python):
def main():
    time = list(map(int, input().split('/')))
    if time[0] < 2019:
        print('Heisei')
        return
    if time[1] < 5:
        print('Heisei')
        return
    print('TBD')


main()

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

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

Solution (Python):
import datetime
s=input()

input_date = datetime.datetime.strptime(s, "%Y/%m/%d")
heisei = datetime.datetime(2019,4,30)

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

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

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

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

Solution (Python):
s = input()

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

Solution (Python):
def main():
    Y,M,D = list(map(int,input().split('/')))
    if M<5:
        print('Heisei')
    else:
        print('TBD')
if __name__ =='__main__':
    main()

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


if __name__ == "__main__":
    main()

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

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

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

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

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

if y < 2019:
    print("Heisei")
elif y == 2019:
    if m < 4:
        print("Heisei")
    elif 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:
    ans = "TBD"
elif Y < 2019:
    ans = "Heisei"
else:
    if M < 5:
        ans = "Heisei"
    else:
        ans = "TBD"
print(ans)

Solution (Python):
s = input()

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

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

Solution (Python):
l = str(input())
cnt = 1
month=""
day=""
for i in l:
    if 6<=cnt and cnt<=7:
        month += str(i)
    elif 9<=cnt and cnt<=10:
        day += str(i)
    cnt += 1

month_int = int(month)
day_int = int(day)

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

Solution (Python):

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

Solution (Python):
import re
res = re.match(r"(\d{4})\/(\d+)\/(\d+)", input())
if int(res.group(1)) > 2019 or int(res.group(2)) >= 5:
    print("TBD")
else:
    print("Heisei")

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

if S[0] > 2019:
    ans = 'TBD'
elif S[0] < 2019:
    ans = 'Heisei'
else:
    if S[1] > 4:
        ans = 'TBD'
    elif S[1] <= 4:
        ans = 'Heisei'

print(ans)

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

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

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

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

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

Solution (Python):
a = input()

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

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

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

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

Solution (Python):
S = input()
date = S.split('/')
ans = "Heisei"
if S != "2019/04/30" and (int(date[0]) > 2019 or int(date[1]) > 4):
    ans = "TBD"
print(ans)

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

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

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

year=int(S[0])*1000+int(S[1])*100+int(S[2])*10+int(S[3])
month=int(S[5])*10+int(S[6])

if year<2019:
    ans='Heisei'
elif year>2019:
    ans='TBD'
else:
    if month<=4:
        ans='Heisei'
    else:
        ans='TBD'

print(ans)

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

if year <= 2019:
    if month <= 4:
        if day <= 30:
            print("Heisei")
            exit()

print("TBD")

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

Solution (Python):
import datetime
date_str = input()
date_formatted = datetime.datetime.strptime(date_str, "%Y/%m/%d")
last_heisei = datetime.datetime(2019, 4, 30, 0, 0, 0)
if date_formatted <= last_heisei:
  print("Heisei")
else:
  print("TBD")

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

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

Solution (Python):

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

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

if date[0] < 2019:
    print("Heisei")
elif date[0] == 2019 and date[1] < 4:
    print("Heisei")
elif date[0] == 2019 and date[1] == 4 and date[2] <= 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] <= 2018 or (S[0] == 2019 and S[1] <= 4):
	print("Heisei")
else:
	print("TBD")

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

y = [int(s[i])*10**(3-i) for i in range(4)]
m = [int(s[i])*10**(6-i) for i in range(5, 7)]
d = [int(s[i])*10**(9-i) for i in range(8, 10)]

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
s1 = input()

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

print(r1)

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

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

Solution (Python):
yyyy, mm, dd = map(int, input().split('/'))
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')
    elif dd > 30:
      print('TBD')

Solution (Python):
s = input()

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

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

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

Solution (Python):
y,m,d = input().split("/")
if m == "01" or m == "02" or m == "03" or m == "04":
    print("Heisei")
else:
    print("TBD")

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

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

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

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

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

Solution (Python):
S = input()

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

Solution (Python):
s = str(input())
s = list(s)
s.remove("/")
s.remove("/")
t = str()
for i in range(len(s)):
    t += s[i]

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

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

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

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

Solution (Python):
date=int(''.join(list(input().split('/'))))
print(('Heisei','TBD')[date>=20190501])

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


if  i[1] in ['01','02','03','04']:
  print('Heisei')
else:
  print('TBD')

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

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

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

Solution (Python):
s = input()

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

if year <= 2018:
    print('TBD')
    exit()
elif 2020 <= year:
    print('Heisei')
    exit()
else:
    if month <= 4:
        print('Heisei')
    else:
        print('TBD')

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

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

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

Solution (Python):
import datetime

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

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

if heisei >= date_formatted:
    print("Heisei")
else:
    print("TBD")

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

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

Solution (Python):
import re
S=str(input())
num=int(re.sub(r'\D', '', S))
print('Heisei' if num<=20190430 else 'TBD')

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

Solution (Python):
reiwa = '2019/05/01'
s = input()

if s < reiwa:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
S = input()
s = S[5:7] + S[8:10]
s = int(s)

if s < 501:
  print('Heisei')
else:
  print('TBD')

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

Solution (Python):
S = input().split("/")
if int(S[1])<=4:
    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):
def abc():
    import datetime
    s = input().rstrip()
    dt = datetime.datetime.strptime(s, '%Y/%m/%d')
    base = datetime.datetime(2019, 4, 30)
    if dt <= base:
        print('Heisei')
    else:
        print('TBD')


abc()

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

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

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

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

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

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

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

if Y<=2018:
    print("Heisei")
elif Y==2019 and M<=4:
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
def resolve():
    ans='TBD'
    Y,M,D=map(int,input().split('/'))
    if Y<2019:
       ans='Heisei'
    elif M<5:
       ans='Heisei'

    print(ans)
    
resolve()

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

Solution (Python):

import datetime

S = input()

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

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

if S_datetime <= last_heisei_datetime:
    print('Heisei')
else:
    print('TBD')

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

if Y <= 2019:
  if M<=4:
    print("Heisei")
  else:
    print("TBD")
else:
  print("TBD")

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


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

Solution (Python):
S = input()

manth = int(S[5:7])
day = int(S[-2:])

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

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

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

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

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

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

Solution (Python):
S = input()

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

assert year == 2019

if month >= 5 and day >= 1:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
s = input()

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

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

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

Solution (Python):

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

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

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

if y < 2019 or 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, _ = map(int, input().split("/"))
print("Heisei" if y < 2019 or (y >= 2019 and m <= 4) else "TBD")

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

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

Solution (Python):
y, m, d = map(int, input().strip().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):
if input() <= "2019/04/30":
  print("Heisei")
else:
  print("TBD")

Solution (Python):
y, m, d = [ int(v) for v in input().split("/") ]
date = y* 10000 + m *100 + d
if date <= 20190430:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
S = input()
YMD = S.split('/')
MD = int(''.join(YMD[1:]))

answer = 'Heisei' if MD <= 430 else 'TBD'
print(answer)