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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
s = input()
m = int(s[5:7])
d = int(s[8:])
if m <= 4:
    print('Heisei')
elif m > 4:
    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 = input()
if S <= "2019/04/30":
    print("Heisei")
else:
    print("TBD")

Submission status: Accepted

Solution code:
s=input()

if int(s[5:7])<=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:
s = input()
if s <= '2019/04/30':
    print('Heisei')
else:
    print('TBD')

Submission status: Runtime Error

Solution code:
s = input()

year = s[:4]
mo = s[5:7]
da = s[8:]

if year < 2019:
  ans = "Heisei"
elif year == 2019 and mo<= 4:
  ans ='Heisei'
else:
  ans = 'TBD'
print(ans)

Submission status: Runtime Error

Solution code:
s = map(str,input().split())
if int(s[5]) == 1:
  print("TBD")
elif int(s[6]) <= 4:
  print("Heisei")
else:
  print("TBD")

Submission status: Runtime Error

Solution code:
S=input()
l=S.split('/')
if l[0]<=2019:
    if l[1]<=4:
        if l[2]<=30:
            print('Heisei')
            exit()
    print('TBD')

Submission status: Runtime Error

Solution code:
a = input()
if a[6] > 4:
  print('TBD')
elif a[6] < 3:
  print('heisei')
else:
  if a[8] < 2:
    print('heisei')
  else:
    if a[9] > 0:
      print('heisei')
    else:
      print('TBD')

Submission status: Runtime Error

Solution code:
S =input()
if int(S[:4])<2018:
  print("Heisei")
elif int(S[:4])>2019:
  print("TBD")
else:
  if int(S[6:8])>4:
    print("TBD")
  else:
    print("Heisei")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
sum=0
for j in range(n):
  i,c=input().split()
  if c=="BTC":
    sum+=float(i)*380000
  else:
    sum+=int(i)
print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=input()
print(["Heisei,""TBD"][int(S[5:7]+S[8:10])>430])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = str(input())
year = ''
month = ''
day = ''

for i in range(4):
    y = s[i]
    year += y
for i in range(5, 7):
    m = s[i]
    month += m
for i in range(9, 11):
    d = s[i]
    day += d

year = int(year)
month = int(month)
day = int(day)

if year < 2019:
    answer = 'Heisei'

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

else:
    answer = 'TBD'
    
print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(input())
year = int(s[:4])
manth = 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: Runtime Error

Solution code:
n=int(input())
ans=float(0)
for i in range(n):
    a=list(map(str,input()))
    a[0]=float(a[0])
    if a[1]=='BTC':
        ans+=a[0]*380000.0
    else:
        ans+=a[0]
print(ans)

Submission status: Runtime Error

Solution code:
N, A, B, C = map(int, input().split())
l = [int(input()) for i in range(N)]
INF = 10**9

def dfs(cur, a, b, c):
    if cur == N:
        return abs(a-A) + abs(b-B) + abs(c-C) - 30 if min(a,b,c)>0 else INF

    ans = INF
    ans = min(ans, dfs(cur+1, a, b, c))
    ans = min(ans, dfs(cur+1, a + l[cur], b, c)+10)
    ans = min(ans, dfs(cur+1, a, b+l[cur], c)+10)
    ans = min(ans, dfs(cur+1, a, b, c+l[cur])+10)
    return ans

print(dfs(0, 0, 0, 0))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split(' '))
ymd = tuple(map(int, input().split('/')))

if ymd <= (2019, 4, 30):
    print('Heisei')
else:
    print('TBD')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
T = input()
if T[0:-1] == S:
  print("Heisei")
else:
  print("TBD")

Submission status: Runtime Error

Solution code:
a,b,c = input().split(/)
A = a + b + c
if A <= "20190430" :
    print("Heisei")
else :
    print("TBD")

Submission status: Runtime Error

Solution code:
s = input()
if s[5] == "1":
    print("TBD")
elif s[6] == "4" or s[6] == "3" s[6] == "2" s[6] == "1":
    print("Heisei")
else:
    print("TBD")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
s2 = s.strip('/')
s3 = int(s2)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
inf = float("INF")
a,b,q = map(int, input().split())
s = [None] * (a + 3)
s[0:2] = [-inf,-inf]
s[-1] = inf
t = [None] * (b + 3)
t[0:2] = [-inf,-inf]
t[-1] = inf
for i in range(a):
	s[i+2] = int(input())
for i in range(b):
	t[i+2] = int(input())

from bisect import bisect_left

dp0 = [None] * (a+3)
dp1 = [None] * (b+3)

def f(s,t,x,ss,i):
  if i == 0 and dp0[ss] != None: return abs(x - s[ss]) + dp0[ss]
  elif i == 1 and dp1[ss] != None: return abs(x - s[ss]) + dp1[ss]
  tr = bisect_left(t, s[ss])
  tl = tr - 1
  if i == 0: dp0[ss] = min(abs(s[ss] - t[tl]), abs(s[ss] - t[tr]))
  if i == 1: dp1[ss] = min(abs(s[ss] - t[tl]), abs(s[ss] - t[tr]))
  return abs(x - s[ss]) + min(abs(s[ss] - t[tl]), abs(s[ss] - t[tr]))


for _ in range(q):
  ans = inf
  x = int(input())
  sr = bisect_left(s, x)
  ans = min(ans, f(s,t,x,sr,0))
  ans = min(ans, f(s,t,x,sr - 1,0))
  tr = bisect_left(t, x)
  ans = min(ans, f(t,s,x,tr,1))
  ans = min(ans, f(t,s,x,tr - 1,1))
  print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
b =a[0]+a[1]+a[2]+a[3]+a[5]+a[6]+a[8]+a[9]
c =int(a)
if c <= 20190430:
  print('Heisei')
else:
  print('TBD')

Submission status: Runtime Error

Solution code:

s = list(int(input()))

if (s[5]*10 + s[6]) <= 4 and (s[8]*10 + s[9]) <=30:
    print("Heisei")
else:
    print("TBD")

Submission status: Runtime Error

Solution code:
import bisect
a,b,q = map(int,input().split())
s = [-10**11]+[int(input()) for _ in range(a)]+[10**11]
t = [-10**11]+[int(input()) for _ in range(b)]+[10**11]
for i in range(q):
  ans = 10**11
  x = int(input())
  l = bisect.bisect(s,x)
  m = bisect.bisect(t,x)
  arr = [[s[l-1],s[l]],[t[m-1],t[m]]]
  for i in range(4):
    S = 0
    now = x
    for j in range(2):
      S += (now-arr[j][i >> j & 1])*(-1)**(((now-arr[j][i >> j & 1])<0))
      now = arr[j][i >> j & 1]
    if ans > S:
      ans = S
  for i in range(4):
    S = 0
    now = x
    for j in range(2):
      S += (now-arr[1-j][i >> j & 1])*((-1)**((now-arr[1-j][i >> j & 1])<0))
      now = arr[1-j][i >> j & 1]
    if ans > S:
      ans = S
  print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=list(map(str,input()))
a=int(S[0S=list(map(str,input()))
a=int(S[0]+S[1]+S[2]+S[3])
b=int(S[5]+S[6])
if(a>2019):
    print("TBD")
elif a==2019 and b>=5:
    print("TBD")
else:
    print("Heisei")

Submission status: Runtime Error

Solution code:
S = input()
print('Heisei' if S[5, 7] < '04' or (S[6] == 4 and S[8,] < '31') else 'TBD')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = int(input())

# s = "2019/11/01"
yyyy = int(s[0:4])
mm = int(s[5:7])
dd = int(s[8:10])


if yyyy >= 2019 and mm >= 5:
    print("TBD")
else:
    print("Heisei")

Submission status: Runtime Error

Solution code:
s1,s2,s3=input().split('/')
if s1<2018:print('Heisei')
elif s1=='2019' and s2<='04':print('Heisei')
else:print('TBD')

Submission status: Runtime Error

Solution code:
s1,s2,s3=input().split('/')
s=s1+s2+s3
if s<=20190430:print('Heisei')
else:print('TBD')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
y, m, d = input().split("/")
if y * 365 + m * 12 + d > 2019 * 365 + 4 * 12 + 30:
  print("TBD")
else:
  print("Heisei")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<stdio.h>
#include<vector>//s1.erase(n)=文字列s1の、n文字目以降削除
#include<algorithm>//辞書順=next_permutation
#include<set>
#include<string>//char 小文字のほうが32大きい
#include<sstream>
#include<string.h>
#include<complex>
#include<time.h>
#include<random>
#include<cmath>
#include<math.h>
#include<queue>
#include<time.h>
#include<iomanip>
#include<locale>
#include<utility>//swap=数値交換
#define rt "\n"
#define rep(i,n) for(int i=0;i<n;i++)
#define rop(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n-1;0<=i;i--)
#define drop(i,n) for(int i=n;0<i;i--)
#define yes(ans) if(ans)cout<<"yes"<<rt;else cout<<"no"<<rt;
#define Yes(ans) if(ans)cout<<"Yes"<<rt;else cout<<"No"<<rt;
#define YES(ans) if(ans)cout<<"YES"<<rt;else cout<<"NO"<<rt;
#define sec(a,b,ans) if(ans)cout<<a<<rt;else cout<<b<<rt;
#define vcin(s,n) rep(i,n)cin>>s[i];//vcin(配列名),(繰り返し回数)
#define sort(s) sort(s.begin(),s.end())//標準=昇順
#define reve(s) reverse(s.begin(),s.end())
#define asas int ans=0
#define llcncn llint cnt=0
#define llasas llint ans=0
#define str string
#define please return
#define AC 0
#define Rapid cin.tie(0);ios::sync_with_stdio(false)
#define Pi 3.1415926535897932384626
#define nine 1000000000

using namespace std;
typedef vector<int> vint;
typedef vector<string> vstr;
typedef vector<char> vchar;
typedef vector<double> vdou;
typedef long long int llint;
typedef pair<int, int> pint;
typedef pair<llint, llint> pllint;
typedef vector<llint> vllint;
typedef vector<pint> vpint;
typedef vector<pair<llint, llint>> vpllint;
typedef vector<vector<int>> vvint;
typedef vector<vector<char>> vvchar;
typedef vector<vector<llint>> vvllint;
typedef vector<vector<string>> vvstr;
typedef vector<vector<bool>> vvbool;
typedef vector<vector<pint>> vvpint;
typedef vector<bool> vbool;

long long GCD(long long a, long long b) {
	if (b == 0) return a;
	else return GCD(b, a % b);
}

long long LCM(long long a, long long b) {
	return a * b / GCD(a, b);
}

unsigned GetDigit(unsigned num) {
	return std::to_string(num).length();
}

int tow(int n) {//2のn乗
	if (n == 0)return 1;
	int x = tow(n / 2);
	x *= x;
	if (n % 2 == 1)x *= 2;
	return x;//@domino
}

/*
 
 (char)toupper(a[n])=文字列のn文字目を大文字で出力

  pow(a,b)=aのb乗

  */

int a = 0, b = 0, c = 0;

int main(void) {

	string s,t="2019/04/30";
	cin >> s;
	if (s > t)cout << "TBD" << rt;
	else cout << "heisei" << rt;

	please AC;
}

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<stdio.h>
#include<vector>//s1.erase(n)=文字列s1の、n文字目以降削除
#include<algorithm>//辞書順=next_permutation
#include<set>
#include<string>//char 小文字のほうが32大きい
#include<sstream>
#include<string.h>
#include<complex>
#include<time.h>
#include<random>
#include<cmath>
#include<math.h>
#include<queue>
#include<time.h>
#include<iomanip>
#include<locale>
#include<utility>//swap=数値交換
#define rt "\n"
#define rep(i,n) for(int i=0;i<n;i++)
#define rop(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n-1;0<=i;i--)
#define drop(i,n) for(int i=n;0<i;i--)
#define yes(ans) if(ans)cout<<"yes"<<rt;else cout<<"no"<<rt;
#define Yes(ans) if(ans)cout<<"Yes"<<rt;else cout<<"No"<<rt;
#define YES(ans) if(ans)cout<<"YES"<<rt;else cout<<"NO"<<rt;
#define sec(a,b,ans) if(ans)cout<<a<<rt;else cout<<b<<rt;
#define vcin(s,n) rep(i,n)cin>>s[i];//vcin(配列名),(繰り返し回数)
#define sort(s) sort(s.begin(),s.end())//標準=昇順
#define reve(s) reverse(s.begin(),s.end())
#define asas int ans=0
#define llcncn llint cnt=0
#define llasas llint ans=0
#define str string
#define please return
#define AC 0
#define Rapid cin.tie(0);ios::sync_with_stdio(false)
#define Pi 3.1415926535897932384626
#define nine 1000000000

using namespace std;
typedef vector<int> vint;
typedef vector<string> vstr;
typedef vector<char> vchar;
typedef vector<double> vdou;
typedef long long int llint;
typedef pair<int, int> pint;
typedef pair<llint, llint> pllint;
typedef vector<llint> vllint;
typedef vector<pint> vpint;
typedef vector<pair<llint, llint>> vpllint;
typedef vector<vector<int>> vvint;
typedef vector<vector<char>> vvchar;
typedef vector<vector<llint>> vvllint;
typedef vector<vector<string>> vvstr;
typedef vector<vector<bool>> vvbool;
typedef vector<vector<pint>> vvpint;
typedef vector<bool> vbool;

long long GCD(long long a, long long b) {
	if (b == 0) return a;
	else return GCD(b, a % b);
}

long long LCM(long long a, long long b) {
	return a * b / GCD(a, b);
}

unsigned GetDigit(unsigned num) {
	return std::to_string(num).length();
}

int tow(int n) {//2のn乗
	if (n == 0)return 1;
	int x = tow(n / 2);
	x *= x;
	if (n % 2 == 1)x *= 2;
	return x;//@domino
}

/*
 
 (char)toupper(a[n])=文字列のn文字目を大文字で出力

  pow(a,b)=aのb乗

  */

int a = 0, b = 0, c = 0;

int main(void) {
	Rapid;//固定高速

	string s,t="2019/04/30";
	cin >> s;
	if (s > t)cout << "TBD" << rt;
	else cout << "heisei" << rt;

	please AC;
}

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<stdio.h>
#include<vector>//s1.erase(n)=文字列s1の、n文字目以降削除
#include<algorithm>//辞書順=next_permutation
#include<set>
#include<string>//char 小文字のほうが32大きい
#include<sstream>
#include<string.h>
#include<complex>
#include<time.h>
#include<random>
#include<cmath>
#include<math.h>
#include<queue>
#include<time.h>
#include<iomanip>
#include<locale>
#include<utility>//swap=数値交換
#define rt "\n"
#define rep(i,n) for(int i=0;i<n;i++)
#define rop(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n-1;0<=i;i--)
#define drop(i,n) for(int i=n;0<i;i--)
#define yes(ans) if(ans)cout<<"yes"<<rt;else cout<<"no"<<rt;
#define Yes(ans) if(ans)cout<<"Yes"<<rt;else cout<<"No"<<rt;
#define YES(ans) if(ans)cout<<"YES"<<rt;else cout<<"NO"<<rt;
#define sec(a,b,ans) if(ans)cout<<a<<rt;else cout<<b<<rt;
#define vcin(s,n) rep(i,n)cin>>s[i];//vcin(配列名),(繰り返し回数)
#define sort(s) sort(s.begin(),s.end())//標準=昇順
#define reve(s) reverse(s.begin(),s.end())
#define asas int ans=0
#define llcncn llint cnt=0
#define llasas llint ans=0
#define str string
#define please return
#define AC 0
#define Rapid cin.tie(0);ios::sync_with_stdio(false)
#define Pi 3.1415926535897932384626
#define nine 1000000000

using namespace std;
typedef vector<int> vint;
typedef vector<string> vstr;
typedef vector<char> vchar;
typedef vector<double> vdou;
typedef long long int llint;
typedef pair<int, int> pint;
typedef pair<llint, llint> pllint;
typedef vector<llint> vllint;
typedef vector<pint> vpint;
typedef vector<pair<llint, llint>> vpllint;
typedef vector<vector<int>> vvint;
typedef vector<vector<char>> vvchar;
typedef vector<vector<llint>> vvllint;
typedef vector<vector<string>> vvstr;
typedef vector<vector<bool>> vvbool;
typedef vector<vector<pint>> vvpint;
typedef vector<bool> vbool;

long long GCD(long long a, long long b) {
	if (b == 0) return a;
	else return GCD(b, a % b);
}

long long LCM(long long a, long long b) {
	return a * b / GCD(a, b);
}

unsigned GetDigit(unsigned num) {
	return std::to_string(num).length();
}

int tow(int n) {//2のn乗
	if (n == 0)return 1;
	int x = tow(n / 2);
	x *= x;
	if (n % 2 == 1)x *= 2;
	return x;//@domino
}

/*
 
 (char)toupper(a[n])=文字列のn文字目を大文字で出力

  pow(a,b)=aのb乗

  */

int a = 0, b = 0, c = 0;

int main(void) {
	Rapid;//固定高速

	string s,t="2019/04/30";
	cin >> s;
	string ans;
	if (s <= t)ans = "heisei";
	else ans = "TBD";
	cout << ans << rt;

	please AC;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(map(int,input().split())
if s[5] == 0 and s[6] <= 4:
    print("Heisei")
else:
    print("TBD")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=raw_input()
month=int(S[5:7])
if month>=5:
  print "TBD"
else:
  print "HeiSei"

Submission status: Runtime Error

Solution code:
def main():
    import sys
    input = sys.stdin.readline

    s = input()
    if int(s.strip("'")) < 20190430:
        print('Heisei')
    else:
        print('TBD')
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
from datetime import datetime as dt
import datetime
d1=dt.fromisoformat('2019/04/30'.replace('/', '-'))
d2=dt.fromisoformat(input().replace('/', '-'))
delta=d1-d2
print('Heisei' if delta.days >= 0 else 'TBD')

Submission status: Runtime Error

Solution code:
from datetime import datetime as dt
d1=dt.fromisoformat('2019/04/30'.replace('/', '-'))
d2=dt.fromisoformat(input().replace('/', '-'))
delta=d1-d2
print('Heisei' if delta.days >= 0 else 'TBD')

Submission status: Runtime Error

Solution code:
s = input()
if s[5::6] <= 04 and s[8::9] <= 30:
  print("Heisei")
else:
  print("TBD")

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

int main(){
  char s[11] = {'\0'};
  std::cin >> s;
  int vals[3];
  int count = 0;
  char* pt = strtok(s, "/");
  do{
    vals[count] = atoi(pt);
    count++;
    pt = strtok(NULL, "/");
  }while( pt != NULL );

  if( 2019 > vals[0] ){
    std::cout << "Heisei" << '\n';
  }else if( 2019 == vals[0] ){
    if( 4 >= vals[1] ){
      std::cout << "Heisei" << '\n';
    }else{
      std::cout << "TDB" << '\n';
    }
  }else{
    std::cout << "TDB" << '\n';
  }
  return 0;
}

Submission status: Runtime Error

Solution code:
s = sorted(input())
t = sorted(input())[:: -1]
print("Yes" if s < t else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = tuple(map(int,input().split('/')))
t = tuple(2019,4,30)
print("Heisei" if s <= t else "TBD")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# TLEするので、自前で用意せずに、ライブラリ使おう
# https://juppy.hatenablog.com/entry/2019/02/24/ABC119_-D_Lazy_Faith-_Python_%E7%AB%B6%E6%8A%80%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0_Atcoder

import bisect
A, B, Q = map(int, input().split())
S = sorted([int(input()) for i in range(A)])
T = sorted([int(input()) for i in range(B)])
X = [int(input()) for i in range(Q)]

s_size = A
t_size = B
inf = 99999999999999

for x in X:
  s_index = bisect.bisect_left(S, x)
  s_left = S[s_index - 1] if s_index > 0 else None
  s_right = S[s_index] if s_index < s_size else None
  t_index = bisect.bisect_left(T, x)
  t_left = T[t_index - 1] if t_index > 0 else None
  t_right = T[t_index] if t_index < t_size else None

  ans = inf

  sl = [s_left, s_right]
  tl = [t_left, t_right]

  for s in sl:
    if not s: continue
    c1 = abs(x - s)
    for t in tl:
      if not t: continue
      ans = min(ans, c1 + abs(s-t))


  for t in tl:
    if not t: continue
    c1 = abs(x - t)
    for s in sl:
      if not s: continue
      ans = min(ans, c1 + abs(s-t))

  print(ans)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
if a<=2018:
  print('Heisei')
elif a=2019 and b<=3:
  print('Heisei')
elif a=2019 and b=4 and c<=30:
  print('Heisei')
else:
  print('TBD')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(input())
k = [s[0], s[1], s[2], s[3]]
l = [s[5], s[6]]
a = ''.join(int(_) for _ in k)
b = ''.join(int(_) for _ in l)

if a > 2019:
    print('TBD')

elif a == 2018 and b > 4:
    print('TBD')

else:
    print('Heisei')

Submission status: Runtime Error

Solution code:
s = list(input(s))
k = [s[0], s[1], s[2], s[3]]
l = [s[5], s[6]]
a = int(''.join(k))
b = int(''.join(l))

if a > 2019:
    print('TBD')

elif a == 2018 and b > 4:
    print('TBD')

else:
    print('Heisei')

Submission status: Runtime Error

Solution code:
import datetime

S = input()
ans = "TBD"
datetime.datetime.strptime(S, '%Y/%M/%d')
tbd=datetime(2019/4/30)
if S <= tbd:
    ans="Heisei"
print("ans")

Submission status: Runtime Error

Solution code:
Y, M, D = map(int, input().split("/"))
s = ''.join([Y,M,D])

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

Submission status: Runtime Error

Solution code:
Y, M, D = list(map(int, input().split("/")))
s = ''.join([Y,M,D])

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
Y, M, D = list(map(int, input().split("/")))
s = ''.join([Y,M,D])

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

Submission status: Runtime Error

Solution code:
s = input()
ss = s.replase('/','')

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s = input()
ss = s.aplit('/')
sss = ''.join(ss)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=intput()
if int(s[:4])<=2019:
    if int(s[4:6])<=4:
        if int(s[6:]):
            print("Heisei")
            exit()
print("TBD")

Submission status: Runtime Error

Solution code:
S = input()
wk = S[:4]+S[5:7]+S[8:10]
if wk=<20190430:
    print("Heisei")
else:
    print("TBD")

Submission status: Runtime Error

Solution code:
S = input()
wk = S[:4]+S[5:7]+S[8:10]
if wk<20190430:
    print("Heisei")
else:
    print("TBD")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = [int(input().split('/')) for _ in range(3)]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
date = int(input().replace("/", ""))
if date <= 20190430:
    print("Heisei")
else:
    print("TBD")S = list(map(int, input().split("/")))
ans = True
if S[0] > 2019:
    ans = False
elif S[0] == 2019 and S[1] > 4:
    ans = False

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
X = []
U = []
count = 0

for _ in range(N):
    x, u = map(str, input().split())
    X.append(float(x))
    if u == 'JPY':
        U.append(1)
    else:
        U.append(380000)

for n in range(N):
    count += X[n] * U[n]

print(count)

Submission status: Runtime Error

Solution code:
s = input()
before("Heisei")
after("TBD")
if s[7] == 1 or s[7] == 2 or s[7] == 3 or s[7] == 4:
    print(before)
else:
    print(after)

Submission status: Runtime Error

Solution code:
import dateutil
S = dateutil.parser.parse(input())
base = dateutil.parser.parse('2019/04/30')
if S<=base:
    print("Heisei")
else:
    print("TBD")

Submission status: Runtime Error

Solution code:
n=input()
if int('n[5]+n[6]') >=5:
  print('TBD'):
else:
  print('Heisei')

Submission status: Runtime Error

Solution code:
n=input()
if int(n[5]+n[6]) >=5:
  print('TBD'):
else:
  print('Heisei')

Submission status: Runtime Error

Solution code:
N = int(input())
m = 0
for _ in range(N):
    x,u = map(str,input().split())
    x = float(x)
    if u == "JPY":
        m += x
    else:
        m += x*380000
print(m)