Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02684 (python)

Fixed submission:
n, K = map(int, input().split())
A = [x-1 for x in list(map(int, input().split()))]

current = 0
d = dict()
d[current] = d.get(current, 0) + 1
pattern = [0]
cnt = K

while True:
    current = A[current]
    if d.get(current) == 2:
        break
    else:
        if d.get(current) == None:
            d[current] = d.get(current, 0) + 1
        else:
            d[current] = d.get(current) + 1
        pattern.append(current)
        cnt -= 1
        if cnt == 0:
            break

if cnt == 0:
    print(pattern[-1]+1)
else:
    loop = len([key for key, value in d.items() if value == 2])
    not_loop = len([key for key, value in d.items() if value != 2])
    pattern = pattern[not_loop:]
    ans_position = (K - not_loop) % loop

    print(pattern[ans_position]+1)

Buggy submission (verdict: Runtime Error):
n, K = map(int, input().split())
A = [x-1 for x in list(map(int, input().split()))]

current = 0
d = dict()
d[current] = d.get(current, 0) + 1
pattern = [0]
cnt = K

while True:
    current = A[current]
    if d.get(current) == 2:
        break
    else:
        if d.get(current) == None:
            d[current] = d.get(current, 0) + 1
        else:
            d[current] = d.get(current) + 1
        pattern.append(current)
        cnt -= 1
        if cnt == 0:
            break
if cnt == 0:
    print(pattern[-1]+1)
else:
    loop = [key for key, value in d.items() if value == 2]
    res = len(pattern) % ((len(loop)) // 2)
    ans = (K - res) % len(loop)

    print(pattern[res+ans]+1)
Problem p02756 (python)

Fixed submission:
from collections import deque

def main():

    s = deque(input())
    q = int(input())

    flag = 0
    query = []

    for _ in range(q):
        temp = input().split()
        if len(temp) == 1:
            flag += 1
        else:
            query.append(temp + [flag%2])

    for q in query:
        if q[-1] == 0:
            if q[1] == "1":
                s.appendleft(q[2])
            else:
                s.append(q[2])
        else:
            if q[1] == "1":
                s.append(q[2])
            else:
                s.appendleft(q[2])

    if flag % 2 == 1:
        print("".join(list(s)[::-1]))
    else:
        print("".join(s))

main()

Buggy submission (verdict: Runtime Error):
    def main():
    s = input()
    q = int(input())

    flag = 1
    ctn = 0
    for _ in range(q):
        query = input().split()
        if flag:
            if query[0] == "1":
                flag = 0
                ctn += 1
            else:
                if query[1] == "1":
                    s = query[2] + s
                elif query[1] == "2":
                    s = s + query[2]
        else:
            if query[0] == "1":
                flag = 1
                ctn += 1
            else:
                if query[1] == "1":
                    s = s + query[2]
                elif query[1] == "2":
                    s = query[2] + s

    if ctn % 2 == 1:
        print(s[::-1])
    else:
        print(s)

main()
Problem p03281 (python)

Fixed submission:
def make_divisors(n):
    lower, upper = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower.append(i)
            if i != n // i:
                upper.append(n//i)
        i += 1
    return lower + upper[::-1]

cnt = 0
for i in range(1, int(input())+1, 2):
    if len(make_divisors(i)) == 8:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
import sympy

n = int(input())
cnt = 0
for i in range(1, n+1, 2):
    if len(sympy.divisors(i)) == 8:
        cnt += 1
print(cnt)
Problem p03260 (python)

Fixed submission:
A, B = map(int, input().split())
if A*B % 2 == 0:
	print("No")
else:
	print("Yes")

Buggy submission (verdict: Runtime Error):
#include <iostream>
using namespace std;

int main(){
	int A, B;
	cin >> A >> B;
	if(A * B % 2 == 0){
		cout << "No" << endl;
	}
	else{
		cout << "Yes" << endl;
	}
}
Problem p02675 (python)

Fixed submission:
import numpy as np
a = int(input())
b = a % 10
hon = [2,4,5,7,9]
pon = [0,1,6,8]
bon = [3]
if b in hon:
    print("hon")
elif b in pon:
    print("pon")
else:
    print("bon")

Buggy submission (verdict: Runtime Error):
k = int(input())
s = input()
if len(s)>k:
    print(s[0:k],"...",sep="")
else:
    print(s)

Buggy submission (verdict: Runtime Error):
k = int(input())
s = input()
if len(s)>k:
    print(s[0:k],"...")
else:
    print(s)

Buggy submission (verdict: Runtime Error):

k = int(input())
s = input()
if len(s)>k:
    print(s[0:k],"...")
elsea
    print(s)

Buggy submission (verdict: Runtime Error):
import numpy as np
a = int(input())
b = a % 10
hon = [2,4,5,7,9]
pon = [0,1,6,8]
bon = [3]
if b in hon:
    print("hon")
elif b in pon:
    print("pon")
else:
    print("bon")

Buggy submission (verdict: Runtime Error):
import numpy as np
a = int(input())
b = a % 100
print(b)
hon = [2,4,5,7,9]
pon = [0,1,6,8]
bon = [3]
if b in hon:
    print("hon")
elif b in pon:
    print("pon")
else:
    print("bon")
Problem p02684 (python)

Fixed submission:
import sys
import numpy as np
from collections import defaultdict



#input = sys.stdin.readline

def main():
    N, K = map(int,input().split())
    A = list(map(int,input().split()))
    A = [0] +A  #transporter
    visited = [0] * (N+1)
    town = 1
    cycle = 0
    for i in range(1,K+1):
        town = A[town]
        if visited[town] ==0:
            visited[town] = i
        else:
            cycle = i - visited[town]
            place = (K - visited[town]) % cycle + visited[town]
            for j in range(N+1):
                if visited[j] == place:
                    print(j)
                    exit()
    print(town)




if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
n,k  = map(int,input().split())
a = list(map(int,input().split()))
a.insert(0,0)

town =1
visited = [0] * (n+1)

for i in range(1,k+1):
    town = a[town]
    if visited[town] !=0:
        rest =(k - visited[town]) % (i -visited[town])
        goal =visited.index(visited[town]+rest)
        break
    visited[town] = i 
    

print(goal)

Buggy submission (verdict: Runtime Error):
n,k  = map(int,input().split())
a = list(map(int,input().split()))
a.insert(0,0)
print(a)

town =1
visited = [0] * (n+1)

for i in range(1,k+1):
    town = a[town]
    if visited[town] !=0:
        rest =(k - visited[town]) % (i -visited[town])
        goal =visited.index(visited[town]+rest)
        break
    visited[town] = i 
    

print(goal)
Problem p02705 (python)

Fixed submission:
r = int(input())
print(r*2*3.141)

Buggy submission (verdict: Runtime Error):
import numpy as np

r = int(input())
print(r*2*np.pi)

Buggy submission (verdict: Runtime Error):
import numpy as np

r = int(input())
print(r*2*np.pi)
Problem p02713 (python)

Fixed submission:
import numpy as np
K = int(input())
l = [0] *(K+1)
res = 0
for i in range(1,K+1):
    for j in range(1, K+1):
        gcd_ab = np.gcd(i,j)
        l[gcd_ab] +=1

for i in range(1, K+1):
    for j in range(1,K+1):
        gcd_c = np.gcd(i,j)
        res += l[j]* gcd_c


print(res)

Buggy submission (verdict: Runtime Error):

import numpy as np
import itertools

n = int(input())
ans =0
for a,b,c in itertools.product(range(1,n+1),repeat=3):

    g = np.gcd(np.gcd(a,b),c)
    ans +=g
print(ans)
Problem p02714 (python)

Fixed submission:
import sys
import math
import itertools
from functools import reduce
from functools import lru_cache


# \n
def input():
    return sys.stdin.readline().rstrip()

def main():

    N=int(input())
    S=list(input())

    R=[0]*N
    G=[0]*N
    B=[0]*N
    r=0
    g  =0
    b=0
    count =0
    for i in range(N-1,-1,-1):
        if S[i] =="R":
            r+=1
        elif S[i] =="G":
            g+=1
        else:
            b+=1
        R[i]=r
        G[i]=g
        B[i]=b

    count =0
    for i in range(N):



        for j in range(i+1,N):
            SE = set(["R", "G", "B"])
            I = S[i]
            SE.remove(I)
            J =S[j]
            if I==J:
                continue
            SE.remove(J)
            if "G" in SE:
                count+=G[j]
                if j+j-i <N and S[j+j-i] =="G":
                    count -=1

            elif "R" in SE:
                count+=R[j]
                if j+j-i <N and S[j+j-i] =="R":
                    count -=1
            else:
                count+=B[j]
                if j+j-i <N and S[j+j-i] =="B":
                    count -=1



    print(count)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import itertools


input()
s = list(input())
r =[]
g =[]
b =[]
n= len(s)
ans =0
for i in range(n):
    if s[i]== "R":
        r.append(i+1)
    elif s[i]== "G":
        g.append(i+1)
    else:
        b.append(i+1)

for ri , gi in itertools.product(r,g):
    rg=gi-a
    if rg+gi in b:
        ans -=1
    if  ri-rg in b:
        ans -=1
    if (gi+ri)/2 in b:
        ans -=1

ans += len(r)*len(b)*len(g)
print(ans)

Buggy submission (verdict: Runtime Error):
input()

s = list(input())
r =[]
g =[]
b =[]
n= len(s)
ans =0
for i in range(n):
    if s[i]== "R":
        r.append(i+1)
    elif s[i]== "G":
        g.append(i+1)
    else:
        b.append(i+1)

for ss in itertools.product(r,g,b):
    sss =sorted(ss)
    if sss[2] + sss[0] != 2*sss[1]:
        ans +=1

print(ans)
Problem p02719 (python)

Fixed submission:
import numpy as np
n, k = map(int, input().split())
ans = n%k , (k-n%k)%k 
answer = np.min(ans)
print(answer)

Buggy submission (verdict: Runtime Error):
import numpy as np
n, k = map(int, input().split())
ans = n%k , (k-n%k)%k 
answer = np.min(ans)
print(answer)
Problem p02727 (python)

Fixed submission:
X,Y,A,B,C =map(int,input().split())
P = list(map(int,input().split()))
Q = list(map(int,input().split()))
R = list(map(int,input().split()))

P.sort()
Q.sort()
R.sort()

P_new = P[-X::]
Q_new = Q[-Y::]


agg = P_new + Q_new +R
agg.sort()
print(sum(agg[-X-Y::]))

Buggy submission (verdict: Runtime Error):
2 2 4 4 4
11 12 13 14
21 22 23 24
1 2 3 4

Buggy submission (verdict: Runtime Error):
2 2 2 2 2
8 6
9 1
2 1
Problem p02732 (python)

Fixed submission:
import numpy as np

N = int(input())
A = np.array(list(map(int,input().split())))
L = [0]*(N+2)
L = np.array(L)

for i in A:
    L[i] +=1

LL  = np.multiply(L,L-1)/2

gros = int(sum(LL))

for k in A:
    print(gros +1 - L[k])

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(input())
A = np.array(list(map(int,input().split())))
L = [0]*(N+2)
L = np.array(L)

for i in A:
    L[i] +=1

LL  = np.multiply(L,L-1)/2

gros = int(sum(LL))

for k in A:
    print(gros +1 - L[k])

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(input())
A = np.array(list(map(int,input().split())))
L = [0]*(N+1)
L = np.array(L)

for i in A:
    L[i] +=1

LL  = np.multiply(L,L-1)/2

gros = int(sum(LL))

for k in A:
    print(gros +1 - L[k])
Problem p02755 (python)

Fixed submission:
import math
A, B = map(int,input().split())
minA = math.ceil(A/0.08)
maxA = math.ceil((A+1)/0.08) -1
minB = math.ceil(B/0.1)
maxB = math.ceil((B+1)/0.1) -1

if (minA>maxB) or (minB>maxA):
    print(-1)
else:
    print(max(minA,minB))

Buggy submission (verdict: Runtime Error):
import numpy as np
A, B = map(int,input().split())
minA = math.floor(A/0.08)
maxA = math.ceil((A+1)/0.08) -1
minB = math.floor(B/0.08)
maxB = math.ceil((B+1)/0.08) -1
if (minA>maxB) or (minB>maxA):
    print(-1)
else:
    print(min(minA,minB))
Problem p02924 (python)

Fixed submission:
import sys
from collections import deque
import itertools
from collections import deque
sys.setrecursionlimit(10 ** 9)

# map(int, sys.stdin.read().split())


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    print(int(N*(N-1)//2))




if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
from collections import deque
import itertools
from collections import deque
sys.setrecursionlimit(10 ** 9)
import heapq
import numpy as np

# map(int, sys.stdin.read().split())


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    print(int(N*( N-1)/2))

    pass



if __name__ == "__main__":
    main()
Problem p03109 (python)

Fixed submission:
import sys
import math


def input():
    return sys.stdin.readline().rstrip()


def main():
    S = input()
    if int(S[:4]) < 2018:
        print("Heisei")
    elif int(S[:4]) > 2019:
        print("TBD")
    else:
        if int(S[5:7]) > 4:
            print("TBD")
        else:
            print("Heisei")

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
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")
Problem p03147 (python)

Fixed submission:
import sys


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    if N==1:
        print(input())
        exit()
    h = list(map(int, input().split()))


    dflag = 0
    cmin = 0
    cmax = h[0]
    count = 0
    for i in range(1, N):
        if h[i - 1] < h[i] and dflag == 1:
            count += cmax - cmin
            cmax = h[i]
            dflag = 0
            cmin = h[i - 1]

        elif h[i - 1] > h[i]:
            dflag = 1

        elif h[i - 1] < h[i]:
            cmax = h[i]

    if dflag == 1:
        count += cmax - cmin
    else:
        count += max(cmax, h[i]) - cmin

    print(count)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    h = list(map(int, input().split()))

    dflag = 0
    cmin = 0
    cmax = h[0]
    count = 0
    for i in range(1, N):
        if h[i - 1] < h[i] and dflag == 1:
            count += cmax - cmin
            cmax = h[i]
            dflag = 0
            cmin = h[i - 1]

        elif h[i - 1] > h[i]:
            dflag = 1

        elif h[i - 1] < h[i]:
            cmax = h[i]

    if dflag == 1:
        count += cmax - cmin
    else:
        count += max(cmax, h[i]) - cmin

    print(count)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys

def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    h = list(map(int, input().split()))

    dflag = 0
    cmin = 0
    cmax = h[0]
    count = 0
    for i in range(1, N):
        if h[i - 1] < h[i] and dflag == 1:
            count += cmax-cmin
            cmax=h[i]
            dflag=0
            cmin=h[i-1]

        elif h[i-1]>h[i]:
            dflag=1

        elif h[i-1]<h[i]:
            cmax=h[i]

    if dflag==1:
        count+=cmax-cmin
    else:
        count+= max(cmax,h[i])-cmin

    print(count)



if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    h = list(map(int, input().split()))

    dflag = 0
    cmin = 0
    cmax = h[0]
    count = 0
    for i in range(1, N):
        if h[i - 1] < h[i] and dflag == 1:
            count += cmax-cmin
            cmax=h[i]
            dflag=0
            cmin=h[i-1]

        elif h[i-1]>h[i]:
            dflag=1

        elif h[i-1]<h[i]:
            cmax=h[i]

    if dflag==1:
        count+=cmax-cmin
    else:
        count+= max(cmax,h[i])-cmin

    print(count)



if __name__ == "__main__":
    main()
Problem p03163 (python)

Fixed submission:
import sys
#import numpy as np
#from collections import defaultdict
import math
#from collections import deque

input = sys.stdin.readline
#import numpy as np



def main():

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

    dp = [0] * (W+2)

    for _ in range(N):
        w,v = map(int,input().split())

        for j in range(W+1,w-1,-1):
            dp[j] =max(dp[j-w] +v ,dp[j])

    print(dp[W])
#    print(dp)




if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
#import numpy as np
#from collections import defaultdict
import math
#from collections import deque

input = sys.stdin.readline
import numpy as np



def main():

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

    dp = [0] * (W+2)

    for _ in range(N):
        w,v = map(int,input().split())

        for j in range(W+1,w-1,-1):
            dp[j] =max(dp[j-w] +v ,dp[j])

    print(dp[W])
#    print(dp)




if __name__ == "__main__":
    main()
Problem p03164 (python)

Fixed submission:
import sys
import bisect


def input():
    return sys.stdin.readline().rstrip()


def main():
    N, W = map(int, input().split())
    vsup = 10 ** 3 * N + 2
    dp = [10 ** 12 + 1] * (vsup)  # 価値の総和を i (以上にするための重さの最小値
    dp[0] = 0

    for i in range(N):
        w, v = map(int, input().split())
        for j in range(vsup-2, -1, -1):
            if j - v >= 0:
                dp[j] = min(dp[j], dp[j - v] + w)
            dp[j] = min(dp[j],dp[j+1])

    print(bisect.bisect_right(dp,W)-1)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
#import numpy as np
#from collections import defaultdict
import math
#from collections import deque

input = sys.stdin.readline
#import numpy as np



def main():

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

    dp = [0] * (W+2)

    for _ in range(N):
        w,v = map(int,input().split())

        for j in range(W+1,w-1,-1):
            dp[j] =max(dp[j-w] +v ,dp[j])

    print(dp[W])
#    print(dp)




if __name__ == "__main__":
    main()
Problem p03165 (python)

Fixed submission:
import sys
import math


def input():
    return sys.stdin.readline().rstrip()


def main():
    s = input()
    t = input()
    ls = len(s)
    lt = len(t)
    txt=""
    dp = [[0] * (lt + 1) for _ in range(ls + 1)]
    for i in range(1, ls + 1):
        for j in range(1, lt + 1):
            if s[i - 1] == t[j - 1]:
                dp[i][j] = dp[i - 1][j - 1] + 1
            else:
                dp[i][j] = max(dp[i - 1][j], dp[i][j - 1])

    while lt != 0 and ls != 0:
        if dp[ls][lt] == dp[ls - 1][lt]:
            ls -= 1
        elif dp[ls][lt] == dp[ls][lt - 1]:
            lt -= 1
        else:
            ls -= 1
            lt -= 1
            txt = txt +s[ls]

    print(txt[::-1])


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys

def input():
    return sys.stdin.readline().rstrip()


def main():
    s = input()
    t = input()
    ls = len(s)
    lt = len(t)
    txt = ""
    dp = [[0] * (lt + 1) for _ in range(ls + 1)]
    for i in range(1, ls + 1):
        for j in range(1, lt + 1):
            if s[i - 1] == t[j - 1]:
                dp[i][j] = dp[i - 1][j - 1] + 1
            else:
                dp[i][j] = max(dp[i - 1][j], dp[i][j - 1])

    while lt != 0 or ls != 0:
        if dp[ls][lt] == dp[ls - 1][lt]:
            ls -= 1
        elif dp[ls][lt] == dp[ls][lt - 1]:
            lt -= 1
        else:
            ls -= 1
            lt -= 1
            txt = txt + s[ls]

    print(txt[::-1])


if __name__ == "__main__":
    main()
Problem p03166 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**6)
edges, vertices = map(int, input().split())
dp = [None for _ in range(edges)]

nodes = [[] for _ in range(edges)]

for i in range(vertices):
    start, end = map(int, input().split())
    nodes[end -1].append(start-1)

for i in range(edges):
    if not len(nodes[i]):
        dp[i] = 0
def find(arr):
    if not len(arr):
        return 0
    for x in arr:
        if dp[x] is None:
            dp[x] = find(nodes[x])
    return 1 + max(dp[x] for x in arr)

for i in range(edges):
    dp[i] = find(nodes[i])

print(max(dp))

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**6)
from functools import lru_cache
@lru_cache(maxsize = None)

edges, vertices = map(int, input().split())
dp = [None for _ in range(edges)]

nodes = [[] for _ in range(edges)]

for i in range(vertices):
    start, end = map(int, input().split())
    nodes[end -1].append(start-1)

for i in range(edges):
    if not len(nodes[i]):
        dp[i] = 0
@lru_cache(maxsize = None)
def find(arr):
    if not len(arr):
        return 0
    for x in arr:
        if dp[x] is None:
            dp[x] = find(nodes[x])
    return 1 + max(dp[x] for x in arr)

for i in range(edges):
    dp[i] = find(nodes[i])

print(max(dp))
Problem p03309 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
for i in range(N):
    A[i] = A[i] - i + 1
A.sort()
b = A[N // 2]
ans = 0
for a in A:
    ans += abs(a - b)

print(ans)

Buggy submission (verdict: Runtime Error):
N= int(input())
A = list(map(int,input().split()))
for i in range(N):
  A = A[i]+i+1
A.sort()
b =A[N//2]
ans =0
for a in A:
  ans += abs(a -b)
  
  
print(ans)
Problem p03316 (python)

Fixed submission:
import sys
import math

def input():
    return sys.stdin.readline().rstrip()

def main():
    N = input()
    n = int(N)
    s = 0

    while n:
        s += n % 10
        n = n // 10
    if int(N) % s == 0:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
N = input()
n = int(N)
s =0
while N:
  s+= N%10
  N=N//10
if n%2==0:
  print("Yes")
else:
  print("No")
Problem p03609 (python)

Fixed submission:
X, T =map(int,input().split())
print(max(0,X-T))

Buggy submission (verdict: Runtime Error):
X T =map(int,input().split())
print(max(0,X-T))
Problem p02772 (python)

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

for i in range(n):
    no = a[i]
    if (no%2==0) and (no%3!=0) and (no%5!=0):
        print('DENIED')
        exit()
print('APPROVED')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = map(int, input().split())

for i in range(n):
    no = a[i]
    if (no%2==0) and (no%3!=0) and (no%5!=0):
        print('DENIED')
        exit()
print('APPROVED')
Problem p02791 (python)

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

min = p[0]
count = 1

for i in range(1,n):
    if p[i] <= min:
        count += 1
        min = p[i]

print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
p = list(map(int, input().split()))

min = p[1]
count = 1

for i in range(1,n):
    if p[i] <= min:
        count += 1
        min = p[i]

print(count)
Problem p02801 (python)

Fixed submission:
c = input()
s = list('abcdefghijklmnopqrstuvwxyz')

for i in range(25):
    if c == s[i]:
        print(s[i+1])
        exit()

Buggy submission (verdict: Runtime Error):
c = input()
s = list('abcdefghijklmnopqrstuvwxyz')

for i in s:
    if c == s[i]:
        print(s[i+1])
        exit()

Buggy submission (verdict: Runtime Error):
c = input()
s = 'abcdefghijklmnopqrstuvwxyz'

for i in s:
    if c == s[i]:
        print(s[i+1])
        exit()