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:
l=list(map(int,input().split('/')))
if(l[1]<=4):
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

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

S = int(Y+M+D)

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

Submission status: Accepted

Solution code:
S = input().rstrip()
if int(S[:4]) >=2020:
    print("TBD")
    exit()
elif int(S[:4]) ==2019:
    if int(S[5:7]) >= 5:
        print("TBD")
        exit()
    elif int(S[5:7]) >= 4:
        if int(S[8:]) >= 31:
            print("TBD")
            exit()
print("Heisei")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()

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

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()

    y, m, d = map(int, S.split('/'))
    if m <= 4:
        print('Heisei')
    elif m > 4:
        print('TBD')

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def readinput():
    s=input()
    return s

def main(s):
    y=int(s[:4])
    m=int(s[5:7])
    d=int(s[9:])
    if m<=4:
        return 'Heisei'
    else:
        return 'TBD'

if __name__=='__main__':
    s=readinput()
    ans=main(s)
    print(ans)

Submission status: Accepted

Solution code:
y,m,d = map(str, input().split('/'))
ymd = int(y+m+d)
if ymd <= 20190430:
    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:
a,b,c = map (int, input ().split ('/'))
if a > 2019:
  print ('TBD')
else:
  if b*100+c > 430:
    print ('TBD')
  else:
    print ('Heisei')

Submission status: Accepted

Solution code:
a = input()

y = int(a[0:4])
m = int(a[5:7])

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

Submission status: Accepted

Solution code:
from datetime import datetime

S = input()
heiei = datetime(2019, 4, 30)
date = datetime.strptime(S, '%Y/%m/%d')

if heiei >= date:
    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:
a = input()

if a[5:7] in ["01", "02", "03", "04"]:
    print("Heisei")
else:
    print("TBD")

Submission status: Accepted

Solution code:
import datetime

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split("/"))
ans = "Heisei"
if b > 4:
  ans = "TBD"
print(ans)

Submission status: Accepted

Solution code:
s=str(input())
ans="TBD"
if int(s[:4])>2019:
    ans="Heisei"
    
elif int(s[:4])==2019:
    if int(s[5:7])<=4:
        if int(s[8:])<=30:
            ans="Heisei"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

year = ''
for i in range(4):
    y = s[i]
    flag1 = True
    if y == '0':
        if len(year) == 0:
            flag1 = False
        if flag1:
            year += y
    else:
        year += y
year = int(year)

month = ''
for i in range(5, 7):
    m = s[i]
    if i == 5 and m == '0':
        continue
    else:
        month += m
month = int(month)


if year < 2019:
    answer = 'Heisei'

elif year == 2019 and month <= 4:
    answer = 'Heisei'

else:
    answer = 'TBD'

print(answer)

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

s = input()

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



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

Submission status: Accepted

Solution code:
import datetime


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ss = input().split('/')
yyyy = int(ss[0])
mm = int(ss[1])
dd = int(ss[2])

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

Submission status: Accepted

Solution code:
S = list(input())


if S[5] == '1':
    print('TBD')

elif S[6] == '1' or S[6] == '2' or S[6] == '3' or S[6] == '4':
    print('Heisei')

else:
    print('TBD')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

def main():
    s = input().split('/')
    result = int(s[0] + s[1] + s[2])
    if result <= 20190430:
        print('Heisei') 
    else:
        print('TBD')


if __name__ == "__main__":
    main()

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
import re
s = input()
a = re.search(r'\d{4}/(\d)(\d)/\d{2}', s)
if a.group(1) == '0' and (a.group(2) == '1' or a.group(2) == '2' or a.group(2) == '3' or a.group(2) == '4'):
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

Solution code:
y,m,d=[int(x) for x in input().split('/')]
if y < 2019:
  print('Heisei')
elif y > 2019:
  print('TBD')
elif m <= 4:
  print('Heisei')
elif m > 4:
  print('TBD')

Submission status: Accepted

Solution code:
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    y, m, d = input().split('/')
    ymd = int(y + m + d)
    if ymd <= 20190430:
        print('Heisei')
    else:
        print('TBD')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S=input()
month=int(S[5:7])
day=int(S[8:10])
if (month==4 and day<=30) or month<4 :
  print("Heisei")
else :
  print("TBD")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
s=input()
a=re.search('([0-9]{4})/([0-9]{2})/([0-9]{2})',s)
if int(a.group(2))>4:
    print('TBD')
else:
    print('Heisei')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(['TBD','Heisei'][input()<='2019/04/30'])

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split('/'));print(['TBD','Heisei'][a<=2019 and b<=4 and c<=30])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! python3
#  solve_119_A.py

S = input()
date = S[0:4]+S[5:7]+S[8:10] #yyyymmdd式に変更

tag = 20190430

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S,T,U=map(int,input().split("/"))
if S==2019:
  if T<=4:
    print("Heisei")
  else:
    print("TBD")
elif S<2019:
  print("Heisei")
else:
  print("TBD")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# abc119_a.py
# https://atcoder.jp/contests/abc119/tasks/abc119_a

# A - Still TBD /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# 文字列 Sが入力されます。これは、西暦 2019 年の実在する日付を yyyy/mm/dd の形式で表したものです。
# (例えば、2019 年 4 月 30日は 2019/04/30 と表されます。)
# Sが表す日付が 2019 年 4 月 30日またはそれ以前なら Heisei、そうでなければ TBD と出力するプログラムを書いてください。

# 制約
#     Sは西暦 2019年の実在する日付を yyyy/mm/dd の形式で表す文字列である。

# 入力
# 入力は以下の形式で標準入力から与えられる。
# S

# 出力
# Sが表す日付が 2019 年 4 月 30日またはそれ以前なら Heisei、そうでなければ TBD と出力せよ。

# 入力例 1
# 2019/04/30

# 出力例 1
# Heisei

# 入力例 2
# 2019/11/01

# 出力例 2
# TBD


def calculation(lines):
    line = lines[0]
    # N = int(lines[0])
    # N, M = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i+1]))

    yyyymmdd = int(line.replace('/', ''))
    if yyyymmdd <= 20190430:
        result = 'Heisei'
    else:
        result = 'TBD'

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2019/04/30']
        lines_export = ['Heisei']
    if pattern == 2:
        lines_input = ['2019/11/01']
        lines_export = ['TBD']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input().split('/'))
s = [int(ss) for ss in s]

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

Submission status: Accepted

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

Submission status: Accepted

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

if s <= [2019, 4, 30]:
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=list(input())
if int(S[0]+S[1]+S[2]+S[3])==2019:
    if int(S[5]+S[6])<=4:
        print("Heisei")
    else:
        print("TBD")

Submission status: Accepted

Solution code:
S=list(input())
if int(S[0]+S[1]+S[2]+S[3])==2019:
    if int(S[5]+S[6])<=4:
        print("Heisei")
    else:
        print("TBD")
else:
    print("Heisei")

Submission status: Accepted

Solution code:
# 初期入力
import sys
#input = sys.stdin.readline  #文字列では使わない
tstr =input().strip()
from datetime import datetime as dt

#tstr = '2012-12-29 13:49:37'
tdatetime = dt.strptime(tstr, '%Y/%m/%d')
standard ="2019/4/30"
dt_standard =dt.strptime(standard, '%Y/%m/%d')
if tdatetime <= dt_standard:
    print("Heisei")
else:
    print("TBD")

Submission status: Accepted

Solution code:
s = input().split('/')

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

Submission status: Accepted

Solution code:
S=list(input())
if int(S[0]+S[1]+S[2]+S[3])==2019:
    if int(S[5]+S[6])<=4:
        print("Heisei")
    else:
        print("TBD")
else:
    print("Heisei")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
Sint = int(S[:4])*10000 + int(S[5:7])*100 + int(S[8:])
if Sint > 20190430:
    print('TBD')
else:
    print('Heisei')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
m = s.split("/")[1]
d = s.split("/")[2]

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc119
# 8:40-


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


print(main())

Submission status: Accepted

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc119


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


print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

s = input()

if int(s[0:4]) <= 2019:
    if int(s[5:7]) <= 4:
        if int(s[8:]) <= 30:
            print("Heisei")
            exit()

print("TBD")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

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

Submission status: Accepted

Solution code:
import sys
def LS2():
    return list(sys.stdin.readline().rstrip())  #空白なし

S = LS2()

if S[5] == '1' or int(S[6]) >= 5:
    print('TBD')
else:
    print('Heisei')

Submission status: Accepted

Solution code:
def main():
 s = input()
 if s[5] == '0' and ord(s[6]) <= ord('4'):
     print('Heisei')
 else:
     print('TBD')
main()

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=map(int,input().split("/"))
if((Y<=2019 and M <= 4 and D <= 30) or Y<= 2018):
  print("Heisei")
else:
  print("TBD")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

S = input()

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

Submission status: Accepted

Solution code:
import datetime
a,b,c = map(int,input().split("/"))
now = datetime.datetime(a,b,c)
d = now-datetime.datetime(2019,4,30)
print("TBD" if d.days > 0 else "Heisei")

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')

import datetime


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

    S = iss()
    s = datetime.datetime(2019, 4, 30)
    d = datetime.datetime(int(S[:4]), int(S[5:7]), int(S[8:10]))
    if d <= s:
        print('Heisei')
    else:
        print('TBD')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

base = datetime(2019, 4, 30, 0, 0)
compare = datetime(S[0], S[1], S[2], 0, 0)

print('Heisei') if compare <= base else print('TBD')

Submission status: Accepted

Solution code:
import re
a=input()
b=re.fullmatch(r"(\d{4})/(\d{2})/(\d{2})",a)
if int(b.group(1))<2019:
    print("Heisei")

elif int(b.group(1))==2019:
    if int(b.group(2))<=4:
        print("Heisei")

    else:
        print("TBD")

else:
    print("TBD")

Submission status: Accepted

Solution code:
yyyy,mm,dd=map(int,input().split('/'))
if mm<=4:
    print('Heisei')
else:
    print('TBD')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('TBD'*(input()[5:7]>'04')or'Heisei')

Submission status: Accepted

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

if M <= 4:
    if D <= 30:
        print("Heisei")
    else:
        print("TBD")
else:
    print("TBD")

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
import sys

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

s = rr()
if s[5:5+2] > '04':
  print('TBD')
else:
  print('Heisei')

Submission status: Accepted

Solution code:
# a, b = map(int, input().split())
li = list(map(int, input().split("/")))
print("Heisei" if li[1] <= 4 else "TBD")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input().split("/"))
answer = "TBD"

if int(s[0]) <= 2019:
  if int(s[1]) <= 4:
    if int(s[2]) <= 30:
      answer = "Heisei"
      
print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    s = list(map(int, input().split("/")))
    if s[0] > 2019:
        print("TBD")
        return
    
    if s[1] > 4:
        print("TBD")
        return

    # 必要??
    if s[2] > 30:
        print("TBD")
        return

    print("Heisei")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s=input()
t=s[:4]
u=s[5:7]
v=s[8:]
w=int(t+u+v)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()

num=int(S[:4]+S[5:7]+S[8:])


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

Submission status: Accepted

Solution code:
import sys
S=input()
a,b,c=map(int,S.split("/"))
if a<=2019:
  if b<=4:
    print("Heisei")
    sys.exit()
print("TBD")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()

y = S[0:4]
m = S[5:7]
d = S[8:10]

if y < "2019":
    print("Heisei")

elif (y == "2019") and (m < "04"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d <= "30"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d > "30"):
    print("TBD")

elif (y == "2019") and (m >= "05"):
    print("TBD")

elif (y > "2019"):
    print("TBD")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


s = sys.stdin.readline().split('/')
if int(s[0]) < 2019:
    ans = 'Heisei'
if int(s[0]) == 2019 and int(s[1]) <= 4:
    ans = 'Heisei'
else:
    ans = 'TBD'
print(ans)

Submission status: Accepted

Solution code:
s=input()
num=int(s[:4]+s[5:7]+s[8:])
if num<=20190430:
  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:
Y, M, D = map(int, input().split("/"))
if M <= 4:
    print("Heisei")
else:
    print("TBD")

Submission status: Accepted

Solution code:
import datetime
year,month,day = map(int, input().split("/"))
comp1 = datetime.datetime(year, month, day, 0, 0, 0)
comp2 = datetime.datetime(2019, 4, 30, 0, 0, 0)
print("Heisei" if (comp1 <= comp2) else "TBD")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
S = input()

now = int(S[5:7]+S[8:10])
if now <= 430:
    print("Heisei")
else:
    print("TBD")