Problem:


Score : 100 points

Problem Statement

You are given a string S of length N consisting of A, B and C, and an integer K which is between 1 and N (inclusive).
Print the string S after lowercasing the K-th character in it.

Constraints

1 ≤ N ≤ 50

1 ≤ K ≤ N

S is a string of length N consisting of A, B and C.

Input

Input is given from Standard Input in the following format:

N K
S

Output

Print the string S after lowercasing the K-th character in it.

Sample Input 1

3 1
ABC

Sample Output 1

aBC

Sample Input 2

4 3
CABA

Sample Output 2

CAbA



Sample input:
3 1
ABC


Sample output:
aBC

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
s = input()

print(s[0:k-1] + s[k-1].lower() + s[k:a])

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
s = input()

print(s[0:k-1] + s[k-1].lower() + s[k, a])

Submission status: Runtime Error

Solution code:
n, k = map(int,input().split())
S = input()
S[k-1] = S[k-1].lower()
print(S)

Submission status: Runtime Error

Solution code:
n, k = map(int,input().split())
S = input()
S[k-1] = S[k-1].lower
print(S)

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(20000)

N = int(input())
W = [list(map(int, input().split())) for _ in range(N-1)]
nodes = [[] for _ in range(N+1)]
for w in W:
    nodes[w[0]].append((w[1], w[2]))
    nodes[w[1]].append((w[0], w[2]))
ans = [-1] * (N+1)
ans[1] = 0
def search(num, root, dis):
    for node in nodes[num]:
        sum_d = dis
        if node[0] != root:
            idx = node[0]
            sum_d += node[1]%2
            if sum_d%2 != 0:
                ans[idx] = 1
            else:
                ans[idx] = 0
            search(idx, num, sum_d)

search(1, 0, 0)
for answer in ans[1:]:
    print(answer)

Submission status: Runtime Error

Solution code:
n, k = (int(i) for i in input().split())  
s = input()
s_ = s[:k-1] + s[k].lower() + s[k:]
print(s_)

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
s = input()
 
if s[k-1] == "A":
  s=s[0:k-1]+"a"+s[k:n]
elif s[k] == "B":
  s=s[0:k-1]+"b"+s[k:n]
else:
  s=s[0:k-1]+"c"+s[k:n]
print(s)

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
s = input()

if s[k] == "A":
  s=s[0:k]+"a"+s[k+1:n]
elif s[k] == "B":
  s=s[0:k]+"b"+s[k+1:n]
else:
  s=s[0:k]+"c"+s[k+1:n]
print(s)

Submission status: Runtime Error

Solution code:
n,k = map(int, input().split())
print(input().replace(s[k-1], s[k-1].lower()))

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())

S = list(input())

S[K-1] = S[K-1].lower()

for i in range(N):
  s_new += S[i]
    
print(s_new)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())

S = list(input())

S[K-1] = S[K-1].lower()

for i in S:
  s_new += i
    
print(s_new)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())

S = list(input())

S[K-1] = S[K-1].lower()

for i in S:
    s_new += i
    
print(s_new)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())

S = list(input())

S[K-1] = S[K-1].lower

for i in S:
    s_new += i
    
print(s_new)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())

S = list(input())

S[K-1] = S[K-1].lower

for i in S[0,K]:
    s_new += S[i]
    
print(s_new)

Submission status: Runtime Error

Solution code:
import math
 
S = int(input())
 
first_half = math.floor(S / 100)
second_half = S - first_half * 100
 
if 1 <= second_half <= 12 and 1 <= first_half <= 12 :
  print("AMBIGUOUS")
elif 1 <= second_half <= 12 :
   		print("YYMM")
elif 1 <= first_half <= 12 :
    	print("MMYY")
else: 
        print("NA")

Submission status: Runtime Error

Solution code:
import math

S = int(input())

first_half = math.floor(S / 100)
second_half = S - first_half * 100

if 1 <= second_half <= 12 and 1 <= first_half <= 12 :
  print("AMBIGUOUS")
else:
  if 1 <= second_half <= 12 :
   		print("YYMM")
  elif 0 == first_half or 12 < first_half :
    	print("NA")
  else: 
        print("MMYY")

Submission status: Runtime Error

Solution code:
import math

S = int(input())

first_half = math.floor(S / 100)
second_half = S - math.floor(S / 100) * 100

if 1 <= second_half <= 12 and 1 <= first_half <= 12 :
  print("AMBIGUOUS")
else:
  if 1 <= second_half <= 12 :
   		print("YYMM")
  elif 0 == first_half or 12 < first_half :
    	print("NA")
  else: 
        print("MMYY")

Submission status: Runtime Error

Solution code:
S = int(input())

first_half = round(S, -2) / 100
second_half = S - round(S, -2)

if 1 <= second_half <= 12 and 1 <= first_half <= 12 :
  print("AMBIGUOUS")
else:
  if 1 <= second_half <= 12 :
   		print("YYMM")
  elif 1 <= first_half <= 12 :
    	print("MMYY")
  else: 
        print("NA")

Submission status: Runtime Error

Solution code:
S = int(input())

first_half = round(S, -2) / 100
second_half = S - round(S, -2)

if 1 <= second_half <= 12 and 1 <= first_half <= 12 :
  print("AMBIGUOUS")
elif 1 <= second_half <= 12 :
    print("YYMM")
elif 1 <= first_half <= 12 :
    print("MMYY")
else: 
    print("NA")

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = input()

letters = list(S)
letters[K] = letters[K].lower()

new_S = ""

for letter in letters:
  new_S += letter
  
print(new_S)

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
X = [0] * M
Y = [0] * M
Z = [0] * M 
for i in range(M):
  X[i], Y[i], Z[i] = map(int, input().split())

G = [[] for _ in range(N)]

for i in range(M) :
    G[Y[i]-1].append(X[i])
    G[X[i]-1].append(Y[i])

c = [False for _ in range(N)]
 
def DFS(G,s):
    c[s-1] = True
    for i in G[s-1]:
        if not c[i-1]:         
            DFS(G,i)
ans = 0
for i in range(N):
    if not c[i]:
        DFS(G,i+1)
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
　l = list(map(int,input().split()))
N = l[0]
K = l[1] 
S = input()
list_S = list(S)
if list_S[K-1] == 'A':
    list_S[K-1] = 'a'
elif list_S[K-1] == 'B':
    list_S[K-1] = 'b'
if list_S[K-1] == 'C':
    list_S[K-1] = 'c'
L = ''.join(list_S)
print(L)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = str(input())
S_new = S.lower[K-1]
print(S_new)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = str(input())

print(S.lower(K-1))

Submission status: Runtime Error

Solution code:
N,K=list(map(int,input().split()))
S=input()
if S[K-1]=='A':
    S[K-1]='a'
if S[K-1]=='B':
    S[K-1]='b'
if S[K-1]=='C':
    S[K-1]='c'
print(S)

Submission status: Runtime Error

Solution code:
S = input()

a = 10*int(S[0])+int(S[1])
b = 10*int(S[2])+int(S[3])

if a>12 and b>12:
    print('NA')
elif a>12 and 1<=b<=12:
    print('YYMM')
elif 1<=a<=12 and b>12:
    print('MMYY')
else:
    print('AMBIGUOUS')

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = input()
if S[K - 1] == 'A':
  S[K - 1] = 'a'
elif S[K - 1] == 'B':
  S[K - 1] = 'b'
else:
  S[K - 1] = 'c'
print(S)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = input()
if S[K + 1] == 'A':
  S[K + 1] = 'a'
elif S[K + 1] == 'B':
  S[K + 1] = 'b'
else:
  S[K + 1] = 'c'
print(S)

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
s = input()
c = list(s)
c[k] = c[k].lower()

for i in c:
    print(i,end='')

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
s = str(input())
print(s[:m-1]+s[m-1].lower+s[m-1])

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = input()
S[K-1] = S[K-1].lower()
print("".join(S))

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
S = input()
S[K-1] = S[K-1].lower()
print(''.join(S))

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
S = input()
S[K-1] = S[K-1].lower()
print('',join(S))

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
S = input()
S[K-1] = S[K-1].lower()
print(S)

Submission status: Runtime Error

Solution code:
N,K=map(input().split())
S=str.input()
S[K-1] = S[K-1].lower()
print(S)

Submission status: Runtime Error

Solution code:
N,K=map(input().split())
S=str.input()
S[K-1] = S[K-1].lower()

Submission status: Runtime Error

Solution code:
N,K=map(input().split())
S=input()
S[K-1] = S[K-1].lower()

Submission status: Runtime Error

Solution code:
N,K=map(input().split())
S=input()
S = S[:K] + S[K+1].lower() + S[K+2:]

Submission status: Runtime Error

Solution code:
N,K=map(input().split())
S=input()
S = S[:K] + S[K+1].lower() + S[K:]

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
A = input()

A[K-1::] = A[k-1::].lower()
print(A)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = input()

s = list(S)
print(s[K+1].lower())

Submission status: Runtime Error

Solution code:
N,K = map(int, input().split())
S = input()

if S[K] = 'A':
  S[K] = 'a'
if S[K] = 'B':
  S[K] = 'b'
if S[K] = 'C':
  S[K] = 'c'

print(S)

Submission status: Runtime Error

Solution code:
length, index = map(int, input().split())
string = list(input())
string = replace(string[index],string[index].lower())
print(string.join())

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
s = list(input())
s[k-1]= str.lower(s[k-1])
"".join(s)uu

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
strs=input()
strs=strs.replace(strs[k],strs[k].lower())
print(strs)

Submission status: Runtime Error

Solution code:
n,k = input().split()
s = list(input())
s[int(k)] = s[int(k)].lower()
print(''.join(s))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
s=input()
s[k-1]=s[k-1].lower()
print("".join(s))

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
S=list(input())
S[K-1]=S[K-1].lower()
print("".join(K))

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = input()
if S[K-1]=='A':
  S[K-1]='a'
  elif S[K-1]=='B':
    S[K-1]='b'
    else:
      S[K-1]='c'
print(S)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = input()
if S[K-1]=='A':
  S[K-1]='a'
elif S[K-1]=='B':
    S[K-1]='b'
else:
     S[K-1]='c'
print(S)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = input()
if S[K]=='A':
  S[K]='a'
elif S[K]=='B':
    S[K]='b'
else:
     S[K]='c'
print(S)

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())

s = input()

print(s[:k - 1] + s[k -1].lower + s[k:])

Submission status: Runtime Error

Solution code:
n, k = list(map(int, input().split()))

s = input()

print(s[:k - 1] + s[k -1].lower + s[k:])

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())

s = input()

s2 = list(s[:k-1] + s[k-1].lower + s[k:])
print(s2)

Submission status: Runtime Error

Solution code:
n, k = list(map(int, input().split()))

s = input()

s2 = list(s[:k - 1] + s[k -1].lower + s[k:])
print(s2)

Submission status: Runtime Error

Solution code:
n, k = list(map(int, input().split()))

s = input()

s2 = list(s[:k - 1] + s.lower[k -1] + s[k:])
print(s2)

Submission status: Runtime Error

Solution code:
n, k = list(map(int, input().split()))

s = [str, i for in input()]

print(s.lower(k))

Submission status: Runtime Error

Solution code:
n,k = map(int, input().split())
s = input()

s = s[:k] + s[k].lower() + s[k+1:]
print(s)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
s=input()
s[k-1]=(s[k-1]).lower()
print(s)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split)
s=input()
s[k-1]=(s[k-1]).lower()

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
s = list(input())
print("".join(s[:K]+ list(s[K].lower()) + s[K + 1:]))

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = str(input())

S[K + 1] = S[K + 1].lower()
print(S)

Submission status: Runtime Error

Solution code:
N , K = map(int,input().split())
S = str(input())

for i in range(1,N+1):
    if i == K :
        S[i] = S[i].lower()
print(S)

Submission status: Runtime Error

Solution code:
N , K = map(int,input().split())
S = str(input())

for i in range(1,N+1):
    if i == K :
        S[i] == S[i].lower()
print(S)

Submission status: Runtime Error

Solution code:
N , K = map(int,input().split())
S = str(input())

for i in range(1:N+1):
    if i == K :
        S[i] == S[i].lower()
print(S)

Submission status: Runtime Error

Solution code:
N , K = map(int,input().split())
S = str(input())

for i in N:
    if i == K :
        S[i] == S[i].lower()
print(S)

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
s = input()
print(s[:k -1] + s[k -1].lower + s[k:-1])

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
s = input()
s[k - 1] = s[k - 1].lower()
print(s)

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
s input()
s[k-1] = s[k-1].lower()
print(s)

Submission status: Runtime Error

Solution code:
N,K=(int(i) for i in input().split())
S=input()
print(S[:K]+S[K+1].lower()+S[K+1:])

Submission status: Runtime Error

Solution code:
N.K=(int(i) for i in input().split())
S=input()
print(S[:K]+lower(S[K+1])+S[K+1:])

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = str(input())

s1 = S[:K-1]
smid = S[K-1:K].lower()
s1 = S[K:]

print(s0 + smid + s1)

Submission status: Runtime Error

Solution code:
N, K = list(map(int, input().split()))
S = input()
S_altered = S[:K] + S[K].lower() + S[K+1:]
print(S_altered)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
C=input()
print(C[:B]+C[B].lower()+C[B+1:])

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
S = input()
x = S.lower(b)
print(x)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
for i in range(n):
  s=list(map(int,input().split()))
s[k].lower()
for i in range(n):
  print(s[i],end="")

Submission status: Runtime Error

Solution code:
S = input()
ret = ""
for i in range(len(S)):
    if i == K-1:
        ret += S[i].lower()
    else:
        ret += S[i]
print(ret)

Submission status: Runtime Error

Solution code:
N,K = map(int, input().split())
S = input()

for i in range(1,N+1):
    if i == K:
        S[i] == S[i].lower()

print(S)

Submission status: Runtime Error

Solution code:
a,b=input().split()
c=input()
c[b-1]=c[b-1].upper()
print(c)

Submission status: Runtime Error

Solution code:
n=int(input())
L=[[] for i in range(n)]
for i in range(n-1):
    u,v,w=map(int, input().split())
    u-=1
    v-=1
    L[u].append([v,w])
    L[v].append([u,w])
ans=[-1]*n
ans[0]=0
from collections import deque
stack=deque([])
stack.append(0)
while stack:
    v=stack.popleft()
    for u, w in L[v]:
        if ans[u]!=-1:
            continue
        ans[u]=(ans[v]+w)%2
        stack.appendleft(u)
for a in ans:
    print(a)

Submission status: Runtime Error

Solution code:
n=int(input())
L=[[] for i in range(n)]
for i in range(n-1):
    u,v,w=map(int, input().split())
    u-=1
    v-=1
    L[u].append([v,w])
    L[v].append([u,w])
ans=[-1]*n
ans[0]=0
from collections import deque
que=deque([])
que.append(0)
while que:
    v=que.popleft()
    for u, w in L[v]:
        if ans[u]!=-1:
            continue
        ans[u]=(ans[v]+w)%2
        que.append(u)
for a in ans:
    print(a)

Submission status: Runtime Error

Solution code:
N, K = map(int, raw_input().split())
word = raw_input().split()
newword = ""
for i in xrange(N):
  if i == K - 1:
    if word[i] == "A":
      newword += "a"
    elif word[i] == "B":
      newword += "b"
    else:
      newword += "c"
  else:
    newword += word[i]
    
print newword

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = list(map(str, input()))

if S[K] == 'A':
    S[K] = 'a'
elif S[K] == 'B':
    S[K] = 'b'
else:
    S[K] = 'c'
    
T = ''.join(S)

print(T)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = list(map(str, input()))

if S[K] == 'A':
    S[K] = 'a'
elif S[K] == 'B':
    S[K] = 'b'
else:
    S[K] = 'c'

print(S)

Submission status: Runtime Error

Solution code:
n,k=(int(i) for i in input().split())
s=input()
if s[k-1]=="A":
  s[k-1]="a"
elif s[k-1]=="B":
  s[k-1]="b"
else:
  s[k-1]="c"
print(s)

Submission status: Runtime Error

Solution code:
n,k=(int(i) for i in input().split())
s=input()
if s[k]=="A":
  s[k]="a"
elif s[k]=="B":
  s[k]="b"
else:
  s[k]="c"
print(s)

Submission status: Runtime Error

Solution code:
n,k = map(int. input().split())
s = input()

change = s[k-1].lower()
print(s[:k] + change + s[k+1:])

Submission status: Runtime Error

Solution code:
N, K = map(int), input().split())
S = list(input())
S[K - 1] = S[K - 1].lower()
print(''.join(S))

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
s = input()
print(s[:k-1]+s[k-1].lower+s[k:])

Submission status: Runtime Error

Solution code:
N , K = map(int,input().split())
S = input()

if S[K] == 'A' :
    S[K] = 'a'
if S[K] == 'B' :
    S[K] = 'b'
if S[K] == 'C' :
    S[K] = 'c'

print(S)

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
S=input()
for i,m in enumerate(S):
    if m=="A":
        S[i]="A"
    if m=="B":
        S[i]="B"
    if m=="C":
        S[i]="C"
print(S)

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
S=input()
for i,m in enumerate(S):
    if m=="A":
        S[i]="A"
    if m=="B":
        S[i]="B"
    if m=="C"
        S[i]="C"
print(S)

Submission status: Runtime Error

Solution code:
#coding:utf-8
def main():
  A,B=map(int,input().split())
  s=input()
  s[B]=s[B].lower()
  print(s)
  
 if _name_=='_main_':
  main()

Submission status: Runtime Error

Solution code:
#coding:utf-8
def main():
  A,B=map(int,input().split())
  s=input()
  s[B]=s[B].lower()
  print(s)
  
 if _name_='_main_':
  main()

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Mon May 27 14:45:50 2019

@author: 吉田和博
"""


def Mcheck(n):
    if(0<n<13):
        return 0
    else:
        return 1
    
def Ycheck(n):
    if(n==0):
        return 1
    else:
        return 0


S=input()
f=int(S[0])*10+int(S[1])
s=int(S[2])*10+int(S[3])

if(Mcheck(f)==0):
    if(Ycheck(s)==0):
        if(Ycheck(f)==0):
            if(Mcheck(s)==0):
                print("AMBIGUOUS")
            else:
                print("MMYY")
        else:
            print("MMYY")
    else:
        if(Mcheck(s)==0):
            if(Ycheck(f)==0):
                print("AMBIGUOUS")
            else:
                print("AMBGIOUS")
        else:
            print("NA")
else:
     if(Mcheck(s)==0):
            if(Ycheck(f)==0):
                print("YYMM")
            else:
                print("YYMM")
     else:
            print("NA")

Submission status: Runtime Error

Solution code:
a,b=input().split()
s=list(input())
print([l.replace(s[int(b)],str.lower(s[int(b)])) for l in s])

Submission status: Runtime Error

Solution code:
n,idx=map(int,input().split())
s=list(input())
s[idx]=chr(ord(s[idx])+32)
print(''.join(s))

Submission status: Runtime Error

Solution code:
n,idx=map(int,input().split())
s=input()
s[idx]=chr(ord(s[idx])+32)
print(s)

Submission status: Runtime Error

Solution code:
n,k = map(int, input().split())
w = {"A":"a", "B":"b", "C":"c"}
s = input().split()
print([i if i != k-1 else w[s[i]] for i in len(s)])

Submission status: Runtime Error

Solution code:
import sys
# gcd
from fractions import gcd
# 切り上げ，切り捨て
# from math import ceil, floor
# リストの真のコピー（変更が伝播しない）
# from copy import deepcopy
# 累積和。list(accumulate(A))としてAの累積和
from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# S = Counter(l)  # カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
# from collections import Counter
# import math
# from functools import reduce
#
# input関係の定義
import os
fin = open('in_2.txt', 'r')
sys.stdin = fin
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template


def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str

    # write code
    A = list(S)
    A[K-1] = A[K-1].lower()
    print(''.join(A))

Submission status: Runtime Error

Solution code:
from math import log2

def prob(num, dice, K):
	times = int(log2(K/num) + 1)
	base  = 1/dice
	if times < 0:
		times = 0
	p = base * pow(0.5,times)
	return p

def sum_prob(dice, K):
	probabilty = 0
	for i in range(1,dice+1):
		probabilty += prob(i, dice, K)
	return probabilty


inputs = list(map(float,input().split(' ')))[:2]
dice = inputs[0]
K = inputs[1]
probabilty = sum_prob(dice, K)
print(probabilty)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = [input() for i in range(K)]
if S[K+1]=="A":
  S[K+1] = "a"
  if S[K+1]=="B":
  S[K+1] = "b"
  if S[K+1]=="C":
  S[K+1] = "c"
print(S)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = [input() for i in range(K)]
if S[K+1]==A:
  S[K+1] = a
  if S[K+1]==B:
  S[K+1] = b
  if S[K+1]==C:
  S[K+1] = c
print(S)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = input().split()
if S[K+1]==A:
  S[K+1] = a
  if S[K+1]==B:
  S[K+1] = b
  if S[K+1]==C:
  S[K+1] = c
print(S)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = input().split
if S[K+1]==A:
  S[K+1] = a
  if S[K+1]==B:
  S[K+1] = b
  if S[K+1]==C:
  S[K+1] = c
print(S)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = input()
if S[K+1]==A:
  S[K+1] = a
  if S[K+1]==B:
  S[K+1] = b
  if S[K+1]==C:
  S[K+1] = c
print(S)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = input()
if S[K-1]==A:
  S[K-1] = a
  if S[K-1]==B:
  S[K-1] = b
  if S[K-1]==C:
  S[K-1] = c
print(S)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
s=list(input())
if s[k-1]='A':
    s[k-1]='a'
elif s[k-1]='B':
    s[k-1]='b'
else:
    s[k-1]='c'
ans=''
for i in range(n):
    ans+=s[i]
print(ans)

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
s = input()
for i in range(n):
  if i == k - 1:
    print(s[i].lower(), end=="")
  else:
    print(s[i], end=="")

Submission status: Runtime Error

Solution code:
in=input().split(' ')
ss=input()
n=int(in[0])
k=int(in[1])
ss[k-1]=ss[k-1].lower()
print(ss)

Submission status: Runtime Error

Solution code:
a = input().split()
n, k, s = a
k = int(k)
print(s.replace(s[k-1], s[k-1].lower()))

Submission status: Runtime Error

Solution code:
s = int(input())
 
a = int(s / 100) #百の位と千の位
b = s - a*100 #下二桁

if a > 12:
  if b > 12 or b == 0:
    print("NA")
  else:
    print("YYMM")
elif a == 0:
  if b < 13 and b > 0:
    print("YYMM")
  else:
    print("NA")
elif b > 12 or b == 0:
  print("MMYY")
else:
  print("AMBIGUOUS")

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
s = input()
s[k] = s[k].lower()
print(s)

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10000000)
N = int(input())
JU = [-1] * N

LI = [[] for _ in range(N)]
for _ in range(N-1):
    u,v,w = map(int,input().split())
    W = w%2
    LI[u-1].append([v-1,W])
    LI[v-1].append([u-1,W])
def dfs(x):
    for i in range(len(LI[x])):
        j = LI[x][i][0]
        k = LI[x][i][1]
        if JU[j] == -1:
            if JU[i] == 0:
                if k == 0:
                    JU[j] = 0
                    dfs(j)
                else:
                    JU[j] = 1
                    dfs(j)
            else:
                if k == 0:
                    JU[j] = 1
                    dfs(j)
                else:
                    JU[j] = 0
                    dfs(j)

for i in range(N):
    if JU[i] == -1:
        JU[i] = 0
        dfs(i)
for i in range(N):
    print(JU[i])

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
S = input()
S[K] = S[K].lower()
print(S)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = input()
print(S[:K]+S[K].lower()+S[K+1:])

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
n =input()
 
if n[b-1] == 'A': n[b-1] = 'a'
elif n[b-1] == 'B': n[b-1] = 'b'
else: n[b-1] = 'c'
print(n)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
n =input()

if n[b-1] == 'A': n[b-1] = 'a'
elif n[b-1] == 'B': n[b-1] = 'b'
else n[b-1] = 'c'

print(n)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
n = input()
m = ['a','b','c']

if n[b-1] =='A': n[b-1].replace(m[0])
elif n[b-1] == 'B': n[b-1].replace(m[1])
else: n[b-1].replace(m[2])
  
print(n)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
n = input()
n.downer(b)
print(n)

Submission status: Runtime Error

Solution code:
n,k=input().split()
s=input()
ans=""
for i in range(n):
  if k+1==i:
    ans+=str.lower(s[i])
  else:
    ans+=s[i]
print(ans)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
s=input()
if s[k-1]=='A':
  s[k-1]='a'
elif s[k-1]=='B':
  s[k-1]='b'
else:
  s[k-1]='c'
  
print(s)

Submission status: Runtime Error

Solution code:
N,K,S=map(int,input().split())

if S[K-1]=A:
  S[K-1]=a
elif S[K-1]=B:
  S[K-1]=b
else:
  S[K-1]=c
  
print(S)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = input()
print(S[:K-1] + S[K-1].lower + S[K:])

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
S=input()
T=list(S)
T[K-1]=T[K-1].lower()
S_changed="".join(T)
print(S_changed

Submission status: Runtime Error

Solution code:
import sys

S = input()
mon30 = ["02","04","06","09","11"]
mon31 = ["01","03","05","07","08","10","12"]

f_yymm = 0
f_mmyy = 0

if (S[0]+S[1]) in mon30 and  int(S[2]+S[3]) <= 30:
	f_yymm = 1
elif (S[0]+S[1]) in mon31 and  int(S[2]+S[3]) <= 31:
	f_yymm = 1
if (S[2]+S[3]) in mon30 and  int(S[0]+S[1]) <= 30:
	f_mmyy = 1
elif (S[2]+S[3]) in mon31 and  int(S[0]+S[1]) <= 31:
	f_mmyy = 1
if (S[0]+S[1]) == "00" or (S[2]+S[3]) == "00":
	print("NA")
	sys.exit()

if  f_yymm == 1 and f_mmyy == 1:
	print("AMBIGUOUS")
elif f_yymm == 1:
	print("YYMM")
elif f_mmyy == 1:
	print("MMYY")
else:
	print("NA")

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
s = input()
print(s[:k]+s[k].lower()+s[k+1:])

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
s = input()
print(s[:k]+s.[k]lower()+s[k+1:])

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
s = input()
print(s[:k]+lower(s[k])+s[k+1:])

Submission status: Runtime Error

Solution code:
N,M=[int(i) for i in input().split()]
S=input()
print(S[:M-1]+S[M-1].lower()+S[M:]

Submission status: Runtime Error

Solution code:
S = input()

S1 = 10*int(S[0]) + int(S[1])
S2 = 10*int(S[2]) + int(S[3])
SepS = [S1, S2]
MM = [True,True]

for i in range(2):
  if SepS[i] < 1 or SepS[i] > 12:
    MM[i] = False

if MM[0] and MM[1]:
  print("AMBIGUOUS")
elif MM[0]:
  print("MMYY")
elif MM[1]:
  print("YYMM")
else:
  print("NA")

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = input()

dummy = ""

for i in range(N):
  if i == K-1:
    dummy += S[i].lower
  else:
    dummy += S[i]
    
print(dummy)

Submission status: Runtime Error

Solution code:
print(S[:K] + lower(S[K]) + S[K+1:])

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
S = input()
S = list(S)
S[K-1] = S[K-1].lower()
print(''.join(S)

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
S = input()
S = list(S)
S[K] = S[K].lower()
print(S)

Submission status: Runtime Error

Solution code:
N, K = input().split()
N = list(N)
N[int(K)] = N[int(K)].lower()
print(''.join(N))

Submission status: Runtime Error

Solution code:
N, K = input().split()
N = list(N)
N[int(K)] = N[int(K)].lower()
print(str(N))

Submission status: Runtime Error

Solution code:
N, K = input().split()
N = list(N)
N[int(K)] = N[int(K)].lower()
print(N)

Submission status: Runtime Error

Solution code:
N, K = input().split()
N[int(K)] = N[int(K)].lower()
print(N)

Submission status: Runtime Error

Solution code:
N, K = input().split()
N[K] = N[K].lower()
print(N)

Submission status: Runtime Error

Solution code:
​list1=input().split(" ")
num1=int(list1[0])
num2=int(list1[1])
list2=input()
strings=""
for i in range(num1):
	if i==num2:
		strings+=list2[i].lower()    
	else:
		strings+=list2[i]
print(strings)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
s=input()

if s[k-1]==A:
    s[k-1]=a
elif s[k-1]==B:
    s[k-1]=b
else:
    s[k-1]=c
print(s)

Submission status: Runtime Error

Solution code:
num = input()
num1 = int(num[0] + num[1])
num2 = int(num[2] + num[3])

if(num1 < 13) and (num1 > 0):
    if(num2 < 13) and (num2 > 0):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if(num2 < 13) and (num2 > 0):
        print("YYMM")
    else:
        print("NA")

Submission status: Runtime Error

Solution code:
n,k=input().split()
s=input()
k=int(k)-1
s[k]=chr(ord(s[k])+32)
print(s)

Submission status: Runtime Error

Solution code:
input();a=sorted(map(int,input().split()));print("{} {} {}".format(a[0],a[-1],sum(a)))

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = input()
 
S[K+1] = S[K+1].lower()
 
print(S)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = input()

S[N+1] = S[N+1].lower()

print(S)

Submission status: Runtime Error

Solution code:
class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0] * (n)
        self.total = n
    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]
    def same_check(self, x, y):
        return self.find(x) == self.find(y)
    def unite(self, x, y):
        if self.same_check(x, y):
            return
        x = self.find(x)
        y = self.find(y)
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
            self.total -= 1
        else:
            self.par[y] = x
            self.total -= 1
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
n,m = map(int, input().split())
union = UnionFind(n)
for i in range(m):
    x,y,z = map(int, input().split())
    union.unite(x-1, y-1)
print(union.total)

Submission status: Runtime Error

Solution code:
N,K = map(int, input().split())
S = Input()
dir = {'A':'a', 'B':'b', 'C':'c'}

print(S[0:K-1] + dir[S[K-1]]+ S[K::])

Submission status: Runtime Error

Solution code:
N, K = list(map(int, input().split()))
S = input()

S_L = list(S)
S_L[K-1] = S_L[K-1].lower
print("".join(S_L))

Submission status: Runtime Error

Solution code:
n,k = map(int, input().split())
s = list(input())
s[k-1] = s[k-1].tolower()
print(''.join(s)