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

import sys










def main():
    n, k = [int(x) for x in sys.stdin.readline().split()]
    s = list(sys.stdin.readline().rstrip())
    s[k-1] = s[k-1].lower()
    print(''.join(s))
    


if __name__ == "__main__":
    main()

Solution (Python):
N,K = map(int,input().split())
S = input()
s = []
for i in range(N):
    x = S[i]
    if i == K-1:
        if x == 'A':
            x = 'a'
        elif x == 'B':
            x = 'b'
        else:
            x = 'c'
    s.append(x)
ans = s[0]
for i in range(1,N):
    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'
print("".join(s))

Solution (Python):
n,k=map(int,input().split())
S=input()
s_dict={
  'A':'a',
  'B':'b',
  'C':'c',
}
ans=''

for i,s in enumerate(S):
  if i!=(k-1):
    ans+=s
  else:
    ans+=s_dict[s]
print(ans)

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

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

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

print(''.join(A))

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

tmp = [si.lower() if i+1==k else si for i,si in enumerate(s)]
ret = "".join(tmp)

print(ret)

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

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()
k=int(k)
s = input()
a=s[:k-1]
b=s[k:]
ans = a+s[k-1].lower()+b
print(ans)

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

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())
ls_s = [i for i in input()]
S = ""

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

for j in ls_s:
    S += j

print(S)

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

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

sl = []
for i in range(len(s)):
  if i == k-1:
    if s[i] == 'A':
      sl.append('a')
    elif s[i] == 'B':
      sl.append('b')
    else:
      sl.append('c')
  else:
    sl.append(s[i])

print (''.join(sl))

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

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

for i in range(a):
  print(s[i], end="")

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

Solution (Python):



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

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

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 = [int(s) for s 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] = S[K-1].lower()
print("".join(S))

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())
s[k-1] = s[k-1].lower()
print(*s, sep='')

Solution (Python):


MOD = 10 ** 9 + 7

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

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

print(''.join(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,s = map(int,input().split())
k = input()

t = k[s-1]

t = t.lower()

a = k[:s-1]+ t + k[s:]



print(a)

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

for i in range(n):
  if i == k-1:
    s[i] = s[i].lower()
    break
    
print("".join(s))

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

Solution (Python):
N, K = map(int, input().split())
S = input()
if K == 1:
    S = S[K-1].swapcase() + S[K:]
else:
    S = S[0:K-1] + S[K-1].swapcase() + S[K:]
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 = [int(x) for x in input().split()]
S = input()

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

ans = ''
for i in s:
    ans += i

print(ans)

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()
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())
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 = (int(_) for _ in input().split())
s = input()

k -= 1
ans = ''
for i, x in enumerate(s):
	ans += (x.lower() if i == k else x)
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 = list(map(int, input().split()))
s = list(input())
s[k - 1] = s[k-1].lower()
print(''.join(s))

Solution (Python):
n, k = (int(x) for x in 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):

import sys


def solve(N: int, K: int, S: str):
    s = S[K - 1].lower()
    S = list(S)
    S[K - 1] = s
    S = "".join(S)
    print(S)
    return


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

    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    S = next(tokens)  
    solve(N, K, S)


if __name__ == "__main__":
    main()

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

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

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

print("".join(o))

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

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

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

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


if S[K-1] == 'A':
    S = S[:K-1] + 'a' + S[K:]
    print(S)
elif S[K-1] == 'B':
    S = S[:K-1] + 'b' + S[K:]
    print(S)
elif S[K-1] == 'C':
    S = S[:K-1] + 'c' + 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):
def main():
    n,k = [int(x) for x in 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 = list(input())
s[k-1] = s[k-1].lower()
print(''.join(s))

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

Solution (Python):


def main():
    N,K =  map(int, input().split())
    S = input()
    K = K-1 
    lower = S[K].lower()
    if K == 0:
        result = lower + S[K+1:]
    else:
        result = S[:K] + lower + S[K+1:]
    print(result)


if __name__ == "__main__":
    main()

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

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

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())
list1 = list(input())
k = k-1
if list1[k] == "A":
    list1[k] = "a"
elif list1[k] == "B":
    list1[k] = "b"
elif list1[k] == "C":
    list1[k] = "c"

print("".join(list1))

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':
  s = s[:k-1] + "a" + s[k:]
elif s[k-1]=='B':
  s=s[:k-1] + "b" + s[k:]
else:
  s=s[:k-1] + "c" + s[k:]
print(s)

Solution (Python):
N, k = map(int, input().split())
S = input()
ans = []
for i, s in enumerate(S):
  if i + 1 == k:
    ans.append(s.lower())
  else:
    ans.append(s)
print("".join(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 = [int(x) for x in 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=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="".join(S)
print(ans)

Solution (Python):
n,k=map(int,input().split())
s=input()
t=list(s)
t[k-1]=t[k-1].lower()
s=''.join(t)
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 = [int(x) for x in input().split()]
S = input()
conv = {'A': 'a', 'B': 'b', 'C': 'c'}
for i, s in enumerate(S):
    if (i != K-1):
        print(s, end="")
    else:
        print(conv[s], end="")
print()

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

if __name__ == '__main__':
    solve()

Solution (Python):
n,k=map(int,input().split())
s=input()
d=[]
m=""
for i in range(n):
  d.append(s[i])
d[k-1]=s[k-1].swapcase()
for j in range(n):
  m+=d[j]
print(m)

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

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

for s in S:
    X.append(s)

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

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

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

print(a)

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

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

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=map(int,input().split())
S=list(input())
S[K-1]=S[K-1].lower()
print(''.join(S))

Solution (Python):
from sys import stdin

n, k = [int(x) for x in stdin.readline().rstrip().split()]
s = stdin.readline().rstrip()

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

print(''.join(ss))

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

Solution (Python):
N, K = map(int, input().split())
S = str(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 = list(map(int,input().strip().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 = 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())
S = input()

S_list = []
for i in range(N):
    S_list.append(S[i])

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

print(''.join(S_list))

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,K = map(int,readline().split())
S = read().rstrip().decode('utf-8')

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

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

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

print(''.join(s))

Solution (Python):
INPUT = [input().split() for l in range(2)]
N = INPUT[0][0]
K = int(INPUT[0][1])
S = INPUT[1][0]

str_list = list(S)

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

str_changed="".join(str_list)

print(str_changed)

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

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 = [val for val in s]

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

print("".join(s))

Solution (Python):
N, K = list(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"
    
print(*S, sep='')

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n, k = list(map(int, input().rstrip('\n').split()))
    s = list(str(input().rstrip('\n')))
    for i in range(len(s)):
        if k - 1 == i:
            s[i] = s[i].lower()
    print("".join(s))


if __name__ == '__main__':
    slove()

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

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

a,b = [int(x) for x in stdin.readline().rstrip().split()]

s = stdin.readline().rstrip()
r = s.lower()
string = ""
for i in range(a):
    if i == b-1:
        string += r[i]
    else:
        string += s[i]

print(string)

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

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

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


print(s[:k-1]+mm+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())
K -= 1



S[K] = chr(ord(S[K]) + 32)
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):
n, k = map(int, input().split())
s = input()

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

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

if __name__ == '__main__':
    solve()

Solution (Python):
N,K=map(int,input().split())
S=list(str(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(map(str, 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(*s, sep='')

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

Solution (Python):
def perform(N, Q, A):
    Q = Q - 1
    return A[:Q] + A[Q].lower() + A[Q + 1:]

N, Q = map(int, input().strip().split())
A = input().strip()


print(perform(N, Q, A))

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

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

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

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

Solution (Python):
N,K=map(int,input().split())
S=input()
print(S[:K-1]+S[K-1:K].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 = (int(x) for x in input().split())
s = list(input())

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

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

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

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):
x = input().split()

y = input()
y2 = y[int(x[1])-1]

if int(x[1]) == 1:
  word1 = y2.lower()
  word2 = y[1:]
  print(word1+word2)
elif int(x[1]) == int(x[0]):
  word1 = y2.lower()
  word2 = y[:(int(x[1])-1)]
  print(word2+word1)
else:
  word1 = y2.lower()
  word2 = y[:(int(x[1])-1)]
  word3 = y[(int(x[1])):]
  print(word2+word1+word3)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n, k = list(map(int, input().rstrip('\n').split()))
    s = str(input().rstrip('\n'))
    a = []
    for i in range(n):
        if i == k - 1:
            a.append(s[i].lower())
        else:
            a.append(s[i])
    print("".join(a))


if __name__ == '__main__':
    slove()

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

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

Solution (Python):
n, k = map(int, input().split())
s = input()
k -= 1
print(s[0:k] + s[k].lower() + s[k+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 = 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"
answer = ''.join(s)
print(answer)

Solution (Python):



def main():
    n, k = map(int,  input().split())
    s = input()
    k = k - 1
    replaced = s[k]
    if replaced.isupper():
        replaced = replaced.lower()
    else:
        replaced = replaced.upper()

    result = s[:k] + replaced + s[k+1:]
    print(result)


if __name__ == '__main__':
    main()

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

print(ret)

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(i) for i in input().split()]
S =  input()
print("".join([e if i!=(K-1) else e.lower()  for i,e in enumerate(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[0:K-1] + S[K-1].lower() + S[K:N])

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(x) for x in input().split()]
S = list(input())


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


answer = ''.join(S)

print(answer)

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=[int(s) for s in 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([str(n) for n in S]))

Solution (Python):


n, k = map(int, raw_input().split())
s = list(raw_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()
ans = ''.join(S)
print(ans)

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

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

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

S = input()

Sl = []

for i in range(len(S)):
  if i == K-1:
    Sl.append(S[i].lower())
  else:
    Sl.append(S[i]) 

print("".join(Sl))

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

print(''.join(s))

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

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

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

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

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

if s[k-1] == 'A':
  mid = 'a'

if s[k-1] == 'B':
  mid = 'b'

if s[k-1] == 'C':
  mid = 'c'

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

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

Solution (Python):
a,b=map(int,input().split())
c=input()
for i in range(len(c)):
  if b!=i+1:
  	print(c[i],end="")
  else:
    if c[i]=="A":
      print("a",end="")
    elif c[i]=="B":
      print("b",end="")
    else:
      print("c",end="")
print("")

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

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'

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

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

s_replace = []
for i in range(0, n , 1):
  if i == k - 1:
    s_replace.append(s[i].lower())
  else:
    s_replace.append(s[i])
    
print(''.join(s_replace))

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

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

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

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

Solution (Python):
def to_lower(x):
  if x == "A":
    return "a"
  elif x == "B":
    return "b"
  else:
    return "c"

n, k = map(int, input().split())
line = input()
s = [i for i in line]
s[k-1] = to_lower(s[k-1])
print("".join(s))

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

Solution (Python):
N, K = map(int, input().split())
S = input()
T = ''
for i, ch in enumerate(S):
    if i == K-1:
        ch2 = ch.lower()
        T += ch2
    else:
        T += ch
print(T)

Solution (Python):

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

s = s[:k] + chr(ord(s[k]) + 32) + s[k+1:]
print(s)

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

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=str(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 = input()
print("".join([s if i != K else s.lower() for i,s in enumerate(list(S), 1)]))

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

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

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=sys.stdin.readline
def resolve():
    n,k=map(int,input().split())
    s=input()
    print(s[:k-1]+s[k-1].lower()+s[k:])

resolve()

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

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

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

print(ans)

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):
M,N = [int(x) for x in input().split()]
s = input()

res =[]
for i,c in enumerate(s):
    if i+1==N:
        res.append(c.lower())
    else:
        res.append(c)
print("".join(res))

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

Solution (Python):
def main(): 

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

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

    print(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()
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().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 = str(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())
s[k-1] =s[k-1].lower()
ans=''
for i in s:
  ans +=i
print(ans)

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

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

Solution (Python):
n,k = map(int,input().split())
string = list(input())
if string[k-1]=="A":
    string[k-1]="a"
elif string[k-1]=="B":
    string[k-1]="b"
else:
    string[k-1]="c"

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

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

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