qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import sys
input = sys.stdin.readline
s = input()
count = 0

if s.count("0") != 0 and s.count("1") != 0:
    if s.count("0") > s.count("1"):
        print(2*s.count("1"))
    elif s.count("1") > s.count("0"):
        print(2*s.count("0"))
    else:
        print(len(s))
else:
    print(0)


Fixed code:
import sys
input = sys.stdin.readline
s = input().rstrip()
 
if s.count("0") != 0 and s.count("1") != 0:
    if s.count("0") > s.count("1"):
        print(2*s.count("1"))
    elif s.count("1") > s.count("0"):
        print(2*s.count("0"))
    else:
        print(len(s))
else:
    print(0)
Buggy code:
S = input()
S = [Si for Si in S]

i = len(S) - 2
number_of_deleted_qube = 0
while i >= 0:
    current = S[i]
    right = S[i + 1]

    if current != right:
        del S[i + 1]
        del S[i]
        number_of_deleted_qube += 2

    i -= 1

print(number_of_deleted_qube)


Fixed code:
S = input()
S = [Si for Si in S]

i = len(S) - 2
number_of_deleted_qube = 0
while i >= 0 and len(S) >= 2:
    if i >= len(S) - 1:
        i -= 1
        continue

    current = S[i]
    right = S[i + 1]

    if current != right:
        del S[i + 1]
        del S[i]
        number_of_deleted_qube += 2

    i -= 1

print(number_of_deleted_qube)
Buggy code:
S = input()
2*min(S.count('0'), S.count('1'))

Fixed code:
S=input()
print(2*min(S.count('1'),S.count('0')))
Buggy code:
S = []
ans = 0
for c in input():
    if c != S[-1] & len(S) > 0:
        S.pop()
        ans += 2
    else:
        S.append(c)
print(ans)

Fixed code:
S = []
ans = 0
for c in input():
    if len(S) > 0 and c != S[-1]:
        S.pop()
        ans += 2
    else:
        S.append(c)
print(ans)
Buggy code:
S = list(input())
obj = min(S.count("0"),S.count("1"))
print((obj-1)*2)

Fixed code:
S = list(input())
obj = min(S.count("0"),S.count("1"))
print(obj*2)
Buggy code:
s=str(input())
a=s.count('0')
print(min(ss,len(s)-ss)*2)


Fixed code:
s=str(input())
a=s.count('0')
print(min(a,len(s)-a)*2)
Buggy code:
s = input()
s0 = 0
s1 = 1
for c in s:
  if c == '0':
    s0 += 1
  else:
    s1 += 1
print(min(s0, s1) * 2)

Fixed code:
s = input()
s0 = 0
s1 = 0
for c in s:
  if c == '0':
    s0 += 1
  else:
    s1 += 1
print(min(s0, s1) * 2)
Buggy code:
s=list(input())
from collections import Counter
d=Counter(s)
print(min(d[0], d[1])*2)


Fixed code:
s=list(input())
from collections import Counter
d=Counter(s)
print(min(d["0"], d["1"])*2)
Buggy code:
s=input()

stack=[]
for si in s:
    stack.append(si)
    if len(stack) >= 2 and stack[-1] != stack[-2]:
        del stack[-2:-1]
print(len(s)-len(stack))

Fixed code:
s=input()

stack=[]
for si in s:
    stack.append(si)
    if len(stack) >= 2 and stack[-1] != stack[-2]:
        del stack[-1]
        del stack[-1]
print(len(s)-len(stack))
Buggy code:
from collections import deque

s = input()
cnt = 0
i = 0
n = len(s)
stack = deque()
updated = True
while updated:
    updated = False
    while i < n and len(stack) > 0 and stack[-1] == s[i]:
        # print(i, stack[-1], s[i])
        updated = True
        stack.pop()
        i += 1
        cnt += 2
    if i < n:
        updated = True
        stack.append(s[i])
    i += 1
# print(stack)
print(cnt)


Fixed code:
from collections import deque

s = input()
cnt = 0
i = 0
n = len(s)
stack = deque()
updated = True
while updated:
    updated = False
    while i < n and len(stack) > 0 and stack[-1] != s[i]:
        updated = True
        stack.pop()
        i += 1
        cnt += 2
    if i < n:
        updated = True
        stack.append(s[i])
    i += 1
# print(stack)
print(cnt)
Buggy code:
s = input()

s0 = 0
s1 = 1

for c in s:
    if c == '0':
        s0 += 1
    else:
        s1 += 1

print(min(s0, s1)*2)


Fixed code:
s = input()

s0 = 0
s1 = 0

for c in s:
    if c == '0':
        s0 += 1
    else:
        s1 += 1

print(min(s0, s1)*2)
Buggy code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S):
    c = Counter(S)
    return min(c.values()) * 2


def main():
    S = read_str()
    print(slv(S))


if __name__ == '__main__':
    main()


Fixed code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S):
    c = Counter(S)
    if len(c) != 2:
        return 0
    return min(c.values()) * 2


def main():
    S = read_str()
    print(slv(S))


if __name__ == '__main__':
    main()
Buggy code:
nums=str(input())
arr=list(map(int,nums))
l=len(arr)
a=0
i=0
while i<len(arr)-1:
    if arr[i]!=arr[i+1]:
        del arr[i:i+2]
        #print(arr)
        a+=2
        i=0
    i+=1
print(a)

Fixed code:
nums=str(input())
arr=list(map(int,nums))
l=len(arr)
a=0
i=0
while i<len(arr)-1:
    if i<0:
        i=0
    if arr[i]!=arr[i+1]:
        del arr[i:i+2]
        #print(arr)
        a+=2
        i-=2
    i+=1
print(a)
Buggy code:
n_list = list(input())
n_len_o = len(n_list)
#print(n_list)
a = 0
while(1):
  flag = "ng"
  n_len = len(n_list)
  for i in range(a,n_len-1):
    if n_list[i] != n_list[i+1]:
      n_list.pop(i,i+1)
      if a != 0:
        a = i - 1
      flag = "ok"
      break
  if flag == "ng":
    break
print(n_len_o-len(n_list))

Fixed code:
n_list = list(input())
n_len_o = len(n_list)
a = 0
while(1):
  flag = "ng"
  n_len = len(n_list)
  for i in range(a,n_len-1):
    if n_list[i] != n_list[i+1]:
      n_list.pop(i)
      n_list.pop(i)
      if i != 0:
        a = i - 1
      else:
        a = 0
      flag = "ok"
      break
  if flag == "ng":
    break
print(n_len_o-len(n_list))
Buggy code:
x = input()
l = len(x)
l0 = sum([1 for c in x if c == '1'])
l1 = l - l0
if l1 == l:
    print(l)
elif l0 == l:
    print(l)
else:
    if l1 < l0:
        print(l - l0 + l1)
    else:
        print(l - l1 + l0)


Fixed code:
x = input()
l = len(x)
l0 = sum([1 for c in x if c == '1'])
l1 = l - l0
if l1 < l0:
    print(l - l0 + l1)
else:
    print(l - l1 + l0)
Buggy code:
#!/usr/bin/env python3
S = input()
print(2*min(S.count("0"), S.count("1c")))

Fixed code:
#!/usr/bin/env python3
S = input()
print(2*min(S.count("0"), S.count("1")))
Buggy code:
import numpy as np

S = np.array(list(map(int, list(input()))))

n0 = (S == 0).sum()
n1 = (S == 1).sum()

print(min(n0, n1))


Fixed code:
import numpy as np

S = np.array(list(map(int, input())))

n0 = (S == 0).sum()
n1 = (S == 1).sum()

print(min(n0, n1) * 2)
Buggy code:
s = str(input())
count_0 = 0
count_1 = 0

for i in range(len(s)):
  if s[i] == "0":
    count_0 += 1
  else:
    count_1 += 1
print(min(count_0, count_1))

Fixed code:
s = str(input())
count_0 = 0
count_1 = 0

for i in range(len(s)):
  if s[i] == "0":
    count_0 += 1
  else:
    count_1 += 1
print(min(count_0, count_1)*2)
Buggy code:
s = list(input)
c0 = s.count('0')
c1 = s.count('1')
print(2 *min(c0, c1))

Fixed code:
s = input()
c0 = s.count('0')
c1 = s.count('1')
print(2 *min(c0, c1))
Buggy code:
N = len(S)
zc,oc = 0,0
for i in range(N):
    if S[i]=='1':
        oc += 1
    else:
        zc += 1
print(2*min(oc,zc))

Fixed code:
S = input()
N = len(S)
zc,oc = 0,0
for i in range(N):
    if S[i]=='1':
        oc += 1
    else:
        zc += 1
print(2*min(oc,zc))
Buggy code:
n=input()
s=len(n)
if s%2==0:
    l0=n[:s//2].count("0")
    l1=s//2-l0
    r0=n[s//2:].count("0")
    r1=s//2-r0
    print(min(l0,r1)*2+min(l1,r0)*2)
if s%2==1:
    l0=n[:s//2].count("0")
    l1=s//2-l0
    r0=n[s//2+1:].count("0")
    r1=s//2-r0
    tmp=min(l0,r1)*2+min(l1,r0)*2
    if n[s//2]=="0":
        if ri-l0>0 or r0-l1>0:
            tmp+=2
    else:
        if l0-r1>0 or l1-r0>0:
            tmp+=2
    print(tmp)

Fixed code:
n=input()
s=len(n)
if s%2==0:
    l0=n[:s//2].count("0")
    l1=s//2-l0
    r0=n[s//2:].count("0")
    r1=s//2-r0
    print(min(l0,r1)*2+min(l1,r0)*2)
if s%2==1:
    l0=n[:s//2].count("0")
    l1=s//2-l0
    r0=n[s//2+1:].count("0")
    r1=s//2-r0
    tmp=min(l0,r1)*2+min(l1,r0)*2
    if n[s//2]=="0":
        if r1-l0>0 or r0-l1>0:
            tmp+=2
    else:
        if l0-r1>0 or l1-r0>0:
            tmp+=2
    print(tmp)
Buggy code:
S = input()

c0=0
c1=0

for s in S:
  if s=='0':
    c0 += 1
  else:
    c1 += 1
print(min(c0,c1))

Fixed code:
S = input()
 
c0=0
c1=0
 
for s in S:
  if s=='0':
    c0 += 1
  else:
    c1 += 1
print(min(c0,c1)*2)
Buggy code:
y, m, d = map( int, input().split("/") )
if y < 2019 or ( y == 2019 and m <= 4 )
   print( "Heisei" )
else : 
   print( "TBD" )

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

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
S=input()

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

Fixed code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
S=input()

if S<="2019/04/30":
	print("Heisei")
else:
	print("TBD")
Buggy code:
s=input()
print("Heisei" if int(s[5:7])<5) else "TBD")

Fixed code:
s=input()
print("Heisei" if int(s[5:7])<5 else "TBD")
Buggy code:
y, m, d = map(int, input().split("/"))
if m < 5:
  print("heisei")
else:
  print("TBD")


Fixed code:
y, m, d = map(int, input().split("/"))
if m < 5:
    print("Heisei")
else:
    print("TBD")
Buggy code:
s=input().split('/')
if int(s[0])<2018:print('Heisei')
elif int(s[1])==2019 and int(s[2])<=4:print('Heisei')
else:print('TBD')

Fixed code:
s=input().split('/')
if int(s[0])<2018:print('Heisei')
elif int(s[0])==2019 and int(s[1])<=4:print('Heisei')
else:print('TBD')
Buggy code:
y,m,d=map(int,input().split("/"))
if y<=2018 :
    print(Heisei)
elif y==2019 :
    if m<=4 :
        print(Heisei)
    else:
        print(TBD)
else :
    print(TBD)


Fixed code:
y,m,d=map(int,input().split("/"))
if y<=2018 :
    print("Heisei")
elif y==2019 :
    if m<=4 :
        print("Heisei")
    else:
        print("TBD")
else :
    print("TBD")
Buggy code:
S = input().split("/")

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

Fixed code:
S = input().split("/")


if int(S[0])>= 2020:
  print("TBD")
elif int(S[0]) == 2019:
  if int(S[1]) >=5:
    print("TBD")
  else:
    print("Heisei")
else:
  print("Heisei")
Buggy code:
#   AtCoder Beginner Contest 119
#   problem A: Still TBD

S = input() #-> yyyy/mm/dd

date = S.split('/')

year = int(date[0])
month = int(date[1])
day = int(date[2])

if month >= 5:
    print('TBD')
elif
    print('Heisei')


Fixed code:
#   AtCoder Beginner Contest 119
#   problem A: Still TBD

S = input() #-> yyyy/mm/dd

date = S.split('/')

year = int(date[0])
month = int(date[1])
day = int(date[2])

if month >= 5:
    print('TBD')
else:
    print('Heisei')
Buggy code:
#coding:utf-8

a = list(map(int,input().split("/")))   

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

Fixed code:
#coding:utf-8

a = list(map(int,input().split("/")))   

if a[0]==2019 and a[1]>4:
  print("TBD")
elif a[0]>2019:
  print("TBD")
else:
  print("Heisei")
Buggy code:
date = input()

date = date.replace('/', '')
if date <= 20190430:
    print("Heisei")
else:
    print("TBD")


Fixed code:
date = input()

date = int(date.replace('/', ''))
if date <= 20190430:
    print("Heisei")
else:
    print("TBD")
Buggy code:
x=str(input())
if int(x[:4])>2019:
	print("Heisei")
elif int(x[:4])>=2019& int(x[5:7])>4:
	print("Heisei")
else:
  	print("TBD")
  

Fixed code:
x=str(input())
if int(x[:4])>2019:
	print("TBD")
elif int(x[:4])==2019 and int(x[5:7])>4:
	print("TBD")
else:
  	print("Heisei")
Buggy code:
a=input().split('/')
a=a[0]+a[1]+a[2]
if int(a) > 20190430:
  print("TDB")
else:
  print('Heisei')


Fixed code:
a=input().split('/')
a=a[0]+a[1]+a[2]
if int(a) > 20190430:
  print("TBD")
else:
  print('Heisei')
Buggy code:
a=input()
a.replace("/", "")
print("Heisei" if int(a)<=20190430 else "TBD")

Fixed code:
a=input()
print("Heisei" if int(a.replace("/", ""))<=20190430 else "TBD")
Buggy code:
y,m,d=map(int,input().split('/'))
if y < 2020 and m < 05:
    print('Heisei')
else:
    print('TBD')

Fixed code:

y,m,d=map(int,input().split('/'))
if y < 2020 and m < 5:
    print('Heisei')
else:
    print('TBD')
Buggy code:
S = input()
ans = "TBD"
if int(S[:4]) <= 2018:
  ans = "Heisei"
elif int(S[:4]) ==2019 and int(S[6:7]) <=4:
  ans = "Heisei"
  
print( ans)

Fixed code:
S = input()
ans = "TBD"
if int(S[:4]) <= 2018:
  ans = "Heisei"
elif int(S[:4]) ==2019 and int(S[5:7]) <=4:
  ans = "Heisei"
 
print( ans)
Buggy code:
s = input()

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

Fixed code:
s = input()
 
if s <= '2019/04/30':
    print('Heisei')
else:
    print('TBD')
Buggy code:
s = list(map(int, input().split('/')))

if s[0] >= 2019:
    if s[1] > 4:
        print('TDB')
    else:
        print('Heisei')
else:
    print('Heisei')

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

if s[0] >= 2019:
    if s[1] > 4:
        print('TBD')
    else:
        print('Heisei')
else:
    print('Heisei')
Buggy code:
S=input()
YMD=int(''.join(S.split('/')))
if YMD > 20190430:
  print('heisei')
else:
  print('TBD')

Fixed code:
S=input()
YMD=int(''.join(S.split('/')))
if YMD > 20190430:
  print('TBD')
else:
  print('Heisei')
Buggy code:
S= input()
m= int(S[5:7])
if S>4:
  print('TBD')
else:
  print('Heisei')

Fixed code:
S = input()
a = int(S[5:7])
if a >4:
    print("TBD")
else:
    print("Heisei")
Buggy code:
s = input()
s1 = [s[0], s[1], s[2], s[3]]
s2 = [s[5], s[6]]

t1 = int(''.join(s1))
t2 = int(''.join(s2))

if t1 > 2019:
    print('TBD')

elif t1 == 2018 and t2 > 4:
    print('TBD')

else:
    print('Heisei')

Fixed code:
s = input()
s1 = [s[0], s[1], s[2], s[3]]
s2 = [s[5], s[6]]

t1 = int(''.join(s1))
t2 = int(''.join(s2))

if t1 > 2019:
    print('TBD')

elif t1 == 2019 and t2 > 4:
    print('TBD')

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

Fixed code:
s=input()
print("Heisei" if s <= "2019/04/30" else "TBD")
Buggy code:
a,b,c=map(int,input().split("/"))
if a<2019 or a==2019 and b<=4:
  print("Heiasei")
else:
  print("TBD")

Fixed code:
a,b,c=map(int,input().split("/"))
if a<2019 or a==2019 and b<=4:
  print("Heisei")
else:
  print("TBD")
Buggy code:
S=input()
print("Heisei" if S<"2019/04/30" else "TBD")

Fixed code:
S = input()
if(S <= "2019/04/30"):
  print("Heisei")
else:
  print("TBD")
Buggy code:
s=input()
x=s.replace('/','')
y=int(x)
if 20190430 > y:
  print('Heisei')
else:
  print('TBD')

Fixed code:
s=input()
x=s.replace('/','')
y=int(x)
if 20190430 >= y:
  print('Heisei')
else:
  print('TBD')
Buggy code:
s = input()
if int(s[:4])<2019 and int(s[5:7])<4:
    print("Heisei")
else:
    print("TBD")


Fixed code:
s = input()
if int(s[:4])<=2019 and int(s[5:7])<=4:
    print("Heisei")
else:
    print("TBD")
Buggy code:
y, m, d = map(int,input().split('/'))
if y*1000 + m*100 + d <= 20190430 :
  print('Heisei')
else:
  print('TBD')

Fixed code:
y, m, d = map(int,input().split('/'))
if y*10000 + m*100 + d <= 20190430 :
  print('Heisei')
else:
  print('TBD')
Buggy code:
s = int(''.join(input.split('/')))
if(s <= 20190430):print('Heisei')
else:print('TBD')

Fixed code:
s = int(''.join(input().split('/')))
if(s <= 20190430):print('Heisei')
else:print('TBD')
Buggy code:
S = list(input().split('/'))
A = S[0]+S[1]+S[2]
print(A)
if int(A) > 20190430:
  print("TBD")
else:
  print("Heisei")

Fixed code:
S = list(input().split('/'))
A = S[0]+S[1]+S[2]
#print(A)
if int(A) > 20190430:
  print("TBD")
else:
  print("Heisei")
Buggy code:
y,m,d = map(int, input()split(/))
if y > 2018:
    if m > 4:
        print("TBD")
else:
    print("Heisei")


Fixed code:
y,m,d = map(int, input().split("/"))
if y > 2018 and m > 4 :
    print("TBD")
else:
    print("Heisei")
Buggy code:
s=input()
if int(s[5:6])>4:
    print("TBD")
else:
    print("Heisei")

Fixed code:
s=input()
if s[5]=="0":
    if int(s[6])>4:
        print('TBD')
    else:
        print('Heisei')
else:
    print('TBD')
Buggy code:
from sys import stdin


year, month, date = stdin.readline().rstrip().split(sep='/')

y = int(year)
m = int(month)
d = int(date)

heisei_y = 2019
heisei_m = 4
heisei_d = 1

if y < heisei_y:
  print('Heisei')
elif  m < heisei_m:
  print('Heisei')
elif  d < heisei_d:
  print('Heisei')
else:
  print('TBD')

Fixed code:
from sys import stdin


year, month, date = stdin.readline().rstrip().split(sep='/')

y = int(year)
m = int(month)
d = int(date)

heisei_y = 2019
heisei_m = 4
heisei_d = 30

if y < heisei_y:
  print('Heisei')
elif  (y == heisei_y) and (m < heisei_m):
  print('Heisei')
elif  ((y == heisei_y) and m == heisei_m) and (d <= heisei_d):
  print('Heisei')
else:
  print('TBD')
Buggy code:
a,b,c=map(int,input().split('/'))
if a > 2019:
  print("TBD")
elif a == 2019:
  if b> 4:
    print("Heisei")
  else:
    print("TBD")
else:
  print("Heisei")

Fixed code:
a,b,c=map(int,input().split('/'))
if a > 2019:
  print("TBD")
elif a == 2019:
  if b> 4:
    print("TBD")
  else:
    print("Heisei")
else:
  print("Heisei")
Buggy code:
s = list(map(int, input().split('/')))
flag = 1
if s[0] > 2019:
    flag = 0
elif s[0] == 2019:
    if s[1] > 4:
        flag = 0

ans_list = ['TBD', 'Heisei']
print(ans[flag])


Fixed code:
strings = input().split('/')
s = list(map(int, strings))
flag = 1
if s[0] > 2019:
    flag = 0
elif s[0] == 2019:
    if s[1] > 4:
        flag = 0

ans_list = ['TBD', 'Heisei']
print(ans_list[flag])
Buggy code:
a,b,c = map(int,input().split("/"))
if a >=2019 && b >= 5:
    print('TBD')
else:
    print('Heisei')

Fixed code:
a,b,c = map(int,input().split("/"))
if a >=2019 and b >= 5:
    print('TBD')
else:
    print('Heisei')
Buggy code:
H = "2019/04/30"
S = input()
if S < H:
  print("Heisei")
else:
  print("TBD")

Fixed code:
S=input()
if S<='2019/04/30':
  print('Heisei')
else:
  print('TBD')
Buggy code:
def still_tdb(s):

    return "Heisei" if s < "2019/04/30" else "TBD"
def main():
    s = str(input())
    print(still_tdb(s))

if __name__ == '__main__':
    main()

Fixed code:
def still_tdb(s):

    return "Heisei" if s <= "2019/04/30" else "TBD"
def main():
    s = str(input())
    print(still_tdb(s))

if __name__ == '__main__':
    main()
Buggy code:
S = map(int, input().split("/"))
if S[1] >= 5:
  print("TBD")
else:
  print("Heisei")

Fixed code:
S = list(map(int, input().split("/")))
if S[1] >= 5:
  print("TBD")
else:
  print("Heisei")
Buggy 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')

Fixed code:
s = input()
year = int(s[: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')
Buggy code:
s = input()

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

Fixed code:
s = input()
 
d = str(s).split('/')
if int(d[1]) >= 5:
  print("TBD")
else:
  print("Heisei")
Buggy code:
S=str(input())
slice6=S[6]
slice5=S[5]
if int(slice) < 5 and slice5 ==0:
  print("Heisei")
  else:
    print("TBD")


Fixed code:
S=str(input())
slice6=S[6]
slice5=S[5]
if int(slice6) < 5 and int(slice5) ==0:
  print("Heisei")
else:
  print("TBD")
Buggy code:
S=input()
M=S[5]*10+S[6]
if M>4:
	print("TBD")
else:
	print("Heisei")

Fixed code:
S=input()

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

yyyy, mm, dd = S.split('/')
yyyy = int(yyyy)
mm = int(mm)
dd = int(dd)

if yyyy > 2019:
  print('TBD')

elif yyyy <= 2019:
  if mm <= 4:
    print('heisei')
  else:
    print('TBD')
else:
  print('TBD')

Fixed code:
S = input()

yyyy, mm, dd = S.split('/')
yyyy = int(yyyy)
mm = int(mm)
dd = int(dd)

if yyyy > 2019:
  print('TBD')

elif yyyy <= 2019:
  if mm <= 4:
    print('Heisei')
  else:
    print('TBD')
else:
  print('TBD')
Buggy code:
s = input()
m = s[5:7]
if int(m)>=5:
    print('Heisei')
else:
    print('TBD')

Fixed code:
s = input()
m = s[5:7]
if int(m)>=5:
    print('TBD')
else:
    print('Heisei')
Buggy code:
# coding: utf-8

import sys

def _main():
    # args = sys.argv[1:]
    # args = [int(arg) for arg in args]
    datelist = sys.argv[1].split('/')
    year, month, day = [int(i) for i in datelist]

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

if __name__ == '__main__':
    _main()

Fixed code:
# coding: utf-8

import sys

def _main():
    # args = sys.argv[1:]
    # args = [int(arg) for arg in args]
    text = input()
    datelist = text.split('/')
    year, month, day = [int(i) for i in datelist]

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

if __name__ == '__main__':
    _main()
Buggy code:
import sys
y, m, d = map(int, input().split('/'))

if y < 2019:
  print('Heisei')
  sys.exit()

if y == 2019 and d < 5:
  print('Heisei')
  sys.exit()

print('TBD')

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

if y < 2019:
  print('Heisei')
  sys.exit()

if y == 2019 and m < 5:
  print('Heisei')
  sys.exit()

print('TBD')
Buggy 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 < "4"):
    print("Heisei")

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

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

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

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

Fixed 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")