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

Solution (Python):
n,k = map(int,input().split())
s = input()
l = list(s)
ans = ""
for i,x in enumerate(l):
  if i == k-1:
    x = x.lower()
  ans += x
print(ans)

Solution (Python):
N,K=map(int,input().split())
S=input()
s=str()
for i in range(N):
	if not i==K-1:
		s+=S[i]
	else:
		if S[K-1]=='A': s+='a'
		if S[K-1]=='B': s+='b'
		if S[K-1]=='C': s+='c'
print(s)

Solution (Python):
i = list(map(int, input().split()))
n = i[0]
k = i[1]
str = input()
hoge = ""

for m in range(n):
  if m == k-1:
    hoge = hoge + str[m].lower()
  else:
    hoge = hoge + str[m]
  
print(hoge)

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

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

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

Solution (Python):
N, K =  map(int, input().split())
S = input()
moji = S[K-1:K].lower()
new = S[0:K-1] + moji + S[K:N]

print(new)

Solution (Python):

N,K = map(int,input().split())
S = input()
s = list(S)


s[K-1] = s[K-1].swapcase()
S = "".join(s)
print(S)

Solution (Python):

N, K = input().split()

S = list(input())


K = int(K)

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

print("".join(S))

Solution (Python):
n, k = map(int, input().split())
s1 = input()
s2 = ""

for i in range(n):
	if (i == k - 1):
		s2 += s1[i].lower()
	else:
		s2 += s1[i]

print(s2)

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

n = s[b-1]
s_komoji = s.lower()
s=s[0:b-1] + s_komoji[b-1] + s[b:a]
print(s)

Solution (Python):
N,K = map(int,input().split())
s=list(input())
l=len(s)
S = ''

s[K-1] = s[K-1].lower()
for num in range(l):
    S = S + s[num]

print(S)

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

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

if S[K-1] == 'A':
    tmp = 'a'
elif S[K-1] == 'B':
    tmp = 'b'
else:
    tmp = 'c'
if K == 1:
    ans = tmp + S[K:]
elif K < N:
    ans = S[:K-1] + tmp + S[K:] 
elif K == N:
    ans = S[:K-1] + tmp
print(ans)

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

S = list(input())

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

S[K-1] = a

for i in range(N):
    print (S[i], end='')
print ()

Solution (Python):
a,b = map(int,input().split(" "))
c = list(input())

c[b-1] = c[b-1].lower()

print("".join(c))

Solution (Python):
if __name__ == "__main__":
    
    N, K = map(int, input().split())
    s = input()

    
    s_list = list(s)

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

    ans_str = ""
    for a in s_list:
        ans_str += a
    print(ans_str)

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

Solution (Python):
ls = input().split()
s = list(input())
 
n = int(ls[0])
k = int(ls[1]) - 1
 
if s[k] == 'A':
  s[k] = 'a'
elif s[k] == 'B':
  s[k] = 'b'
elif s[k] == 'C':
  s[k] = 'c'
  
print(''.join(s))

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

sk = s[K - 1]

for i in range(N):
    if i != K - 1:
        print(s[i], end="")
    else:
        print(sk.lower(), end="")

print("")

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

s[k-1]=s[k-1].lower()

x=''.join(s)
print(x)

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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
input_int = lambda:int(input())
input_ints = lambda:map(int,input().split())
input_ints_list = lambda:list(input_ints())
input_str = lambda:input()
input_strs = lambda:input().split()
input_lines = lambda n,input_func:[input_func() for _ in range(n)]

import importlib
import_module = lambda module_name:importlib.import_module(module_name)

init_array_1dim = lambda value,n:[value]*n 
init_array_2dim = lambda value,n,m:[init_array_1dim(value,n) for _ in range(m)] 

gcd_base = lambda value1,value2:import_module('fractions').gcd(value1,value2) 
gcd = lambda lst:import_module('functools').reduce(gcd_base,lst) 
lcm_base = lambda value1,value2:(value1*value2)//gcd_base(value1,value2) 
lcm = lambda lst:import_module('functools').reduce(lcm_base,lst,1) 

permutations = lambda lst,n:import_module('itertools').permutations(lst,n) 
combinations = lambda lst,n:import_module('itertools').combinations(lst,n) 
product = lambda lst1,lst2:import_module('itertools').product(lst1,lst2) 

round = lambda value:round(value) 
ceil = lambda value:import_module('math').ceil(value) 
floor = lambda value:import_module('math').floor(value) 


init_q = lambda lst: import_module('collections').deque(lst)
q_pop = lambda q: q.popleft() 
q_push = lambda q,value:q.appendleft(value) 
q_pushlist = lambda q,lst:q.extendleft(lst) 
q_append = lambda q,value:q.append(value) 
q_appendlist = lambda q,lst:q.extend(lst) 


init_heap = lambda a:import_module('heapq').heapify(a)
heap_push = lambda a,v:import_module('heapq').heappush(a,v)
heap_pop = lambda a:import_module('heapq').heappop(a) 

def solution():
    
    N,K = input_ints()
    S = input_str()
    S = list(S)
    S[K-1] = S[K-1].lower()
    print(str.join("", S))
        
if __name__ == '__main__':
    solution()

Solution (Python):
length, k = map(int, input().split())
abc = str(input())

result = ""
for n in range(length):
    c = abc[n]
    result += c if n + 1 != k else c.lower()
print(result)

Solution (Python):
N, K = list(map(int, input().split()))
S = input() 
if(N==K):
 print(S[:K-1]+S[K-1].lower())
elif(K-1 == 0):
 print(S[0].lower()+S[1:])
else:
 print(S[:K-1]+S[K-1].lower()+S[K:])

Solution (Python):
a = list(map(int,input().split()))
s = input()
n = a[0]
k = a[1]

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

Solution (Python):
N,K=input().split()
S=list(input())
for i in range(len(S)):
    if i==int(K)-1:
        S[i]=S[i].lower()
print(''.join(S))

Solution (Python):
import sys

N,K = input().split()
S = input()

N = int(N)
K = int(K)

S_new = S[:K-1] + S[K-1].lower() + S[K:]

print("{}".format(S_new))

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

ans = ""
cou = 0

for i in S:
    if cou + 1 == K:
      if S[cou] == "A":
        i = "a"
      elif S[cou] == "B":
        i = "b"
      else:
        i = "c"
    ans += i
    cou += 1
print(ans)

Solution (Python):

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

for i in range(n):
  if k-1!=i:
    print(s[i], end="")
  else:
    print(s[i].lower(), end="")

Solution (Python):
N, K = map(int, input().split())
S = input()
K = K - 1

new_s = list()
for i in range(len(S)):
    if i == K:
        new_s.append(S[i].lower())
    else:
        new_s.append(S[i])

print(''.join(new_s))

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

Solution (Python):
N,K=map(int,input().split())
S=input()
S2=S.swapcase()
S3=[]

for i in range(N):
    if i == K-1:
      S3.append(S2[i])
    else:
      S3.append(S[i])

print (''.join(S3))

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

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

print(S)

Solution (Python):
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(n, k, S):
    return S[:k-1]+S[k-1].lower()+S[k:]


do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    n, k = list(map(int, input().split()))
    S = input().split()
    print(sol(n, k, S[0]))

Solution (Python):
a,b=map(int, input().split())
c=list(input())
henka = c.pop(b-1)
if henka=="A":
    c.insert(b-1,"a")
elif henka=="B":
    c.insert(b-1,"b")
else:
    c.insert(b-1,"c")
print(''.join(c))

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

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

ls = []

for n in range(N):
	ls.append(S[n])

result = ""

for n in range(N):
	if n != K-1:
		result += ls[n]
	else:
		if S[K-1] == "A":
			result += "a"
		if S[K-1] == "B":
			result += "b"
		if S[K-1] == "C":
			result += "c"

print(result)

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

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

print(S[:K-1]+S[K-1].lower()+S[K:])

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

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

Solution (Python):
Input = input().split()

S = input()

N = Input[0]
K = int(Input[1])

str = list(S)

str[K - 1] = str[K - 1].swapcase()

str_change = "".join(str)

print(str_change)

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

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

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

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

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

print(ans)

Solution (Python):


from sys import stdin

N, K = list(map(int, stdin.readline().split()))
S = stdin.readline()

newS = S[:K-1] + S[K-1:K].lower() + S[K:]

print(newS)

Solution (Python):



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

if __name__ == '__main__':
    main()

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

Solution (Python):

import sys

input_line = input().split(" ")
a = int(input_line[1])
b = int(input_line[0])
str = input()

dtr = str[a-1:a].translate(str.maketrans('ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'))

ans = str[:a-1] + dtr + str[a:]
print(ans)

Solution (Python):
N, K = map(int, input().split())
str = input()
str_list = list(str)
str_list[K-1] = chr(ord(str_list[K-1])+32)
str="".join(str_list)
print(str)

Solution (Python):


import math
import re

def main(params):
    n,k = params[0].split()
    s = list(params[1])
    k = int(k)
    s[k-1] = s[k-1].lower()
    print ''.join(s)

if __name__ == "__main__":
    cnt = 2 
    params = []
    for i in range(cnt):
        param = raw_input()
        params.append(param)
    main(params)

Solution (Python):


import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N, K = i2nn()
    S = list(i2s())
    S[K-1] = S[K-1].lower()
    print(''.join(S))

main()

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

Solution (Python):



v1 = list(map(int, input().split()))
v2 = input()
n, k = v1[0], v1[1]
s = v2
result = ''

for i in range(n):
	if not(i == k-1):
		result += s[i]
	else :
		result += s[i].lower()

print(result)

Solution (Python):
N, K = [int(i) for i in input().split()]
S = input()

print(S[:K-1] + S[K - 1].lower() + S[K:])

Solution (Python):
def main():
    NK = list(map(int, input().split()))
    S = input()
    N, K = NK[0], NK[1]
    ans = ""
    for i in range(0, N):
        if i == K-1:
            ans += S[i].lower()
        else:
            ans += S[i]
    print(ans)
main()

Solution (Python):
a, b = map(int, input().split())
c = list(input())
c[b - 1] = c[b - 1].lower()
d = ''.join(c)
print(d)

Solution (Python):
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)

Solution (Python):
k=input().split()
string=input()

n=int(k[0])
target=int(k[1])
for i in range(n):
  if i == target - 1:
    print(string[i].lower(),end="")
  else:
    print(string[i],end="")

Solution (Python):
n, k = map(int, input().split())
s = list(input())
moji = ''

c = s[k-1]
s[k-1] = c.lower()
for x in s:
    moji += x
print(moji)

Solution (Python):
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"
elif S[K-1]=="C":
  S[K-1]="c"
  
  
moji="".join(S)
print(moji)

Solution (Python):
a,b=map(int,input().split())
moji=input()

if moji[b-1]=="A":
  print(moji[:b-1]+"a"+moji[b:])
elif moji[b-1]=="B":
  print(moji[:b-1]+"b"+moji[b:])
else:
  print(moji[:b-1]+"c"+moji[b:])

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

if str_abc[k-1] == 'A':
  d = 'a'
elif str_abc[k-1] == 'B':
  d = 'b'
elif str_abc[k-1] == 'C':
  d = 'c'

str_abc = str_abc[:k-1] + d + str_abc[k:]
print(str_abc)

Solution (Python):
N,K=[int(x) for  x in input().split()]
S=input()

out=''
for n in range(N):
    if n+1 == K:
        if S[n]=='A':
            out=out+'a'
        elif S[n]=='B':
            out+='b'
        elif S[n]=='C':
            out+='c'
    else:
        out+=S[n]
print(out)

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

s[k-1] = s[k-1].lower()

print(''.join(c for c in s))

Solution (Python):
N, K = map(int, input().split())
S = [i for i in input()]

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

print(''.join(S))

Solution (Python):
a='abcdefghijklmnopqrstuvwxyz'
b='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
d={}
for i in range(26):
    d[b[i]]=a[i]
n,k=map(int,input().split())
S=list(input().strip())
t=S[k-1]
S[k-1]=d[t]
print(*S,sep='')

Solution (Python):
a,b = map(int,input().split())
mozi = input()
lista = []
for a in mozi:
    lista.append(a)

lista[b-1] = lista[b-1].lower()
print("".join(lista))

Solution (Python):
argN,argK = list(map(int,input().split()))
argS = input()

if argK == 1:
  ans = argS[0].lower() + argS[1:argN]
elif argK == argN:
  ans = argS[:argK-1] + argS[argK-1].lower()
else:
  ans = argS[:argK-1] + argS[argK-1].lower() + argS[argK:argN]

print(ans)

Solution (Python):
n,k=input().split()
n=int(k)-1
s=input()

print(s[0:n]+s[n].lower()+s[n+1:])

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

if k == 1:
    print(s[k-1].lower()+s[k:])
elif k == n:
    print(s[:k-1]+s[k-1].lower())
else :
    print(s[:k-1]+s[k-1].lower()+s[k:])

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

Solution (Python):
n ,k = input().split()
ki = int(k) - 1
str_array = input()

for i,v in enumerate(str_array):
    if ( i == ki):
        if (v == "A"):
            print("a",end="")
        elif ( v == "B"):
            print("b",end="")
        else :
            print("c",end="")
    else :
        print(v,end="")
print()

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

Solution (Python):
n,k=map(int,input().split())
s=list(input())
small=str.swapcase(s[k-1])
s.pop(k-1)
s.insert(k-1,small)
print("".join(s))

Solution (Python):
n,k = [int(x) for x in input().split()]

S = str(input())
a = S[k-1].lower()
A = S[:k-1]
A += a
A = A + S[k:]
print(A)

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

s=input()

for i in range(n):
    if (i+1) == k:
        print(s[i].lower(), end="")
    else:
        print(s[i], end="")

Solution (Python):
import sys
args = sys.stdin.readlines()
n, k = map(int, args[0].split(' '))
s = []
for i, x in enumerate(args[1]):
  if i == k - 1:
    s.append(x.lower())
  else:
    s.append(x)
print(''.join(s))

Solution (Python):
import sys
input = sys.stdin.readline

a, b = (int(i) for i in input().split())
s = input()


if b==1:
  s = s[b-1].lower() + s[b:]
elif b==a:
  s = s[:b-1]+s[b-1].lower()
else:
  s=s[:b-1]+s[b-1].lower()+ s[b:]

print(s)

Solution (Python):
import sys
import math
sys.setrecursionlimit(10**6)
from collections import defaultdict

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

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

Solution (Python):
N, K = map(int, input().split())
s = input()
for i in range(N) :
  S = s[i]
  if(i == K - 1) :
    print(S.lower(), end = "")
  else :
    print(S, end = "")

Solution (Python):
import sys

N, K = input().split()
S = input()

new_word = []

for i in range(int(N)):
    if i+1 == int(K):
        new_word.append(S[i].lower())
    else:
        new_word.append(S[i])

A = ''.join(new_word)
print(A)

Solution (Python):
N, K = [int(s) for s in input().split()]
letters = list(input())

if letters[K-1] == 'A':
  letters[K-1] = 'a'
elif letters[K-1] == 'B':
  letters[K-1] = 'b'
elif letters[K-1] == 'C':
  letters[K-1] = 'c'

print(''.join(letters))

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

print(ans)

Solution (Python):
Input = input().split()
N = int(Input[0])
K = int(Input[1])
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'

S = "".join(S)

print(S)

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

i = 0
for c in s:
    if i != k-1:
        print(c,end="")
    else:
        if c == "A":
            print("a",end="")
        elif c == "B":
            print("b",end="")
        elif c == "C":
            print("c",end="")
    i += 1

Solution (Python):

def main():
    N, K = map(int, [int(x) for x in input().split()])
    S = input()

    ans = ""
    for i, n in enumerate(S):
        if i == K-1:
            n = n.lower()
        ans += n
    print(ans)
    return ans


if __name__ == "__main__":
    main()

Solution (Python):

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

ans = ''
for i in range(n):
    if i == k-1:
        ans += s[i].lower()
    else:
        ans += s[i]
    

print(ans)

Solution (Python):
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 tmp in s:
    ans += tmp
print(ans)

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

Solution (Python):
N, K = [int(i) for i in input().split()]
S = input()
if S[K-1] == 'A':
    x = 'a'
elif S[K-1] == 'B':
    x = 'b'
elif S[K-1] == 'C':
    x = 'c'
S = S[:K-1] + x + S[K:]
print(S)

Solution (Python):
import sys
import numpy as np

def main():
  input = sys.stdin.readline
  N, K = map(int, input().split())
  INF = N * K
  dp = input().strip()
  text =""
  for i in range(N):
    if i == K-1:
      text = text + dp[i].lower()
    else:
      text = text + dp[i]
  print(text)
  
main()

Solution (Python):




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


if __name__ == '__main__':
    main()

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

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

S1 = S[:K-1]
S2 = S[K-1]
S3 = S[K:]

Ans = S1+ str.lower(S2) + S3
print(Ans)

Solution (Python):
[n, k] = [int(i) for i in input().split()]
s = input()

if (s[k - 1] == 'A'):
    s0 = s[:k - 1] + 'a' + s[k:]
elif (s[k - 1] == 'B'):
    s0 = s[:k - 1] + 'b' + s[k:]
elif (s[k - 1] == 'C'):
    s0 = s[:k - 1] + 'c' + s[k:]

print(s0)

Solution (Python):
n, k = list(map(int, input().split()))
s = list(str(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("".join([str(i) for i in s]))

Solution (Python):
N,K=[int(h) for h in input().split()]

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

Solution (Python):
n,k=input().split()
s=[]
s=list(input())
k=int(k)

s[k-1]=s[k-1].lower()

ans="".join(s)
print(ans)

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

Solution (Python):


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

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

print(s)

Solution (Python):


n, k = map(int, raw_input().split())


str = list(raw_input())

str[k-1] = str[k-1].lower()

newstr = "".join(str)
print(newstr)

Solution (Python):
n, k = [int(i) for i in input().split()]
s = list(input())

s[k-1] = s[k-1].lower()

print(''.join(s))

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

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

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

s_list = list(s)
s_list[k-1] = s_list[k-1].lower()
s_changed = "".join(s_list)
print (s_changed)

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

S = list(input())

newS=' '
for i in range(N):
    if i == K-1:
        if S[i]=="A":
            newS+="a"
        elif S[i]=="B":
            newS+="b"
        elif S[i]=="C":
            newS+="c"
        else:
            newS+=S[i]
    else:
        newS+=S[i]
print(newS)

Solution (Python):
n,k=list(map(int,input().split()))
s=input().rstrip()
s=[ i for i in  s]
if s[k-1].isupper():
    s[k-1]=s[k-1].lower()
print(''.join(s))

Solution (Python):





def main(n, k, s):
    l = list(s)
    
    l[k - 1] = l[k - 1].lower()
    print(''.join(l))
        
if __name__ == '__main__':
    try:
        n, k = list(map(int, input().strip().split(' ')))
        s = input().strip()
        main(n, k, s)
    except EOFError:
        pass

Solution (Python):



import sys


def main():
    N, K = [int(ele) for ele in input().split()]
    N = N - 1
    K = K - 1
    S = list(input())
    S[K] = S[K].lower()
    print("".join(S))


if __name__ == "__main__":
    main()

Solution (Python):
n, k = map(int, input().split())
s = input()
a = s[0:k-1]
b = s[k-1]
c = s[k:n]
new = a + b.lower() + c

print(new)

Solution (Python):
N,K = map(int,input().split())
S = list(input())
ans = ""
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"
for n in S:
    ans += n
print(ans)

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

S[K-1] = S[K-1].lower()
print(''.join(S))

Solution (Python):
N,K=(int(x) for x in input().split())
K-=1
S=input()
output=""
for i in range(0,N):
    
    if (i==K):
        if (S[K]=="A"):
            output+="a"
        elif(S[K]=="B"):
            output+="b"
        elif(S[K]=="C"):
            output+="c"
    else:
        output+=S[i]
print(output)

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

Solution (Python):


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

ans = str()
for i in range(n):
    if i == k - 1:
        ans += s[i].lower()
    else:
        ans += s[i]

print(ans)

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

Solution (Python):

import sys
def p(*a):
  s=" ".join(map(str,a))
  
  sys.stderr.write(s+"\n")


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


a=""
b=S[K-1].lower()
c=S[K:]
if K-1>=0: a=S[:K-1]
print(a + b + c)

Solution (Python):
a,b = map(int,input().split())
charca=list(input())
indee = b-1
charca[indee] = charca[indee].lower()
a= ''.join(charca)
print(a)

Solution (Python):
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"
elif S[k-1]=="C":
  S[k-1]="c"
print("".join(S))

Solution (Python):
def main():
    N, K = map(int, input().split())
    S = input()

    if S[K-1] == 'A':
        char = 'a'
    elif S[K-1] == 'B':
        char = 'b'
    elif S[K-1] == 'C':
        char = 'c'

    print(S[:K-1] + char + S[K:N])


if __name__ == '__main__':
    main()

Solution (Python):


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

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

S = ''.join(S)
print(S)

Solution (Python):
nk = list(map(int,input().split()))
s = [ s for s in input()]
s[nk[1]-1] = s[nk[1]-1].lower()
print(''.join(s))

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

li = []

for i in range(N):
    if i != K-1:
        li.append(S[i])
    else:
        if S[i] =="A":
            li.append("a")
        if S[i] =="B":
            li.append("b")
        if S[i] == "C":
            li.append("c")
print(''.join(li))

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

Solution (Python):
N,K = map(int, input().split())
S = list(input())
s = S.pop(K-1)
s = s.lower()
S.insert(K-1, s)
ans = ""
for x in S:
    ans += x
print(ans)

Solution (Python):
X = input().split()
N = int(X[0])
K = int(X[1]) - 1
S = list(str(input()))

if S[K]=="A":
    S[K] = "a"
elif S[K]=="B":
    S[K] = "b"
elif S[K]=="C":
    S[K] = "c"
for i in S:
  print(i, end ="")

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

Solution (Python):
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"
elif s[k-1]=="C":
    s[k-1]="c"
    
print(''.join(s))

Solution (Python):
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'
print(''.join(S))

Solution (Python):
n,i=input().split(" ")

_str=list(input())

_str[int(i)-1]=_str[int(i)-1].lower()
_str="".join(_str)
print(_str)

Solution (Python):
N,K = list(map(int,input().split()))
S = input()
input_str = ''

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

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

if S[K-1] == "A":
    S[K-1] = "a"
    print("".join(S))
elif S[K-1] == "B":
    S[K-1] = "b"
    print("".join(S))
elif S[K-1] == "C":
    S[K-1] = "c"
    print("".join(S))

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

Solution (Python):

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

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

s[k-1] = s[k-1].lower()
result = ''.join(s)

print(result)

Solution (Python):
N,K=map(int, input().split())
S=list(input())
Ans=""

if S[K-1]=="A":
  S[K-1]="a"
elif S[K-1]=="B":  
    S[K-1]="b"
elif S[K-1]=="C":  
    S[K-1]="c"

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

print(Ans)

Solution (Python):







lis=list(map(int,input().split()))
S=input()

if S[lis[1]-1]=="A":
    ans=S[:lis[1]-1]+"a"+S[lis[1]:]
elif S[lis[1]-1]=="B":
    ans=S[:lis[1]-1]+"b"+S[lis[1]:]
elif S[lis[1]-1]=="C":
    ans=S[:lis[1]-1]+"c"+S[lis[1]:]

print(ans)

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

for i in range(len(s)):
    if i==k-1:
        if s[k-1]=='A':
            print('a',end='')
        elif s[k-1]=='B':
            print('b',end='')
        elif s[k-1]=='C':
            print('c',end='')
    else:
        print(s[i],end='')

print()

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

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

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

string = input()
list_string = list(string)

list_string[k-1] = string[k-1].lower()
print("".join(list_string))

Solution (Python):
n, m = input().split()
N = int(n)
K = int(m)

S = input()

string = list(S)

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

print(''.join(string))

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

if k == 1:
    ans = s[k-1].lower()+s[1:]
else:
    ans = s[:k-1]+s[k-1].lower()+s[k:]
print(ans)

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

Solution (Python):
N, K = map(int, input().split())
S = input()
T = []
for i, s in enumerate(S):
    if i == K - 1:
        T.append(s.lower())
    else:
        T.append(s)

print(''.join(T))

Solution (Python):


n, k = map(int, input().split())

s = input()
news = ""
for i in range(0, n):

    if i == k-1:
        news += s[i].lower()
    else:
        news += s[i]
print(news)

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

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

s = ''.join(S)

print(s)

Solution (Python):
def solve():
    n, k = map(int, input().split())
    s = input()
    k = k - 1
    n = n - 1

    res = ""
    if k-1 >= 1:
        res += s[0:k]
    res += s[k].lower()

    if k+1 <= n:
        res += s[k+1:]
    print(res)

solve()

Solution (Python):
N, K = input("").split(" ")

N = int(N)
K = int(K)

S = input("")

S = S[0:(K-1 if K-1 >= 0 else 0)] + S[K-1].lower() + S[K:]

print(S)

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

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

print("".join(S_list))

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

Solution (Python):
n,k = [int(x) for x in input().split(" ")]
s = input()
ans = ""
for i,string in enumerate(s):
    if i == k-1:
        ans += string.lower()
    else:
        ans += string

print(ans)

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

target = s[k-1]
rep = 'a'
if target == 'A':
    rep = 'a'
elif target == 'B':
    rep = 'b'
else:
    rep = 'c'

res = s[:k-1] + rep + s[k:]
print(res)

Solution (Python):
def main():
    n, k = [int(x) for x in input().split()]
    s = input()
    print(s[:k-1] + s[k-1].lower() + s[k:])

if __name__ == '__main__':
    main()

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

s[k-1]=s[k-1].lower()
result=''
for i in range(len(s)):
    result+=s[i]
print(result)

Solution (Python):
a,b=map(int, input().split())
s = list(input())
if s[b-1]=="A":
        s[b-1]="a"
elif s[b-1]=="B":
        s[b-1]="b"
else:
        s[b-1]="c"
l =""
for i in s:
        l += i
print(l)