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:
# coding: utf-8
import sys
# import bisect
# import math
# import itertools
# import numpy as np


"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        # 参考
        # https://blog.rossywhite.com/2018/08/06/bit-search/
        # https://atcoder.jp/contests/abc105/submissions/4088632
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    # output.append(a[j])
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)


"""ここからメインコード"""


def main():
    # 1文字に省略
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    s = ip.S()
    y = int(s[0:4])
    m = int(s[5:7])
    d = int(s[8:10])

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


main()

Submission status: Accepted

Solution code:
s = input()
y = int(s[:4])
m = s[5:7]
if m[0] == "0":
    m = int(m[1])
else:
    m = int(m)
d = int(s[8:])

state = True

if y > 2019:
    state = False
elif y == 2019:
    if m > 4:
        state = False
if state:
    print("Heisei")
else:
    print("TBD")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=input()
aa=a.split('/')
year=int(aa[0])
month=int(aa[1])
day=int(aa[2])
judge=0
if year<2019:
    judge=0
elif year>2019:
    judge=1
else:
    if month>4:
        judge=1
    else:
        judge=0

if judge==1:
    print('TBD')
else:
    print('Heisei')

Submission status: Accepted

Solution code:
s = input()

m = s[5:7]

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

Submission status: Accepted

Solution code:
#119-A
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return input()
s=input().split("/")
s=s[0]+s[1]+s[2]
s=int(s)
if s<=20190430:
    print("Heisei")
else:
    print("TBD")

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def main():
  year, month, _ = map(int, input().split('/'))
  ans = 'TBD'

  if year < 2019 or (year == 2019 and month <= 4):
    ans = 'Heisei'

  print(ans, flush=True)


if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

ans = "Heisei"

if y == 2019 and m > 4 or y > 2019:
    ans = "TBD"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
y, m, d = map(int, input().split("/"))
flg = y < 2019 or (y == 2019 and m < 4) or (y == 2019 and m == 4 and d <= 30)
print('Heisei' if flg else 'TBD')

Submission status: Accepted

Solution code:
S = input()

year = int(S[:4])
if year > 2019:
    print('TBD')
elif year == 2019:
    month = int(S[5:7])
    if month > 4:
        print('TBD')
    else:
        print('Heisei')
else:
    print('Heisei')

Submission status: Accepted

Solution code:
def solve():
    S = input().split('/')
    S = [int(i) for i in S]
    if(S[0]<2019):
        return (print('Heisei'))
    elif(S[0]>2019):
        return (print('TBD'))
    elif(S[0]==2019 and S[1]>=5):
        return (print('TBD'))
    else:
        return (print('Heisei'))
solve()

Submission status: Accepted

Solution code:
from sys import stdin
N=(stdin.readline().rstrip())
if int(N.replace("/","")) > 20190430:
  print("TBD")
else:
  print("Heisei")

Submission status: Accepted

Solution code:
(year, month, date) = map(int, input().split('/'))
print("Heisei" if 4 >= month else "TBD")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    S = input_raw[0]
    [y, m, d] = S.split("/")
    x = int(m)* 100 + int(d)
    if x <= 430:
        print "Heisei"
    else:
        print "TBD"
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
TH = 20190430

inp = int("".join(input().split('/')))

if inp <= TH:
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 16 20:52:46 2019

@author: Owner
"""


import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter
import itertools
import copy

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

"""
N, X = map(int, input().split())

x = [0]*N
x[:] = map(int, input().split())

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())
    
all(nstr.count(c) for c in '753')

# 複数配列を並び替え
ABT = zip(A, B, totAB)
result = 0
# itemgetterには何番目の配列をキーにしたいか渡します
sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)

# 2進数のbit判定
(x >> i) & 1

# dp最小化問題
dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break

"""

S = input()
T = S.split('/')

date = int(T[1]+T[2])
if date <= 430:
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

Solution code:
from datetime import datetime as dt
start = dt.strptime(input(), '%Y/%m/%d')
print('TBD' if start > dt.strptime("2019/04/30", '%Y/%m/%d') else 'Heisei')

Submission status: Accepted

Solution code:
y, m, d = [int(elem) for elem in input().split("/")]

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3


import datetime


F = "%Y/%m/%d"
C = "2019/04/30"


def str2date(s):
    return datetime.datetime.strptime(s, F)


def is_heisei(s):
    d0 = str2date(C)
    d1 = str2date(s)
    return d1 <= d0


def main():
    print("Heisei" if is_heisei(input()) else "TBD")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
 
v = ""
for line in sys.stdin:
    v = [int(i) for i in line.split("/")]
 
if v[0] < 2019:
  print("Heisei")
elif v[0] == 2019 and v[1] <= 4 and v[2] <= 30:
  print("Heisei")
else:
  print("TBD")

Submission status: Accepted

Solution code:
s = int(''.join(input().split('/')))
if s <= 20190430:
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
year = int(s[0:4])
month = int(s[5:7])
day = int(s[8:10])
if year < 2019:
    print('Heisei')
elif year == 2019 and month < 4:
    print('Heisei')
elif year == 2019 and month == 4 and day < 31:
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

Solution code:
y,m,d = map(int,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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A
S = input()
res = (int(S[5:7]) <= 4)
    
def print_answer(res):
    if res:
        print("Heisei")
    else:
        print("TBD")
print_answer(res)

Submission status: Accepted

Solution code:
import datetime
date_str = input()
heisei_str = "2019/04/30"
date_formatted = datetime.datetime.strptime(date_str, "%Y/%m/%d")
date_formatted_heisei = datetime.datetime.strptime(heisei_str, "%Y/%m/%d")

if date_formatted <= date_formatted_heisei :
    print("Heisei")
else :
    print("TBD")

Submission status: Accepted

Solution code:
S=input()
month=int(S[5:7])
if month<5:
  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")
      exit()
if s[0]<2019:
  print("Hesisei")
  exit()
print("TBD")

Submission status: Accepted

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

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

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:
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = map(int,input().split())   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = list(map(int,input().split()))	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]


from collections import defaultdict, Counter
import math
from bisect import bisect_left, bisect_right
import numpy as np

S = input()

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

if year >= 2019:
    if month > 4:
        print("TBD")
    else:
        print("Heisei")
else:
    print("Heisei")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
import sys

s = str(sys.stdin.readline().rstrip())
s = s.split("/")
s_n = int(s[0])*10000 + int(s[1])*100 + int(s[2])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = str(input())
slist=list(S)
year=""
mon=""
day=""
for i in range(10):
    if i < 4: 
        year+=slist[i]
    elif i < 7 and i!=4:
        mon+=slist[i]
    elif i < 10 and i!=4 and i!=7:
        day+=slist[i]
if int(year) <= 2019:
    if int(mon) <= 4:
        if int(day) <= 30:
            print("Heisei")
        else:
            print("TBD")
    else:
        print("TBD")
else:
    print("TBD")

Submission status: Accepted

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

result = 'TBD'

if y<=2018:
    result='Heisei'
elif y==2019:
    if m<=3:
        result='Heisei'
    elif m==4:
        if d<=30:
            result='Heisei'

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8


yes = 'Heisei'
no = 'TBD'

def main():
    y, m, d = map(int, input().split('/'))
    if y < 2019:
        print(yes)
        return
    if y == 2019:
        if m <= 4:
            print(yes)
            return
    print(no)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

m = int(s[5:7])
d = int(s[8:11])

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

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 m <= 4:
    print("Heisei")
else:
    print("TBD")

Submission status: Accepted

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

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

print(["TBD", "Heisei"][H])

Submission status: Accepted

Solution code:
s=input()

s_date = list(map(int,s.split('/')))

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

Submission status: Accepted

Solution code:
from datetime import datetime, timedelta

def main():
    s = input()
    d = datetime.strptime(s, '%Y/%m/%d')
    if d < datetime(2019, 4, 30) + timedelta(days=1):
        print('Heisei')
    else:
        print('TBD')

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main(inp):
    y,m,d=map(int,next(inp).split("/"))
    
    if(m<=4): return """Heisei
"""
    else: return """TBD
"""
    
print(main(sys.stdin))

Submission status: Accepted

Solution code:
S = input()
y, m, d = int(S[:4]), int(S[5:7]), int(S[8:])
H, T = 'Heisei', 'TBD'
if y < 2019:
    print(H)
elif y > 2019:
    print(T)
else:  # y == 2019
    if m < 4:
        print(H)
    elif m > 4:
        print(T)
    else:
        print(H)

Submission status: Accepted

Solution code:
s = list(map(int, input().split('/')))
if s[1] < 4 or (s[1] == 4 and s[2] <= 30):
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S=input()

year=int(S[0:4])
month=int(S[5:7])
if year<2019:
  print('Heisei')
elif year>2019:
  print('TBD')
else:
  if month<=4:
    print('Heisei')
  elif month>4:
    print('TBD')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = str(input())

day = s[-2:]

month = s[5:7]

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

Submission status: Accepted

Solution code:
#import sys
#input = sys.stdin.readline
import random
import bisect
#from statistics import mean, median, variance, stdev

#template input

def IT(): #整数1個
    return int(input())
def IL(): #整数複数
    return [int(_) for _ in input().split()]
def IS(): #文字列複数
    return [_ for _ in input().split()]
def ILS(n): #整数1つ　縦にズラーってなってるやつ
    return [int(input()) for _ in range(n)]
def SLS(n): #文字列　縦にズラーってなってるやつ
    return [input() for _ in range(n)]
def ILSS(n): #整数複数　縦にズラーってなってるやつ
    return [[int(_) for _ in input().split()] for j in range(n)]

#template technique
def bit_full_search(ss):
    n = len(ss)
    for i in range(1 << n):
        s = ""
        for j in range(n + 1):
            if ((1 & i >> j) == 1):
                s += ss[j]
        print(s)
def bit_full_search2(A):
    #https://blog.rossywhite.com/2018/08/06/bit-search/
    value = []
    for i in range(1 << len(A)):
        output = []

        for j in range(len(A)):
            if ((i >> j) & 1) == 1:
                #output.append(A[j])
                output.append(A[j])
        value.append([format(i, 'b').zfill(16), sum(output)])

    value.sort(key=lambda x:x[1])
    bin = [value[k][0] for k in range(len(value))]
    val = [value[k][1] for k in range(len(value))]
    return bin, val
def matching_bisect(list1_val, list2_val, n):
    #2分探索
    j = 0
    for i in range(len(list1_val)):
        j = bisect.bisect_left(list2_val, n - list1_val[i])
        if j < len(list2_val):
            if list1_val[i] + list2_val[j] == n:
                #ans = list2_bin[j] + list1_bin[i]
                break
    return j

"""ここからメインコード"""


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

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



main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def main():
	Y, M, D = map(int, input().split('/'))
	if Y < 2019 or (M <= 4 and D <= 30):
		print("Heisei")
	else:
		if Y == 2019:
			if M >= 5:
				print("TBD")
			else:
				print("Heisei")
		else:
			print("TBD")

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

heisei = True
if y < 2019:
    heisei = True
elif y == 2019:
    if m < 4:
        heisei = True
    elif m == 4:
        if d <= 30:
            heisei = True
        else:
            heisei = False
    else:
        heisei = False
else:
    heisei = False

if heisei is True:
    print("Heisei")
else:
    print("TBD")

Submission status: Accepted

Solution code:
S = list(input().split("/"))
S[0] = int(S[0])
S[1] = int(S[1])
S[2] = int(S[2])

ans = "Heisei"

if (S[0] >= 2019) :
    if S[1] >= 5 :
        ans = "TBD"
    elif S[1] == 4 :
        if S[2] == 31 :
            ans = "TBD"
print(ans)

Submission status: Accepted

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

tbd = False

if Y > 2019:
    tbd = True

elif Y < 2019:
    tbd = False

elif M <= 4:
    tbd = False

else:
    tbd = True

print('TBD' if tbd else 'Heisei')

Submission status: Accepted

Solution code:
S=input()

S_l=S.split('/')

if int(S_l[1])>4:
       print('TBD')
else:
       print('Heisei')

Submission status: Accepted

Solution code:
# coding: utf-8
y, m, d = list(map(int, input().split('/')))
if y == 2019:
  if m <= 4:
    print('Heisei')
  else:
    print('TBD')
elif y < 2019:
  print('Heisei')
else:
  print('TBD')

Submission status: Accepted

Solution code:
s = input()
a = list(map(int, s.split("/")))
if a[0] > 2019:
    print("TBD")
elif a[0]<2019:
    print('Heisei')
elif a[1] < 5:
    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 m < 5:
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

Solution code:
data = input().split("/")
Y = int(data[0])
M = int(data[1])
D = int(data[2])
if Y > 2019 or (Y == 2019 and M > 4) or (Y == 2019 and M == 4 and D > 30):
    print("TBD")
else:
    print("Heisei")

Submission status: Accepted

Solution code:
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')
    else:
        print('TBD')

Submission status: Accepted

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
S = input()

l = S.split("/")

ans = "Heisei"
if int(l[0]) > 2019:
    ans = "TBD"
elif l[0] == "2019":
    if int(l[1]) > 4:
        ans = "TBD"
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin

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

Submission status: Accepted

Solution code:
import datetime

s=str(input())

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

Submission status: Accepted

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

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

if y <= 2019:
    if m <= 4:
        if d <= 30:
            print('Heisei')
            exit()

print('TBD')

Submission status: Accepted

Solution code:
S = input().split("/")
S = [int(e) for e in S]
if S[0] > 2019:
    print("TBD")
    exit()
if S[1] > 4:
    print("TBD")
    exit()
if S[2] > 30:
    print("TBD")
    exit()
print("Heisei")

Submission status: Accepted

Solution code:
a = list(map(int,input().split("/")))
x = int(a[0])*10000+int(a[1])*100+int(a[2])
if x <= 20190430:
  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) | ((y==2019)&(m<4)) | ((y==2019)&(m==4)&(d<=30)):
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

Solution code:
from datetime import datetime

S = input()

year, month, day = map(int, S.split("/"))

print(["TBD", "Heisei"][datetime(year, month, day)<=datetime(2019, 4, 30)])

Submission status: Accepted

Solution code:
import datetime
S = input()
date = datetime.datetime.strptime(S, "%Y/%m/%d")
if date > datetime.datetime(2019, 4, 30):
    print("TBD")
else:
    print("Heisei")

Submission status: Accepted

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

f =False 

if Y < 2019:
	f = True
if Y <= 2019:
	if M <= 4:
		f = True

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

Submission status: Accepted

Solution code:
S = input()

import datetime
he = datetime.datetime(2019, 4, 30)
ta = datetime.datetime.strptime(S, '%Y/%m/%d')

if he < ta:
    print("TBD")
else:
    print("Heisei")

Submission status: Accepted

Solution code:
Y,M,D=map(int,raw_input().split('/'))

#print Y, M, D

if Y < 2019:
    print 'Heisei'
elif M < 5:
    print 'Heisei'
else:
    print 'TBD'

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
# A,B,C = [int(n) for n in input().split()]
# N = int(input())
# A = [0]*N
# for i in range(N):
#     A[i] = int(input())
S = str(input())
# T = str(input())
if(int(S[6]) +int(S[5])*10  > 4 or (int(S[6]) == 4 and int(S[8])*10 +int(S[9])  > 30 ) ):
    print("TBD")
else:
    print("Heisei")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
s = input()
if int(s[:4]) < 2019:
    print("Heisei")
elif int(s[:4]) == 2019 and int(s[5:7]) <= 4:
    print("Heisei")
else:
    print("TBD")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:

row_str = input()
data = row_str.split('/')

hiduke = [int(d) for d in data]

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

Submission status: Accepted

Solution code:
date = input().split("/")
#print(date)

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

Submission status: Accepted

Solution code:
S = input()

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

str = "TBD"

if y < 2019:
  str = "Heisei"
elif y == 2019:
  if m <= 4:
    str = "Heisei"

print(str)

Submission status: Accepted

Solution code:
s = input()

si = int(s.replace('/', ''))

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

Submission status: Accepted

Solution code:
a, b, c = [int(i) for i in input().split("/")]

if a>2019:
    print("TBD")
elif a<2019:
    print("Heisei")
elif b>4:
    print("TBD")
else:
    print("Heisei")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
a=S[:4]
b=S[5:7]
c=S[8:10]
# print(a, b, c)
d=int(a+b+c)
# print(d)
print("Heisei" if d<=20190430 else "TBD")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
S = input().split('/')
t=int(S[0]+S[1]+S[2])

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 'Heisei'
if y >= 2019:
    if m > 4:
        ans = 'TBD'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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