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())
def replace(m):
  if m=="A":
    return "a"
  elif m=="B":
    return "b"
  else:
    return "c"
  
abc_str=list(input())
abc_str[k-1]=replace(abc_str[k-1])
abc_str="".join(abc_str)
print(abc_str)

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()
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()
print(s[:k-1]+s[k-1].lower()+s[k:])

Solution (Python):
n, k = map(int, input().split())
s = list(input())
s[k - 1] = chr(ord(s[k - 1]) + ord('a') - ord('A'))
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 = list(input())

tmp = s.pop(k - 1)
l = tmp.lower()
s.insert(k - 1, l)
print(''.join(s))

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

s = input()

L = []
for i in range(n):
    L.append(s[i])

L[k-1] = str.lower(L[k-1])
ans = str()
for i in range(n):
    ans += L[i]
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=map(int,input().split(' '))
s=input()
m=''
if s[k-1].isupper():
    m=s[k-1].lower()
else:
    m=s[k-1].upper()

print(s[:k-1]+m+s[k:])

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

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

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

Solution (Python):
n, k = map(int,input().split())
s = input()
print(s[:k - 1], end = '')
print(str.swapcase(s[k - 1]), end = '')
print(s[k:])

Solution (Python):
n, k = map(int,input().split())
s = input()
result_s = ''
a = 0

for s in list(s):
    a += 1
    if a==k:
        s = s.lower()
    result_s += s

print(result_s)

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

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

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

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

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

Solution (Python):
s,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()
print(s[:k-1]+s[k-1].swapcase()+s[k:])

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

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

Solution (Python):
n,k = map(int,input().split())
s = list(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'
strA = ''.join(s)
print(strA)

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

for i in range(N):
    if i == K-1:
        T[i] = str.lower(T[i])

print("".join(T))

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 = list(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()


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

Solution (Python):
import math


def main():
    
    n, k = map(int, input().split())
    
    s = list(input())
    

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


if __name__ == '__main__':
    main()

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()
ans = ""
for i in range(len(S)):
    if i == K-1:
        ans +=  S[i].lower()
    else:
        ans += S[i]

print(ans)

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


print(S[:K-1] + rep + S[K:])

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

s = list(input())
t = ''
for j,i in enumerate(s):
    if j == k-1:t += i.lower()
    else:t+=i
print(t)

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()
sl = []
for i in range(n):
    if i+1 == k:
        sl.append(s[i].lower())
    else:
        sl.append(s[i])
print(''.join(sl))

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 = list(input())
s[k-1:k] = ''.join(s[k-1:k]).lower()
print(''.join(s))

Solution (Python):
Omoji = ['A','B','C']
Kmoji = ['a','b','c']
n,k = map(int,input().split())
s = str(input())
ans = ''
for i in range(n):
    if i==(k-1):
        for j in range(len(Omoji)):
            if s[i]==Omoji[j]:
                ans += Kmoji[j]
    else:
        ans += s[i]
print(ans)

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

list = [s for s in S]

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

print(''.join(list))

Solution (Python):
N, K = map(int, input().split())
S = input()
print("".join(c.lower() if i == K else c for i, c in enumerate(S, 1)))

Solution (Python):
N, K = map(int, input().split())
S = input()
print(S[:K-1] + chr(ord(S[K-1]) - ord('A') + ord('a')) +S[K:])

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

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

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

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):
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mat = lambda x, y, v: [[v]*y for _ in range(x)]
ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)]
mod = 1000000007
sys.setrecursionlimit(1000000)

N, K = rl()
S = rs()

ans = ''
for i, c in enumerate(S):
	if i == K-1:
		c = c.lower()
	ans += c
print(ans)

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

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

Solution (Python):
import sys 

num = list(map(int, input().split()))

input= sys.stdin.readline()
def convert(str,number):
  num = number-1
  str_one = str[num].lower()
  return str[0:num]+str_one+str[number:]
print(convert(input,num[1]))

Solution (Python):
import sys 

num = list(map(int, input().split()))

input= sys.stdin.readline()
def convert(str,number):
  num = number-1
  str_one = str[num].lower()
  return str[0:num]+str_one+str[number:]
print(convert(input,num[1]))

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

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"
           
"".join(S)

S_1 = S[0]
for i in range(1,N):
  S_1 = S_1 + S[i]
print(S_1)

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()

ABC = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
abc = 'abcdefghijklmnopqrstuvwxyz'
print(s[:k-1] + abc[ABC.index(s[k-1])] + s[k:])

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

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

Solution (Python):
def str_replace_to_lower() -> str:
    len_str, target_index = map(int, input().split())
    word = input()
    list_of_word = list(word)
    list_of_word[target_index - 1] = list_of_word[target_index - 1].lower()

    return ''.join(list_of_word)


print(str_replace_to_lower())

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()
print(s[:k-1]+s[k-1].lower()+s[k:])

Solution (Python):
N, K = map(int,input().split())
S = input()
ans = []
for i in range(N):
    if i == K - 1:
        x = ord(S[i])
        x += 32
        y = chr(x)
        ans.append(y)
    else:
        ans.append(S[i])

print(''.join(ans))

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

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

s[k-1]=p



ans="".join(s)
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 = list(map(int, input().split()))
s = input()

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

print(ans)

Solution (Python):
N,K=map(int,input().split())
S=list(input())
for i in range(N):
    if i==K-1:
        S[i]=chr(ord(S[i])+32)
print(''.join(S))

Solution (Python):
n,k=list(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 = s[k-1:] + s[:k-1]
ans = s.capitalize().swapcase()
print(ans[n-k+1:] + ans[:n-k+1])

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

Solution (Python):


n, k = map(int, input().split())
S = list(input())
x = S.pop(k-1).lower()
S.insert((k-1),x)
print("".join(S))

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):
_, 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())
s[k-1]=str.lower(s[k-1])
print(''.join(s))

Solution (Python):
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):
    if i == k-1:
        print(s[i].lower(),end = '')
    else:
        print(s[i] ,end ='')

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()

print("".join(S))

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

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

Solution (Python):
def main():
    n, k = map(int, 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()
for i in s :
  print(i,end='')
print()

Solution (Python):
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    n, k = Input()
    s = input()
    print("".join(ch.lower() if index==k else ch for index, ch in enumerate(s, 1)))


main()

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'
        else:
            ans += 'c'
    else:
        ans += S[i]
print(ans)

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

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

Solution (Python):
n, k = map(int, input().split())
list01 = list(input())
list01[k - 1] = str.lower(list01[k - 1])
a = ''.join(list01)
print(a)

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

Solution (Python):
a,b=input().split()
a=int(a)
b=int(b)
c=input()
h,i,j=c[:(b-1)],c[b-1],c[(b):]
if i=="A":
  i="a"
if i=="B":
  i="b"
if i=="C":
  i="c"
print(h+i+j)

Solution (Python):
n,k=map(int,input().split())
s=list(input())
s[k-1]=str.lower(s[k-1])
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] + chr(ord(s[k - 1]) + 32) + s[k:])

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

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

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 = map(int,input().split())
S = input()

capital = ['A','B','C']
small = ['a','b','c']

i = capital.index(S[K-1])
ans = S[:K-1]+small[i]+S[K:]
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):
num = input().split()

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

S = input()

S2 = S[K-1]

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

print(S)

Solution (Python):
N, K = map(int, input().split())
S = input()
ans = ""
for i in range(N):
  if i == K-1:
    ans += chr(ord(S[i])+32)
  else:
    ans += S[i]
print(ans)

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

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

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
n, k = list(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=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 = str(input())
A = ''
for i in range(N):
    if i + 1 == K:
        A += S[i].lower()
    else:
        A += S[i]
print(A)

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

Solution (Python):
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()
print(s[:k-1] + s[k-1].lower() + s[k:])

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

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

print("".join(S))

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

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

print("".join(S))

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

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 ())
a = input ()
if a[K-1] == 'A':
  print (a[:K-1]+'a'+a[K:])
elif a[K-1] == 'B':
  print (a[:K-1]+'b'+a[K:])
else:
  print (a[:K-1]+'c'+a[K:])

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(str(input()))

s[k-1]=chr(ord(s[k-1])+32)
ans=("").join(s)
print(ans)

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

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

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):
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


def solve():
    n, k = inl()
    s = list(ins())
    s[k - 1] = s[k - 1].lower()
    return "".join(s)


print(solve())

Solution (Python):
a, b = map(int, input().split())
t = input()
print(t[:b-1] + t[b-1].lower() + t[b:])

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

S=list(input())

eng=["a","b","c"]
ENG=["A","B","C"]

x=ENG.index(S[K-1])
S[K-1]=eng[x]

s=""
for i in range(len(S)):
    s+=S[i]
print(s)

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

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

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

Solution (Python):
a,b = input().split(" ")
c = list(map(str,input().split()))
print(c[0][:int(b)-1] + c[0][int(b)-1].lower() + c[0][int(b):])

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

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

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

Solution (Python):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n,k=mp()
s=list(input())
s[k-1]=str.lower(s[k-1])
print(*s,sep="")

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

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=list(map(int,input().split()))
s=list(input())
s[k-1]=chr(ord(s[k-1])+32)
print("".join(s))

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

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))
else:
    s[k-1] = "c"
    print("".join(s))

Solution (Python):
a, b = map(int, input().split())
s = list(input())
s[b-1] = s[b-1].lower()

t = ""
for i in range(a):
  t += s[i]
  
print(t)

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

print(ans)

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, K = LI()
    S = list(SS())

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

    print(''.join(S))

if __name__ == '__main__':
    resolve()

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

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

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

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

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

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

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

c=b[K-1]
b[K-1]=c.lower()
print(''.join(map(str,b)))

Solution (Python):
n,k = map(int, input().split())
s = list(input())
r = s[k-1].lower()
del s[k-1]
s.insert(k-1, r)
S = ''.join(s)
print(S)

Solution (Python):
import sys

input = sys.stdin.readline


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

    ans = "".join([S[:K - 1], S[K - 1].lower(), S[K:]])

    print(ans)


if __name__ == "__main__":
    main()

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].swapcase()
print("".join(s))

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

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

Solution (Python):

def main():
    n, k = map(int, input().split())
    s = input()
    result = ''
    for i in range(0, len(s)):
        if i == k-1:
            result += s[i].lower()
        else:
            result += s[i]
    print(result)


if __name__ == "__main__":
    main()

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

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

print(ans)

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

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

print("".join(s))

Solution (Python):
n,k  = list(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 = str(input())
answer = ''

for i in range(n):
    string = s[i]
    if i == k - 1:
        string = string.lower()

    answer += string

print(answer)

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()

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

print(S)

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

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

Solution (Python):
N, K = list(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()
ans = S[:K-1] + S[K-1].lower() + S[K:]

print(ans)

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

Solution (Python):
x = [list(map(str, input().split())) for i in range(2)]
a = int(x[0][0])
b = int(x[0][1])
s = x[1][0]
l = []
for i in range(a):
  l += s[i]
l[b-1] = l[b-1].lower()
my_result = l[0]
for i in range(1,a):
  my_result += l[i]
print(str(my_result))

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 = S[:K - 1] + S[K - 1].lower() + S[K:]
print(S)

Solution (Python):




n, k = map(int, input().strip().split())
word = input()
res = ''

for i in range(n):
    s = word[i]
    if i == k - 1:
        s = s.lower()
    res += s

print(res)

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

Solution (Python):
import sys

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


n, k = nm()
k -= 1
S = list(input())
S[k] = S[k].lower()
print(''.join(S))

Solution (Python):
N, K = map(int, input().split())
S = input()
tmp = S[K-1]
tmp = chr(ord(tmp)+32)

print(S[:K-1] + tmp + S[K:])

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

A = S[K-1]
S[K-1] = A.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 = list(input())

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

print(''.join(S))

Solution (Python):
_,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,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()
print("".join(s))

Solution (Python):
a,b=map(int, input().split())
s=str(input())
b=b-1
slist=list(s)
if slist[b]=="A":
  slist[b]="a"
if slist[b]=="B":
  slist[b]="b"
if slist[b]=="C":
  slist[b]="c"
s="".join(slist)
print(s)

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

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

Solution (Python):
N,K=list(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())
for i in range(n):
    temp = str(s[i])
    if i == k - 1:
        s[i] = temp.lower()  
S = ''.join(s)         
print(S)

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):
n,k = map(int,input().split())
s = str(input())
print(s[:k-1]+s[k-1].lower()+s[k:])

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

s = s[ :k -1] + chr(ord(s[k - 1]) - ord("A") + ord("a")) + s[k:]
print(s)

Solution (Python):
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

n,k=I()
s=X()
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, K = map(int, input().split(' '))
S = list(input())
S[K-1] = S[K-1].lower()
for i in S:
    print(i, end='', sep='')

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

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 = str(input())
ans = ''
for i in range(N):
    if i == K-1:
        temp = S[i].lower()
        ans += temp
    else:
        ans += S[i]

print(ans)

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

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

print(res)

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

Solution (Python):



N, K = map(int, input().strip().split())
s = input()
res = ''
for i in range(N):
    if i == K - 1:
        res += s[i].lower()
    else:
        res += s[i]
print(res)

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"


S="".join(S)
print(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()

k = k-1

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

Solution (Python):





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

d = ["A", "B", "C"]
e = ["a", "b", "c"]

for i in range(N):
  if i == K - 1:
    inde = d.index(S[i])    
    print(e[inde], end = "")
  else:
    print(S[i], end = "")

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

Solution (Python):
small = ['a', 'b', 'c']
capital = ['A', 'B', 'C']
 
tmp = input().split(" ")
N = int(tmp[0])
K = int(tmp[1])
str = list(input())
 
str[K - 1] = small[capital.index(str[K - 1])]
 
print("".join(str))

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 = list(input())

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

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