Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
H, W = map(int,input().split())

S = [[]]

for h in range(H):
    S.append([])
    S[-1] = list(input())#.split()

del S[0]

for i in range(H):
    for j in range(W):
        if S[i][j] == '.': S[i][j] = 0
        if S[i][j] == '#': S[i][j] = -100

for i in range(H):
    for j in range(W):
        if S[i][j] < 0: 
            try:
                S[i-1][j] += 1
            except:
                ;
            try:
                S[i][j-1] += 1
            except:
                ;
            try:
                S[i+1][j] += 1
            except:
                ;
            try:
                S[i][j+1] += 1
            except:
                ;

for i in range(H):
    for j in range(W):
        if S[i][j] < 0: S[i][j] = '#'

for i in range(len(S)):
    for j in range(len(S[i])):
        print(S[i][j], end="")
    print()

Fixed submission:
H, W = map(int,input().split())

S = [[]]

for h in range(H):
    S.append([])
    S[-1] = list(input())

del S[0]

for i in range(H):
    for j in range(W):
        if S[i][j] == '.': S[i][j] = 0
        if S[i][j] == '#': S[i][j] = -100
            
for i in range(H):
    for j in range(W):
        if S[i][j] < 0:
            
            if i != 0:
                try: S[i-1][j] += 1
                except: x=1


                try: S[i-1][j+1] += 1
                except: x=1
                    
            if j != 0:
                try: S[i][j-1] += 1
                except: x=1

                try: S[i+1][j-1] += 1
                except: x=1
                
                if i != 0:
                    try: S[i-1][j-1] += 1
                    except: x=1

                
            try: S[i+1][j] += 1
            except: x=1
            
            try: S[i][j+1] += 1
            except: x=1
            
            try: S[i+1][j+1] += 1
            except: x=1
            
            
for i in range(H):
    for j in range(W):
        if S[i][j] < 0: S[i][j] = '#'

for i in range(len(S)):
    for j in range(len(S[i])):
        print(S[i][j], end="")
    print()
Buggy python submission (verdict: Runtime Error):
import numpy as np

def is_connected(npmat):
    mat = np.copy(npmat)
    dim = mat.shape[0]
    for i in range(dim):
        mat[i][i] = 0
    accessible = set([0])
    queue = [0]
    while len(queue) > 0:
        i = queue.pop()
        js = filter(lambda x:x[1], enumerate(mat[i] > 0))
        for j, bool in js:
            if not j in accessible:
                accessible.add(j)
                if len(accessible) == dim :
                    return True
                queue.append(j)
    return len(accessible) == dim


N, M = map(int,input().split())


for i in range(M):
    V[i,0], V[i,1] = map(int,input().split())

V = V.astype(np.int)

count = M
for i in range(M):
    mat = np.identity(N, dtype=np.int)
    for j in range(M):
        if i != j:
            mat[V[j,0]-1, V[j,1]-1] = 1
            mat[V[j,1]-1, V[j,0]-1] = 1
    if is_connected(mat):
        count -= 1


print(count)

Fixed submission:
import numpy as np

def is_connected(npmat):
    mat = np.copy(npmat)
    dim = mat.shape[0]
    for i in range(dim):
        mat[i][i] = 0
    accessible = set([0])
    queue = [0]
    while len(queue) > 0:
        i = queue.pop()
        js = filter(lambda x:x[1], enumerate(mat[i] > 0))
        for j, bool in js:
            if not j in accessible:
                accessible.add(j)
                if len(accessible) == dim :
                    return True
                queue.append(j)
    return len(accessible) == dim


N, M = map(int,input().split())

V = np.zeros((M,2))
for i in range(M):
    V[i,0], V[i,1] = map(int,input().split())

V = V.astype(np.int)

count = M
for i in range(M):
    mat = np.identity(N, dtype=np.int)
    for j in range(M):
        if i != j:
            mat[V[j,0]-1, V[j,1]-1] = 1
            mat[V[j,1]-1, V[j,0]-1] = 1
    if is_connected(mat):
        count -= 1


print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
p = list(map(int,input().split()))

count = 0

for i in range(N):
    if p[i] == i+1:
        p[i], p[i+1] = p[i+1], p[i]
        count += 1
print(count)

Fixed submission:
N = int(input())
p = list(map(int,input().split()))

count = 0

for i in range(N-1):
    if p[i] == i+1:
        p[i], p[i+1] = p[i+1], p[i]
        count += 1

i = N-1
if p[i] == i+1:
    p[i], p[i-1] = p[i-1], p[i]
    count += 1
        
print(count)
Buggy python submission (verdict: Runtime Error):
from collections import Counter

print(len(Counter([int(input()) for i in range(3)])))


Fixed submission:
# A
from collections import Counter

print(len(Counter([int(i) for i in input().split()])))
Buggy python submission (verdict: Runtime Error):
# C
from math import ceil
#N = int(input())
#T = [[int(i) for i in input().split()] for n in range(N)]
m = T[0]
for n in range(1, N):
    a = ceil(max(m[0]/T[n][0], m[1]/T[n][1]))
    m = [T[n][0] * a, T[n][1] * a]
print(sum(m))

Fixed submission:
# C
from math import ceil
N = int(input())
T = [[int(i) for i in input().split()] for n in range(N)]
m = T[0]

def hoge(a, b):
    if a%b==0:
        return a//b
    else:
        return a//b+1

for n in range(1, N):
    a = max(hoge(m[0],T[n][0]), hoge(m[1],T[n][1]))
    m = [T[n][0] * a, T[n][1] * a]
print(sum(m))
Buggy python submission (verdict: Runtime Error):
N, K, X, Y = [input() for i in range(4)]
if N <= K:
    print(N*X)
else:
    print((N-K)*Y + K*X)

Fixed submission:
N, K, X, Y = [int(input()) for i in range(4)]
if N <= K:
    print(N*X)
else:
    print((N-K)*Y + K*X)
Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n = map(int,input().split())
counter = 0
sorts = sorted([r,g,b],reverse=True)
a = (n // sorts[0])+1
c = (n// sorts[1])+1

for i in range(a):
    for j in range(c):
        left = n - (sorts[0]*i) - (sorts[1]*j)
        if left >= 0 and   left % sorts[2] == 0:
            counter += 1
            
print(counter)

Fixed submission:
r,g,b,n = map(int,input().split())
counter = 0
sorts = sorted([r,g,b],reverse=True)
a = (n // sorts[0])+1

for i in range(a):
    test = n
    test = test-(sorts[0]*i)
    c = (test//sorts[1])+1
    for j in range(c):
        left = test - (sorts[1]*j)
        if left >= 0 and   left % sorts[2] == 0:
            counter += 1
            
print(counter)

Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n = map(int,input().split())
counter = 0
a = (n // r)+1
c = (n// g)+1

for i in range(a):
    for j in range(c):
        left = n - (r*i) - (g*j)
        if left >= 0 and   left % b == 0:
            counter += 1
            
print(counter)

Fixed submission:
r,g,b,n = map(int,input().split())
counter = 0
sorts = sorted([r,g,b],reverse=True)
a = (n // sorts[0])+1

for i in range(a):
    test = n
    test = test-(sorts[0]*i)
    c = (test//sorts[1])+1
    for j in range(c):
        left = test - (sorts[1]*j)
        if left >= 0 and   left % sorts[2] == 0:
            counter += 1
            
print(counter)

Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n = map(int,input().split())
counter = 0

for i in range(n+1):
    for j in range(n+1):
        left = n - (r*i) - (g*j)
        if left >= 0 and   left % b == 0:
            counter += 1
            
print(counter)

Fixed submission:
r,g,b,n = map(int,input().split())
counter = 0
sorts = sorted([r,g,b],reverse=True)
a = (n // sorts[0])+1

for i in range(a):
    test = n
    test = test-(sorts[0]*i)
    c = (test//sorts[1])+1
    for j in range(c):
        left = test - (sorts[1]*j)
        if left >= 0 and   left % sorts[2] == 0:
            counter += 1
            
print(counter)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = list(input())
k = int(input())

for i in range(n):
    if s[i] != s[k] :
        s[i] = "*"

for i in s:
    print(i,end="")

Fixed submission:
n = int(input())
s = list(input())
k = int(input())


for i in range(n):
    if s[i] != s[k-1] :
        s[i] = "*"

for i in s:
    print(i,end="")
Buggy python submission (verdict: Time Limit Exceeded):
n,q = map(int,input().split())
s = input()
num_list = list()

for i in range(q):
    num_list.append(list(map(int,input().split())))

for i in num_list:
    print(s[i[0]-1:i[1]].count("AC"))

Fixed submission:
n,q = map(int,input().split())
s = input()
num_list = list()
#０文字目と１文字目はACの数０
ruisekiwa_tabun_rikaidekita = [0,0]

for i in range(q):
    num_list.append(list(map(int,input().split())))

for i in range(n-1):
    if s[i:i+2] == "AC":
        ruisekiwa_tabun_rikaidekita.append(ruisekiwa_tabun_rikaidekita[-1] + 1)
    else:
        ruisekiwa_tabun_rikaidekita.append(ruisekiwa_tabun_rikaidekita[-1])
        
for left,right in num_list:
    print(ruisekiwa_tabun_rikaidekita[right] - ruisekiwa_tabun_rikaidekita[left])

Buggy python submission (verdict: Time Limit Exceeded):
n,q = map(int,input().split())
s = input()
num_list = list()

for i in range(q):
    l,r = map(int,input().split())
    num_list.append(s[l-1:r].count("AC"))
    
for i in num_list:
    print(i)

Fixed submission:
n,q = map(int,input().split())
s = input()
num_list = list()
#０文字目と１文字目はACの数０
ruisekiwa_tabun_rikaidekita = [0,0]

for i in range(q):
    num_list.append(list(map(int,input().split())))

for i in range(n-1):
    if s[i:i+2] == "AC":
        ruisekiwa_tabun_rikaidekita.append(ruisekiwa_tabun_rikaidekita[-1] + 1)
    else:
        ruisekiwa_tabun_rikaidekita.append(ruisekiwa_tabun_rikaidekita[-1])
        
for left,right in num_list:
    print(ruisekiwa_tabun_rikaidekita[right] - ruisekiwa_tabun_rikaidekita[left])
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
start = len(s)

while s  != s.replace("01",""):
    s = s.replace("01","")

while s  != s.replace("10",""):
    s = s.replace("10","")
    
print(start-len(s))

Fixed submission:
s = input()
zero = s.count("0")
one = s.count("1")

print(min(zero,one)*2)
Buggy python submission (verdict: Runtime Error):
import math

n = int(input())
hp_list = list(map(int,input().split()))
gcd = hp_list[0]

for i in range(n-1):
    gcd = math.gcd(gcd , hp_list[i+1])
    
print(gcd)

Fixed submission:
from fractions import gcd

n = int(input())
hp_list = list(map(int,input().split()))
test = hp_list[0]

for i in range(n-1):
    test = gcd(test , hp_list[i+1])
    
print(test)
Buggy python submission (verdict: Runtime Error):
n,m = list(map(int,input().split()))
locations = list(map(int,input().split()))
locations = sorted(locations)
distance = list()

if m == 1:
    print(0)
else:
    for i in range(len(locations) - 1):
        distance.append(locations[i+1] - locations[i])
    
    distance = sorted(distance)

    if n != 1:
        for i in range(n-1):
            distance.pop()
    
    print(sum(distance))

Fixed submission:
n,m = list(map(int,input().split()))
locations = list(map(int,input().split()))
locations = sorted(locations)
distance = list()

if n >= m:
    print(0)
else:
    for i in range(len(locations) - 1):
        distance.append(locations[i+1] - locations[i])
    
    distance = sorted(distance)

    if n != 1:
        for i in range(n-1):
            distance.pop()
    
    print(sum(distance))

Buggy python submission (verdict: Runtime Error):
n,m = list(map(int,input().split()))
locations = list(map(int,input().split()))
locations = sorted(locations)
distance = list()

if m == 1:
    print(0)
else:
    for i in range(len(locations) - 1):
        distance.append(locations[i+1] - locations[i])
    
    distance = sorted(distance)

    for i in range(n-1):
        distance.pop()
    
    print(sum(distance))

Fixed submission:
n,m = list(map(int,input().split()))
locations = list(map(int,input().split()))
locations = sorted(locations)
distance = list()

if n >= m:
    print(0)
else:
    for i in range(len(locations) - 1):
        distance.append(locations[i+1] - locations[i])
    
    distance = sorted(distance)

    if n != 1:
        for i in range(n-1):
            distance.pop()
    
    print(sum(distance))

Buggy python submission (verdict: Runtime Error):
n,m = list(map(int,input().split()))
locations = list(map(int,input().split()))
locations = sorted(locations)
distance = list()

for i in range(len(locations) - 1):
    distance.append(locations[i+1] - locations[i])
    
distance = sorted(distance)

for i in range(n-1):
    distance.pop()
    
print(sum(distance))

Fixed submission:
n,m = list(map(int,input().split()))
locations = list(map(int,input().split()))
locations = sorted(locations)
distance = list()

if n >= m:
    print(0)
else:
    for i in range(len(locations) - 1):
        distance.append(locations[i+1] - locations[i])
    
    distance = sorted(distance)

    if n != 1:
        for i in range(n-1):
            distance.pop()
    
    print(sum(distance))
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())

pref_list = list()
jyunban = list()

for i in range(n):
    pref_list.append(list())
    
for i in range(m):
    p,y = map(int,input().split())
    pref_list[p-1].append(y)
    jyunban.append([p,y])
    
for pref in pref_list:
    pref.sort()

for pref,year in jyunban:
    index = pref_list[pref-1].index(year) + 1
    pref = str(pref).rjust(6,'0')
    index = str(index).rjust(6,'0')
    print(pref+index)

Fixed submission:
n,m = list(map(int,input().split()))
tmp = [list(map(int,input().split())) for i in range(m)]
cities = [[] for i in range(n+1)]


for i,(pref,year) in enumerate(tmp):
    cities[pref].append([year,i])
    
answers = [""] * m
for i in range(n+1):
    for j,(year,index) in enumerate(sorted(cities[i])):
        answer = str(i).zfill(6) + str(j+1).zfill(6)
        answers[index] = answer
        
print(*answers,sep=("\n"))

Buggy python submission (verdict: Time Limit Exceeded):
n,m = list(map(int,input().split()))
row_data = list()
pref_city = [[] for i in range(n)]

for i in range(m):
    p = list(map(int,input().split()))
    row_data.append(p)
    pref_city[p[0]-1].append(p[1])
    
for i,city in enumerate(row_data):
    pref_city[city[0]-1] = sorted(pref_city[city[0]-1])
    pref_id = "0" * 6 + str(city[0])
    city_id = "0" * 6 + str(pref_city[city[0]-1].index(city[1] ) + 1)
    print(pref_id[-6:] + city_id[-6:])

Fixed submission:
n,m = list(map(int,input().split()))
tmp = [list(map(int,input().split())) for i in range(m)]
cities = [[] for i in range(n+1)]


for i,(pref,year) in enumerate(tmp):
    cities[pref].append([year,i])
    
answers = [""] * m
for i in range(n+1):
    for j,(year,index) in enumerate(sorted(cities[i])):
        answer = str(i).zfill(6) + str(j+1).zfill(6)
        answers[index] = answer
        
print(*answers,sep=("\n"))
Buggy python submission (verdict: Runtime Error):
n,t = list(map(int,input().split()))
in_time = list()
           
for i in range(n):
    a,b =  list(map(int,input().split()))
    if t >= b:
        in_time.append(a)
        
print(min(in_time))

Fixed submission:
n,t = list(map(int,input().split()))
in_time = list()
           
for i in range(n):
    a,b =  list(map(int,input().split()))
    if t >= b:
        in_time.append(a)

if len(in_time) == 0:
    print("TLE")
else:
    print(min(in_time))
Buggy python submission (verdict: Runtime Error):
n,i = list(map,int(input().split()))
print(n-i+1)

Fixed submission:
n,i = list(map(int,input().split()))
print(n-i+1)
Buggy python submission (verdict: Runtime Error):
s = input()
k = int(input())

if s[:k+1] == "1"*k:
    print(1)
else:
    for i in range(len(s)):
        if s[i] != "1":
            print(s[i])
            break

Fixed submission:
s = input()
k = int(input())

for i in range(k):
    if s[i] != "1":
        print(s[i])
        break
else:
    print(1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
amari = ""

if n == 0:
    print(0)
    exit()

while n :
    if n%2 == 1:
        amari += "1"
        n -= 1
    else:
        amari += "0"
    n = n//-2
    
print(amari[::-1])

Fixed submission:
n,k = list(map(int,input().split()))

if n%k == 0:
    print(0)
else:
    print(1)
Buggy python submission (verdict: Runtime Error):
num = int(input())
li = list(input())
ans = 0
for i in range(num):
    fi = set(li[:i])
    se = set(li[i:])
    hoge = len(list(fi & se))
    if hoge > ans:
    ans = hoge
    
print(ans)

Fixed submission:
#b
num = int(input())
li = list(input())
ans = 0
for i in range(num):
    fi = set(li[:i])
    se = set(li[i:])
    hoge = len(list(fi & se))
    if hoge > ans:
        ans = hoge
    
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(input())
big_num = 10 ** 6

for i in range(n):
    west = s[:i].count("W")
    east = s[i+1:].count("E")
    if big_num > west + east:
        big_num = west + east
        
print(big_num)

Fixed submission:
n = int(input())
s = list(input())

ruisekiwa = [0]
ans = n

for i in s:
    if i == "W":
        ruisekiwa.append(ruisekiwa[-1]+1)
    else:
        ruisekiwa.append(ruisekiwa[-1])
        
for i in range(1,n+1):
    w = ruisekiwa[i-1]
    e = n-i-(ruisekiwa[-1]-ruisekiwa[i])
    ans = min(ans,w+e)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(input())
turn = 10**6

for i in range(n):
    a = s[:i].count("W")
    b = s[i+1:].count("E")
    if turn > a+b:
        turn = a+b
print(turn)

Fixed submission:
n = int(input())
s = list(input())

ruisekiwa = [0]
ans = n

for i in s:
    if i == "W":
        ruisekiwa.append(ruisekiwa[-1]+1)
    else:
        ruisekiwa.append(ruisekiwa[-1])
        
for i in range(1,n+1):
    w = ruisekiwa[i-1]
    e = n-i-(ruisekiwa[-1]-ruisekiwa[i])
    ans = min(ans,w+e)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(input())
turn = 100

for i in range(n):
    a = s[:i]
    b = s[i+1:]
    stock = a.count("W")+b.count("E")
    if turn > stock:
        turn = stock
print(turn)

Fixed submission:
n = int(input())
s = list(input())

ruisekiwa = [0]
ans = n

for i in s:
    if i == "W":
        ruisekiwa.append(ruisekiwa[-1]+1)
    else:
        ruisekiwa.append(ruisekiwa[-1])
        
for i in range(1,n+1):
    w = ruisekiwa[i-1]
    e = n-i-(ruisekiwa[-1]-ruisekiwa[i])
    ans = min(ans,w+e)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(input())
turn = 100

for i in range(n):
    a = s[:i]
    b = s[i+1:]
    if turn > a.count("W")+b.count("E"):
        turn = a.count("W")+b.count("E")
print(turn)

Fixed submission:
n = int(input())
s = list(input())

ruisekiwa = [0]
ans = n

for i in s:
    if i == "W":
        ruisekiwa.append(ruisekiwa[-1]+1)
    else:
        ruisekiwa.append(ruisekiwa[-1])
        
for i in range(1,n+1):
    w = ruisekiwa[i-1]
    e = n-i-(ruisekiwa[-1]-ruisekiwa[i])
    ans = min(ans,w+e)
    
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
x = list(map(int,input().split()))

for i in range(n):
    b=x.pop(i)
    print(sorted(x)[int(n/2)-1])
    #print(a[int(n/2)-1])
    x.insert(i,b)

Fixed submission:
N = int(input())
arr = list(map(int, input().split()))
X = arr.copy()
arr.sort()
 
for i in range(N):
    if X[i] < arr[int(N/2)]:
        print(arr[int(N/2)])
    else:
        print(arr[int(N/2)-1])
Buggy python submission (verdict: Runtime Error):
n = int(input())
travel = list(map(int,input().split()))
plan = travel.copy()
start = 0
answer = 0
answer_list = list()

for i in range(n):
    plan.pop(i)
    for j in range(len(plan)):
        answer += abs(plan[j]-start)
        start = plan[j]
    answer += abs(plan[len(plan)-1])
    answer_list.append(answer)
    answer = 0
    start = 0
    plan = travel.copy()
    
for i in range(len(answer_list)):
    print(answer_list[i])

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.insert(0,0)
a.insert(n+1,0)
total=0
#通常のコストを計算
for i in range(1,n+2):
    total+=abs(a[i]-a[i-1])
for i in range(1,n+1):
    ans=total-(abs(a[i]-a[i-1])+abs(a[i+1]-a[i]))+abs(a[i+1]-a[i-1])
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
travel = list(map(int,input().split()))
plan = travel.copy()
start = 0
answer = 0
answer_list = list()

for i in range(n):
    plan.pop(i)
    for j in range(len(plan)):
        answer += abs(plan[j]-start)
        start = plan[j]
    answer += abs(plan[len(plan)-1])
    answer_list.append(answer)
    answer = 0
    start = 0
    plan = travel.copy()
    
for i in range(len(answer_list)):
    print(answer_list[i])

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.insert(0,0)
a.insert(n+1,0)
total=0
#通常のコストを計算
for i in range(1,n+2):
    total+=abs(a[i]-a[i-1])
for i in range(1,n+1):
    ans=total-(abs(a[i]-a[i-1])+abs(a[i+1]-a[i]))+abs(a[i+1]-a[i-1])
    print(ans)
Buggy python submission (verdict: Runtime Error):
N = map(int,input())
blue = []
red = []
for i in range(N):
    blue.append(input())
M = map(int,input())
for i in range(M):
    red.append(input())
blue_list = Counter(blue)
red_list = Counter(red)
b = max(blue_list)
c=min(red_list)
print(blue_list[b] - red_list[c])

Fixed submission:
n = int(input())
s = list()
counter = 0

for i in range(n):
    s.append(input())
    
m = int(input())
t = list()

for i in range(m):
    t.append(input())
    
for word in s:
    counter = max(counter,s.count(word) - t.count(word))
    
print(counter)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
count=0
for i in range(a,b+1):
    test = list(str(i))
    if (test[0] == test[4]) and (test[1]==test[3]):
        count=count+1
print(count)

Fixed submission:
a , b = input().split()
a = int(a)
b = int(b)
count=0
for i in range(a,b+1):
    test = list(str(i))
    if (test[0] == test[4]) and (test[1]==test[3]):
        count=count+1
print(count)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
count=0
for i in range(a,b+1):
    i = str(i)
    test = list(i)
    if (test[0] == test[4]) and (test[1]==test[3]):
        count=count+1
print(count)

Fixed submission:
a , b = input().split()
a = int(a)
b = int(b)
count=0
for i in range(a,b+1):
    test = list(str(i))
    if (test[0] == test[4]) and (test[1]==test[3]):
        count=count+1
print(count)
Buggy python submission (verdict: Runtime Error):
S = input()
flg = 0
for i in a:
    if flg == 0 and i not in S:
        print(i)
        flg = 1
if flg == 0:
    print("None")

Fixed submission:
a = "abcdefghijklmnopqrstuvwxyz"
S = input()
flg = 0
for i in a:
    if flg == 0 and i not in S:
        print(i)
        flg = 1
if flg == 0:
    print("None")
Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
print(max(min(b,d)-max(a,c),0)

Fixed submission:
a,b,c,d=map(int,input().split())
if a>=c and b>=d and d>a:
    print(d-a)
elif a<=c and b<=d and b>c:
    print(b-c)
elif a<c and d<b:
    print(d-c)
elif c<a and b<d:
    print(b-a)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
print(max(min(b,d)-max(a,c)),0)

Fixed submission:
a,b,c,d=map(int,input().split())
if a>=c and b>=d and d>a:
    print(d-a)
elif a<=c and b<=d and b>c:
    print(b-c)
elif a<c and d<b:
    print(d-c)
elif c<a and b<d:
    print(b-a)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
counter = 0
s=0
if n%2 ==1:
    n = n-1
    
while n != 1:
    n=int(n/2)
    counter += 1
    
print(2**counter)

Fixed submission:
n = int(input())
counter = 0
    
while n != 1:
    n=int(n/2)
    counter += 1
    
print(2**counter)
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())

if a > b:
    print("GREATER")
elif a < b:
    print("LESS")
else:
    print("EQUAL")

Fixed submission:
a = int(input())
b = int(input())

if a > b:
    print("GREATER")
elif a < b:
    print("LESS")
else:
    print("EQUAL")