Buggy python submission (verdict: Runtime Error):

N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''
for s in S:
  code=a[i]+N
  if code>a.index('z'):
    code-=(a.index('z')-1)
  res+=code
print(res)

Fixed submission:
N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''

for s in S:
  code=a.index(s)+N
  if code>a.index('Z'):
    code-=26
  res+=a[code]
print(res)

Buggy python submission (verdict: Runtime Error):
a=int(input())
c=list(input())
d=''
b=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
for i in range(len(c)):
  if b.index(c[i])+a<=23+a:
    
    c[i]=b[b.index(c[i])+a]
  else:
    c[i]=b[27-(b.index(c[i])+a)]
for i in range(len(c)):
  d+=c[i]
print(d)


Fixed submission:
N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''

for s in S:
  code=a.index(s)+N
  if code>a.index('Z'):
    code-=26
  res+=a[code]
print(res)

Buggy python submission (verdict: Runtime Error):
a=int(input())
c=list(input())
d=''
b=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
for i in range(len(c)):
  if b.index(c[i])+a<=26:
    c[i]=b[b.index(c[i])+a]
  else:
    c[i]=b[27-(b.index(c[i])+a)]
for i in range(len(c)):
  d+=c[i]
print(d)


Fixed submission:
N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''

for s in S:
  code=a.index(s)+N
  if code>a.index('Z'):
    code-=26
  res+=a[code]
print(res)

Buggy python submission (verdict: Runtime Error):
a=int(input())
c=list(input())
b=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
for i in range(len(c)):
  if b.index(c[i])+a<=26:
    c[i]=b[b.index(c[i])+a]
  else:
    c[i]=b[27-(b.index(c[i])+a)]
print(c)


Fixed submission:
N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''

for s in S:
  code=a.index(s)+N
  if code>a.index('Z'):
    code-=26
  res+=a[code]
print(res)

Buggy python submission (verdict: Runtime Error):
a=int(input())
c=list(input())
b=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
for i in range(len(c)):
  if b.index(c[i])+a<=26:
    c[i]=b[b.index(c[i])+a]
  else:
    c[i]=b[27-(b.index(c[i])+a)]
print(c)


Fixed submission:
N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''

for s in S:
  code=a.index(s)+N
  if code>a.index('Z'):
    code-=26
  res+=a[code]
print(res)

Buggy python submission (verdict: Runtime Error):
a=int(input())
p=list[]
c=list['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
b=input()
for i in c:
  if i==b:
    if a+c[i]>25:
      z=a+c[i]-25
      p=c[z]
    else:
    
      z=c[i]+a
      p=c[z]
  else:
    pass
print(p)    


Fixed submission:
N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''

for s in S:
  code=a.index(s)+N
  if code>a.index('Z'):
    code-=26
  res+=a[code]
print(res)

Buggy python submission (verdict: Runtime Error):
a=int(input())
p=list[]
c=list['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
b=input()
for i in c:
  if i==b:
    if c[i]>25:
      z=c[i]-25
      p=c[z]
    else:
    
      z=c[c[i]+a]
      p=c[z]
  else:
    pass
print(p)    


Fixed submission:
N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''

for s in S:
  code=a.index(s)+N
  if code>a.index('Z'):
    code-=26
  res+=a[code]
print(res)

Buggy python submission (verdict: Runtime Error):
a=int(input())
p=list[]
c=list['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
b=input()
for i in c:
  if i==b:
    if c[i]>25:
      z=c[i]-25
      p=c[z]
    else:
    
      z=c[c[i]+a]
      p=c[z]
  else:
    pass
  print(c[p])    


Fixed submission:
N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''

for s in S:
  code=a.index(s)+N
  if code>a.index('Z'):
    code-=26
  res+=a[code]
print(res)

Buggy python submission (verdict: Runtime Error):
a=int(input())
p=list[]
c=list['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
b=input()
for i in c:
  if i==b:
    if c[i]>25:
      p=c[i]-25
    else:
      p=c[c[i]+a]
  print(c[p])    


Fixed submission:
N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''

for s in S:
  code=a.index(s)+N
  if code>a.index('Z'):
    code-=26
  res+=a[code]
print(res)