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



Sample input:
2019/04/30


Sample output:
Heisei

Submission status: Accepted

Solution code:
def main():

    """ convenient functions
    # for i, a in enumerate(iterable)
    # q, mod = divmod(a, b)
    # divmod(x, y) returns the tuple (x//y, x%y)
    # Higher-order function: reduce(operator.mul, xyz_count, 1)
    # manage median(s) using two heapq https://atcoder.jp/contests/abc127/tasks/abc127_f
    """

    """convenient decorator
    # @functools.lru_cache():
    # to facilitate use of recursive function
        # ex:
        # from functools import lru_cache
        # import sys
        # sys.setrecursionlimit(10**9)
        # @lru_cache(maxsize=None)
        # def fib(n):
        #     if n < 2:
        #         return n
        #     return fib(n-1) + fib(n-2)
        # print(fib(1000))
    """
    
    # import numpy as np
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product # https://docs.python.org/ja/3/library/itertools.html
    # accumulate() returns iterator! to get list: list(accumulate())
    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 = []  # prime factor
        b, e = 2, 0  # base, exponent
        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
        """
        # TODO: How should I do when n - r is negative?
        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 # https://docs.python.org/ja/3/library/collections.html#collections.deque
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest # https://docs.python.org/ja/3/library/heapq.html
    from copy import deepcopy, copy # https://docs.python.org/ja/3/library/copy.html
    import operator
    from operator import itemgetter
    # ex1: List.sort(key=itemgetter(1))
    # ex2: sorted(tuples, key=itemgetter(1,2))
    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 # Deprecated since version 3.5: Use math.gcd() instead.
    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)

    # first create factorial_list
    # fac_list = mod_factorial_list(n)
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) # Recursive function in python is slow!
    def modinv(a, p = MOD):
        # evaluate reciprocal using Fermat's little theorem:
        # a**(p-1) is identical to 1 (mod p) when a and p is coprime
        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):
        # fac_list = modfactorial_list(100)
        # print(modcomb(100, 5, modfactorial_list(100)))
        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
    # initialize variables
        # to initialize list, use [0] * n
        # to initialize two dimentional array, use [[0] * N for _ in range(N)]
    # set inputs
        # open(0).read() is a convenient method:
        # ex) n, m, *x = map(int, open(0).read().split())
        #     min(x[::2]) - max(x[1::2])
        # ex2) *x, = map(int, open(0).read().split())
        #     don't forget to add comma after *x if only one variable is used
    # preprocessing
        # transpose = [x for x in zip(*data)]
        # ex) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] => [(1, 4, 7), (2, 5, 8), (3, 6, 9)]
        # flat = [flatten for inner in data for flatten in inner]
        # ex) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] => [1, 2, 3, 4, 5, 6, 7, 8, 9]
    # calculate and output
        # output pattern
        # ex1) print(*l) => when l = [2, 5, 6], printed 2 5 6
    """

    # functions used
    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
    # single int: int(r())
    # single string: r()
    # single float: float(r())
    # line int: R()
    # line string: r().split()
    # line (str, int, int): [j if i == 0 else int(j) for i, j in enumerate(r().split())]
    # lines int: [R() for _ in range(n)]
    """

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

    # ----------------------------------
    # main

    # N, A, B, C = Rmap()
    # L = [r_int() for _ in range(N)]
    # G = [[0,1,2,3] for _ in range(N)]
    # ans = INF
    # for  i in product(*G):
    #     group_sum = [0] * 4
    #     group_count = [0] * 4
    #     for j, k in enumerate(i):
    #         group_sum[k] += L[j]
    #         group_count[k] += 1
    #     if 0 in group_count[:3]:
    #         continue
    #     ans = min(ans, (abs(A - group_sum[0]) + abs(B - group_sum[1]) + abs(C - group_sum[2]) + (max(group_count[0]-1,0)+max(group_count[1]-1,0)+max(group_count[2]-1,0))*10))
    # print(ans)
    
    S = r()
    if int(S[:4]) <= 2018 or int(S[:4]+S[5:7]) < 201905:
        print('Heisei')
    else:
        print('TBD')
    
    # end of main
    # ----------------------------------

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
#print(int(s[0:4]),s[5:7])
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")

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
#a, b, c = map(int,input().split())
s = input()
date = int("".join(s.split("/")))
if date <= 20190430:
  print("Heisei")
else:
  print("TBD")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC119-A
S=input()
if S<= "2019/04/30":
    print("Heisei")
else:
    print("TBD")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = list(input().split('/'))
#print(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

    print(ans)
    
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
S = input()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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