Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [0]*N
A = list(map(int, input().split()))
ans = int(0)
x = int(0)
y = int(0)

As = sorted(A)

if As[0]>0:
    for i in range(N):
        ans += As[i]

    ans -=As[0]*2
    print(ans)

    x = As[0]
    for i in range(N-2):
        y = As[i+1]
        print(x,y)
        x = x - y

    y = x
    x = As[N-1]
    print(x,y)

elif As[N-1]<0:
    for i in range(N):
        As[i] *= -1
    for i in range(N):
        ans += As[i]

    ans -=As[N-1]*2
    print(ans)

    As = sorted(As)

    x = As[0]
    for i in range(N-2):
        y = As[i+1]
        print(-x,-y)
        x = x - y

    y = x
    x = As[N-1]
    print(-y,-x)

##################################
else:
    for i in range(N):
        ans += abs(As[i])

    print(ans)

    x = As[0]
    i = int(0)
    while(i<N-2 and A[N-i-1]>0):
        y = As[N-i-1]
        print(x,y)
        x = x - y
        i +=1
#    print("ok")
    y = x
    while(i<N-2):
        x = As[i]
        print(x,y)
        y = x - y
        i +=1


    x = As[N-i]
    print(x,y)


Fixed submission:
def examC():
    N = I()
    A = LI()
    negative = []; positive = []
    ans = 0; ansC = []
    for i in A:
        if i<0:
            negative.append(i)
        else:
            positive.append(i)
    if negative==[]:
        positive.sort()
        if N>2:
            cur = positive[0] - positive[1]
            ansC.append([positive[0], positive[1]])
            ans = sum(positive) - 2 * positive[0]
            for i in range(2, N - 1):
                ansC.append([cur, positive[i]])
                cur -= positive[i]
            ansC.append([positive[N - 1], cur])
        else:
            ansC.append([positive[1],positive[0]])
            ans = positive[1]-positive[0]

    elif positive==[]:
        negative.sort(reverse=True)
        cur = negative[0] - negative[1]
        ansC.append([negative[0],negative[1]])
        ans = -sum(negative)+2*negative[0]
        for i in range(2,N):
            ansC.append([cur,negative[i]])
            cur -=negative[i]
    else:
        positive.sort()
        negative.sort(reverse=True)
        ans = sum(positive) - sum(negative)
        curN = negative[0]
        curP = positive[0]
        for i in range(len(positive)-1):
            ansC.append([curN,positive[i+1]])
            curN -=positive[i+1]
        for i in range(len(negative)-1):
            ansC.append([curP,negative[i+1]])
            curP -=negative[i+1]
        ansC.append([curP,curN])

    print(ans)
    for v in ansC:
        print(" ".join(map(str,v)))

from string import digits
import sys,copy,bisect,itertools,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examC()
Buggy python submission (verdict: Runtime Error):
using namespace std;
 
int main() {
    int N, A, B, C, D;
    string S;
    cin >> N >> A >> B >> C >> D >> S;
    
    S = "#" + S + "#";
 
    auto can_reach = [&](int start, int end) {
        for (int i = start; i + 1 <= end; i++) {
            if (S[i] == '#' && S[i + 1] == '#') return false;
        }

Fixed submission:
N,A,B,C,D = map(int,input().split())
S = str(input())
ans = "Yes"

S0 = S[:A]
Sa = S[A-1:C]
Sb = S[B-2:D+1]
F = max(C,D)
S1 = S[F:]
#if S0.rfind('##')>=0 and S1.find('##')>=0 :
#    Sfe = S[S0.rfind('##'):(F+S1.find('##'))]
#elif S0.rfind('##')>=0 :
#    Sfe = S[S0.rfind('##'):]
#elif S1.find('##')>=0 :
#    Sfe = S[:(F+S1.find('##'))]
#else :
#    Sfe = S


#if S.find('##')>=0 and A<S.find('ABC')<C or B<S.find('ABC')<D:
if Sa.find('##')>=0 or Sb.find('##')>=0:
    ans = "No"

if A<B<D<C and not '...' in Sb:
    ans = "No"

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import re

S = str(input())
k=int(0)

#for i in range(2000):
#while () :
a = int(1)
while a!=0:
#    S = S[:S.rfind('ABC')] + 'BCA' + S[(S.rfind('ABC')+3):]
#    k +=1
    a = len(re.findall("ABC",S))
    k += a
    S = S.replace('ABC', 'BCA')
#    if a==0 : break

print(int(k))

Fixed submission:
s = input()
ans = 0
cntA = 0
for i in range(0, len(s) - 1):
    if s[i] == 'A':
        cntA += 1
    elif s[i: i + 2] == "BC":
        ans += cntA
    elif i > 0 and s[i - 1: i + 1] == "BC":
        continue
    else:
        cntA = 0
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import re

S = str(input())
k=int(0)

#for i in range(2000):
#while () :
while S.find('ABC')>=0:
#    S = S[:S.rfind('ABC')] + 'BCA' + S[(S.rfind('ABC')+3):]
#    k +=1
    k += len(re.findall("ABC",S))
    S = S.replace('ABC', 'BCA')
#    if a==0 : break

ans = (int(k))

print(ans)

Fixed submission:
s = input()
ans = 0
cntA = 0
for i in range(0, len(s) - 1):
    if s[i] == 'A':
        cntA += 1
    elif s[i: i + 2] == "BC":
        ans += cntA
    elif i > 0 and s[i - 1: i + 1] == "BC":
        continue
    else:
        cntA = 0
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import re

S = str(input())
k=int(0)

for i in range(20000):
#while S.find('ABC')>=0:
#    S = S[:S.rfind('ABC')] + 'BCA' + S[(S.rfind('ABC')+3):]
#    k +=1
    matchedList = re.findall("ABC",S)
    k += len(matchedList)
    S = S.replace('ABC', 'BCA')

ans = (int(k))

print(ans)

Fixed submission:
s = input()
ans = 0
cntA = 0
for i in range(0, len(s) - 1):
    if s[i] == 'A':
        cntA += 1
    elif s[i: i + 2] == "BC":
        ans += cntA
    elif i > 0 and s[i - 1: i + 1] == "BC":
        continue
    else:
        cntA = 0
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import re

S = str(input())
k=int(0)

while S.find('ABC')>=0:
#    S = S[:S.rfind('ABC')] + 'BCA' + S[(S.rfind('ABC')+3):]
#    k +=1
    matchedList = re.findall("ABC",S)
    k += len(matchedList)
    S = S.replace('ABC', 'BCA')

ans = (int(k))

print(ans)

Fixed submission:
s = input()
ans = 0
cntA = 0
for i in range(0, len(s) - 1):
    if s[i] == 'A':
        cntA += 1
    elif s[i: i + 2] == "BC":
        ans += cntA
    elif i > 0 and s[i - 1: i + 1] == "BC":
        continue
    else:
        cntA = 0
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
S = str(input())
k=int(0)

while S.find('ABC')>=0:
#    S[S.find('ABC'):S.find('ABC')+3] = "BCA"
    S = S[:S.rfind('ABC')] + 'BCA' + S[(S.rfind('ABC')+3):]
    k +=1

ans = (int(k))

print(ans)

Fixed submission:
s = input()
ans = 0
cntA = 0
for i in range(0, len(s) - 1):
    if s[i] == 'A':
        cntA += 1
    elif s[i: i + 2] == "BC":
        ans += cntA
    elif i > 0 and s[i - 1: i + 1] == "BC":
        continue
    else:
        cntA = 0
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,M =map(int,input().split())
L = [0]*M
R = [0]*M
ans = int(0)

for i in range(M):
    L[i],R[i] = list(map(int,input().split()))


for i in range(N):
    j = int(0)
    while (R[j]>=i+1>=L[j]) :
        j += 1
        if j==M:
            ans +=1
            break


print(ans)


Fixed submission:
N,M =map(int,input().split())
L = [0]*M
R = [0]*M
ans = int(0)

for i in range(M):
    L[i],R[i] = list(map(int,input().split()))

a1 = max(L)
a2 = min(R)

ans = a2-a1+1

if ans<0 : ans = int(0)

print(int(ans))
Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
 
ans = int(N-K+1)

print(ans)

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

ans = int(N-K+1)

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
 
ans = int(N-K+1)
 
print(ans)

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

ans = int(N-K+1)

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
 
ans = int(N-K+1)
 
print ans

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

ans = int(N-K+1)

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
 
ans = int(N-K+1)
 
print(ans)

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

ans = int(N-K+1)

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())

ans = int(N-K+1)

print(ans)

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

ans = int(N-K+1)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
R,G,B,N = map(int, input().split())

ans = int(0)
x = int(N//R)

for i in range(x+1):
    t = N-i*R
    y = int(t//G)
    for j in range(y+1) :
        s = int(N-R*i-G*j)
        if s%B==0 : ans +=1

print(ans)

Fixed submission:
R,G,B,N = map(int, input().split())

ans = int(0)
x = int(N//R)

for i in range(x+1):
    t = N-i*R
    y = int(t//G)
    for j in range(y+1) :
        s = int(t-G*j)
        if s%B==0 : ans +=1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
R,G,B,N = map(int, input().split())

ans = int(0)
x = int(N//R)
y = int(N//G)

for i in range(x+1):
    for j in range(y+1) :
        s = int(N-R*i-G*j)
        if s%B==0 and s>=0 : ans +=1

print(ans)

Fixed submission:
R,G,B,N = map(int, input().split())

ans = int(0)
x = int(N//R)

for i in range(x+1):
    t = N-i*R
    y = int(t//G)
    for j in range(y+1) :
        s = int(t-G*j)
        if s%B==0 : ans +=1

print(ans)

Buggy python submission (verdict: Runtime Error):
R = int(input())
G = int(input())
B = int(input())

N = int(input())

ans = int(0)
x = int(N//R)
y = int(N//G)
z = int(N//B)

for i in range(x+1):
    for j in range(y+1) :
        s = N-R*i-G*j
        if s%B==0 and s>=0 : ans +=1

print(ans)

Fixed submission:
R,G,B,N = map(int, input().split())

ans = int(0)
x = int(N//R)

for i in range(x+1):
    t = N-i*R
    y = int(t//G)
    for j in range(y+1) :
        s = int(t-G*j)
        if s%B==0 : ans +=1

print(ans)
Buggy python submission (verdict: Runtime Error):

N, W = map(int, input().split())
w, v = [0] * N, [0] * N
for i in range(N):
	w[i], v[i] = map(int, input().split())

dp = [[0] * (W + 1) for _ in range(N + 1)]
# dp[i][j](j=0,1,...,W)の値が求まっている状態で、dp[i+1][j]を更新することを考える
for i in range(N):
	for j in range(W + 1):
		# 品物(w[i],v[i])を選ぶとき、j-w[i]>=0に限って、価値v[i]が加算される
		if j - w[i] >= 0:
			dp[i + 1][j] = max(dp[i + 1][j], dp[i][j - w[i]] + v[i])
		# 品物(w[i],v[i])を選ばないとき、何も加算しない
		dp[i + 1][j] = max(dp[i + 1][j], dp[i][j])
print(dp[N][W])

Fixed submission:
N = int(input())
h = list(map(int, input().split()))
dp = [0]*N
ans = int(0)
dp[1] = abs(h[1]-h[0])


for i in range(2,N):
    dp[i] = min(dp[i-1] + abs(h[i]-h[i-1]),dp[i-2] + abs(h[i]-h[i-2]))

ans = dp[N-1]

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,W = map(int, input().split())
w = [0]*N
v = [0]*N
for i in range(N):
    w[i],v[i] = map(int,input().split())
dp = [[int(0) for i in range(W+1)] for i in range(N)]
ans = int(0)
dp[0][0] = 0


for i in range(0,N):
    for j in range(W+1):
        if j==0:
            dp[i][j] = 0
        elif w[i]>j:
            dp[i][j] = dp[i-1][j]
        else:
            dp[i][j] = dp[i - 1][j - w[i]] + v[i]

ans = max(max(dp))

print(ans)

Fixed submission:

N, W = map(int, input().split())
w, v = [0] * N, [0] * N
for i in range(N):
	w[i], v[i] = map(int, input().split())

dp = [[0] * (W + 1) for _ in range(N + 1)]
# dp[i][j](j=0,1,...,W)の値が求まっている状態で、dp[i+1][j]を更新することを考える
for i in range(N):
	for j in range(W + 1):
		# 品物(w[i],v[i])を選ぶとき、j-w[i]>=0に限って、価値v[i]が加算される
		if j - w[i] >= 0:
			dp[i + 1][j] = max(dp[i + 1][j], dp[i][j - w[i]] + v[i])
		# 品物(w[i],v[i])を選ばないとき、何も加算しない
		dp[i + 1][j] = max(dp[i + 1][j], dp[i][j])
print(dp[N][W])
Buggy python submission (verdict: Time Limit Exceeded):
N, W = map(int, input().split())
w, v = [0]*N, [0]*N
for i in range(N):
    w[i], v[i] = map(int,input().split())
Vmax = max(v)*N+1
Wmax = max(w)*N+1
dp = [[Wmax] * (Vmax) for _ in range(N + 1)]
ans = int(0)
dp[0][0] = int(0)

for i in range(N):
    for j in range(Vmax):
        if j-v[i]>=0:
            dp[i+1][j] = min(dp[i][j-v[i]]+w[i],dp[i+1][j])
        dp[i+1][j] = min(dp[i+1][j],dp[i][j])

for j in range(Vmax):
    if 0<=dp[N][j]<=W:
        ans = max(ans,j)

print(ans)

Fixed submission:
N, W = map(int, input().split())
w, v = [0]*N, [0]*N
for i in range(N):
    w[i], v[i] = map(int,input().split())
Vmax = max(v)*N+1
Wmax = max(w)*N+1
dp = [[Wmax] * (Vmax) for _ in range(N + 1)]
ans = int(0)
dp[0][0] = int(0)

for i in range(N):
    for j in range(Vmax):
        if j-v[i]>=0:
            dp[i+1][j] = min(dp[i][j-v[i]]+w[i],dp[i+1][j])
        dp[i+1][j] = min(dp[i+1][j],dp[i][j])

for j in range(Vmax):
    if 0<=dp[N][j]<=W:
        ans = max(ans,j)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):

N = int(input())
a = list(map(int, input().split()))

dp = [[0] * (N) for _ in range(N+1)]
ans = int(0)
for i in range(N):
    dp[i][i] = a[i]

#for l in range(1,N)
for l in range(1,N):
    for i in range(N-l):
        j = i + l
        dp[i][j] = max(dp[i][i]-dp[i+1][j], dp[j][j]-dp[i][j-1])


ans = dp[0][N-1]

print(ans)
#print(dp)

Fixed submission:

N = int(input())
a = list(map(int, input().split()))

dp = [[0] * (N) for _ in range(N+1)]
ans = int(0)
for i in range(N):
    dp[i][i] = a[i]

#for l in range(1,N)
for l in range(1,N):
    for i in range(N-l):
        j = i + l
        dp[i][j] = max(dp[i][i]-dp[i+1][j], dp[j][j]-dp[i][j-1])


ans = dp[0][N-1]

print(ans)
#print(dp)
Buggy python submission (verdict: Runtime Error):
def examA():
    N = I()
    V = LI()
    C = LI()
    ans = 0
    for i in range(N):
        ans += max(0,V[i]-C[i])
    print(ans)
    return

def examB():
    S = SI()
    K = I()
    for s in S:
        if s!="1":
            ans = s
            break
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

from decimal import Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examB()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Fixed submission:
def examA():
    N = DI()/dec(7)
    ans = N
    print(N)
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    S = SI()
    K = I()
    ans = "1"
    for i,s in enumerate(S,start=1):
        if s!="1":
            ans = s
            break
        if i==K:
            ans = s
            break
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examC()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""
Buggy python submission (verdict: Time Limit Exceeded):

sortsecond = lambda val: val[1]
N, M, Q = map(int, input().split())
l=[]
p=[]
for i in range(M):
    t=input().split()
    l.append((int(t[0]),int(t[1])))
for i in range(Q):
    t=input().split()
    p.append((int(t[0]),int(t[1])))

ans = int(0)
count = int(0)
sumTrain = [[0 for i in range(N+1)] for j in range(N+1)]
ansTrain = [[0 for i in range(N+1)] for j in range(N+1)]

for i in range(M):
    sumTrain[l[i][0]][l[i][1]] += 1

for i in range(N):
    for j in range(N):
        for k in range(i,j+1):
            for l in range(k,j+1):
                ansTrain[i+1][j+1] += sumTrain[k+1][l+1]


for i in range(Q):
    ans = ansTrain[p[i][0]][p[i][1]]
    print(ans)


Fixed submission:
import sys
sys.setrecursionlimit(10**6)
N, M, Q = map(int, input().split())
l=[]
p=[]
for i in range(M):
    t=input().split()
    l.append((int(t[0]),int(t[1])))
for i in range(Q):
    t=input().split()
    p.append((int(t[0]),int(t[1])))

ans = int(0)
count = int(0)
sumTrain = [[0 for i in range(N+1)] for j in range(N+1)]
ansTrain = [[-1 for i in range(N+1)] for j in range(N+1)]

for i in range(M):
    sumTrain[l[i][0]][l[i][1]] += 1

def dfs(l, r):
    if not l <= r:
        return 0
    if l == r:
        return sumTrain[l][r]
    if ansTrain[l][r] != -1:
        return ansTrain[l][r]
    ansTrain[l][r] = res = sumTrain[l][r] + dfs(l+1, r) + dfs(l, r-1) - dfs(l+1, r-1)
    return res

for i in range(Q):
    ans = dfs(p[i][0],p[i][1])
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):

N, C = map(int, input().split())
D = [list(map(int, input().split())) for i in range(C)]
c = [list(map(int, input().split())) for i in range(N)]

G1 = []
G2 = []
G3 = []
a = int(0)

for i in range(N):
    for j in range(N):
        if (i + j) % 3 ==2:
            G1.append(c[i][j])
        elif (i + j) % 3 == 0:
            G2.append(c[i][j])
        else:
            G3.append(c[i][j])
ans_candi = []

for i1 in range(C):
    for i2 in range(C):
        for i3 in range(C):
            t = int(0)
            if i1!=i2 and i2!=i3 and i3!=i1:
                for j in G1:
                    t += D[j-1][i1]
                for j in G2:
                    t += D[j-1][i2]
                for j in G3:
                    t += D[j-1][i3]
                ans_candi.append(t)


print(min(ans_candi))


Fixed submission:

N, C = map(int, input().split())
D = [list(map(int, input().split())) for i in range(C)]
c = [list(map(int, input().split())) for i in range(N)]

G1 = [0]*C
G2 = [0]*C
G3 = [0]*C
a = int(0)

for i in range(N):
    for j in range(N):
        if (i + j) % 3 ==2:
            G1[c[i][j]-1] += 1
        elif (i + j) % 3 == 0:
            G2[c[i][j]-1] += 1
        else:
            G3[c[i][j]-1] += 1
ans_candi = []


for i1 in range(C):
    for i2 in range(C):
        for i3 in range(C):
            t = int(0)
            if i1!=i2 and i2!=i3 and i3!=i1:
                for j in range(C):
                    t += D[j][i1]*G1[j]
                for j in range(C):
                    t += D[j][i2]*G2[j]
                for j in range(C):
                    t += D[j][i3]*G3[j]
                ans_candi.append(t)


print(min(ans_candi))
Buggy python submission (verdict: Runtime Error):
X = int(input())
S = set()
for i in range(2,X):
  b = 1
  while(i**b<=X):
    S.add(i**b)
    b += 1
ans = max(S)
print(ans)

Fixed submission:
def pff(m):
    pf = {}
    for i in range(2, int(m ** 0.5) + 1):
        while m % i == 0:
            pf[i] = pf.get(i, 0) + 1
            m //= i
    if m > 1: pf[m] = 1
    return pf
def examB():
    X = I()
    ans = 0
    for i in range(X,0,-1):
        cur = pff(i)
        flag = True
        now = 0
        for j in cur.values():
            if j==1:
                flag = False
            if now==0:
                now = j
            else:
                if now!=j:
                    flag = False
        if flag:
            ans = i
            break
    print(ans)

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()
Buggy python submission (verdict: Runtime Error):
def examB():
    A, B = LI(); St = S()
    nums = list(map(str, range(10)))
    ans = "Yes"
    if St[A] == "-":
        for s in S[:A] + S[A + 1:]:
            if s not in nums:
                ans = "No"
                break
    else:
        ans = "No"
    print(ans)


import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()


Fixed submission:
def examB():
    A, B = LI(); St = S()
    nums = list(map(str, range(10)))
    ans = "Yes"
    if St[A] == "-":
        for s in St[:A] + St[A + 1:]:
            if s not in nums:
                ans = "No"
                break
    else:
        ans = "No"
    print(ans)


import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()
Buggy python submission (verdict: Runtime Error):
def examB():
    St = S()
    AZ = [chr(i) for i in range(97, 97 + 26)]
    for s in AZ:
        if s not in St:
            ans = s
            break
    print(ans)

import sys
import copy
import bisect
import heapq
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

Fixed submission:
def examB():
    St = S()
    AZ = [chr(i) for i in range(97, 97 + 26)]
    ans = "None"
    for s in AZ:
        if s not in St:
            ans = s
            break
    print(ans)

import sys
import copy
import bisect
import heapq
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()