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

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

print("")

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

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

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

Solution (Python):
b, c = map(int, input().split())
s = input()
c =c-1
if(c != 0 and c != b-1):
    print(s[0:c] + s[c].lower() + s[c+1:])
elif(c==0):
    print(s[0].lower() + s[1:])
else:
    print(s[0:c] + s[c].lower())

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

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

s1 = S[0:K-1]
c = S[K-1]
s2 = S[K:]

if c == "A":
    c = "a"
elif c == "B":
    c = "b"
else:
    c = "c"

ans = s1 + c + s2
print(ans)

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

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

print("".join(S))

Solution (Python):
import sys
import collections
from collections import Counter
from collections import deque
from collections import defaultdict
import itertools
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from itertools import takewhile
from itertools import compress
import functools
from functools import reduce
import math


from math import ceil
from math import floor



from math import factorial
import re
from functools import lru_cache













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

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

print("".join(S))

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

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

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

ans = ""

for i in range(n):
    if i+1 == k:
        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 = input()
t = ''
for i in range(n):
    if i == k - 1:
        t += chr(ord(s[i]) - ord('A') + ord('a'))
    else:
        t += s[i]
print(t)

Solution (Python):

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

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

if T[K-1] == 'A':
    T[K-1] = 'a'
elif T[K-1] == 'B':
    T[K-1] = 'b'
else:
    T[K-1] = 'c'
U = ''.join(T)
print(U)

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

t =  ''
for i in range(n):
    if i == k - 1:
        if s[i] == 'A':
            t = t + 'a'
        elif s[i] == 'B':
            t = t + 'b'
        else:
            t = t + 'c'
    else:
        t = t + s[i]

print(t)

Solution (Python):
n,k=map(int,input().split())
s=list(input())
l=[chr(i) for i in range(97, 97+26)]
L=[chr(i) for i in range(65, 65+26)]
s[k-1]=l[L.index(s[k-1])]
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()

ans = ""

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

print(ans)

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

a = s[:k-1]
c = s[k-1]
b = s[k:]

if c == 'A':
    print(a + 'a' + b)
elif c == 'B':
    print(a + 'b' + b)
else:
    print(a + 'c' + b)

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

if s[k-1] == "A":
    sub = "a"
elif s[k-1] == "B":
    sub = "b"
else:
    sub = "c"

print(s[0:k-1] + sub + 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):
v = [int(d) for d in input().split()]
inpu = list(input())

inpu[v[1]-1] = inpu[v[1]-1].lower()
print(''.join(inpu))

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

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

n,k = readmi()
t = read()
ans = ""
for i in range(n):
    if i + 1 == k:
        ans += t[i].lower()
    else:
        ans += t[i]
print(ans)

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

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

print(ans)

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

Solution (Python):
import sys


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

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

print(ans)

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

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

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

Solution (Python):

import numpy as np
from functools import lru_cache
import time

def main(): 
    if True:
        N,K = list(map(int, input().split()))
        A = np.asarray(list(str(input())))
    else:
        pass
    A[K-1] = A[K-1].lower()

    print("".join(A))
if __name__ =='__main__':
    main()

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()
for i, j in enumerate(list(s)):
  if i==k-1:
    print(j.lower(), end="")
  else:
    print(j, end="")

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

Solution (Python):

def input_from_console():
    n, k = map(int, input().split())
    s = input()
    return n, k, s


def main():
    n, k, s = input_from_console()
    rep = s[k - 1].lower()
    print(s[:k - 1] + rep + s[k:])


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).replace('/', ''))

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 = input().split()
s = input().strip()

n = int(n)
k = int(k)

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

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

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

solve(s, n, k)

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

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

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

    S = ''.join(S) 

    print(S)

if __name__=='__main__':
    main()

Solution (Python):


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

target = s[k-1]
result = s[:k-1] + target.lower() + s[k:]
print(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 = list(map(int,input().split()))
S = input()
if S[K-1] == "A":
    s = "a"
elif S[K-1] == "B":
    s = "b"
else:
    s = "c"
print(S[:K-1]+s+S[K:])

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

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

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

changed = S[K-1].swapcase()
out = S[:K-1] + changed + S[K:]
print(out)

Solution (Python):
ll=lambda : list(map(int,input().split()))

[n,k]=ll()
s=input()
k-=1
s=list(s)
s[k]=s[k].swapcase()
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()

K=K-1

S0 = S[0:K]
S1 = S[K:K+1]
S2 = S[K+1:N]

Sout = S0 + S1.lower() + S2

print(Sout)

Solution (Python):
def solve():
    N, K = map(int, input().split())
    S = list(input())
    
    S[K-1] = chr(ord(S[K-1])+32)    
    
    print (''.join(S))
    
if __name__ == "__main__":  
    solve()

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

new_s = ""
for i, elem in enumerate(s):
    if i == k - 1:
        new_s += elem.lower()
    else:
        new_s += elem
print(new_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()
oo = ['A','B','C']
syo = ['a','b','c']
for i in range(n):
    if k-1 == i:
        for j in range(3):
            if s[i] == oo[j]:print(syo[j],end = '')
    else:
        print(s[i],end = '')
print()

Solution (Python):
order = input().split(' ')[1]

words = input()

ans_word = []
for i in range(len(words)):
  if i+1 == int(order):
    ans_word.append(words[i].lower())
  else:
    ans_word.append(words[i])
    
print(''.join(ans_word))

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()
a = s[0:K-1]
b = s[K:N]
print(a+s[K-1:K].lower()+b)

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

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

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"
S_ = ""
for x in S:
    S_+=x
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(str(input()))
S[K-1] = S[K-1].lower()
ans = ""
for i in range(N):
    ans += S[i]
print(ans)

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

Solution (Python):
from sys import stdin
N,K=[int(x) for x in stdin.readline().rstrip().split()]
S=(stdin.readline().rstrip())
ans=""
for ind,s in enumerate(S):
    if ind+1 == K:
        ans += s.lower()
    else:
        ans += s
print(ans)

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

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

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

word = S[:]

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

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

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

print(''.join(S))

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

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

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

Solution (Python):
n,k = (int(num) for num in input().split())
S = input()
c = S[k-1]
if c == 'A':
    c = 'a'
if c == 'B':
    c = 'b'
if c == 'C':
    c = 'c'
    
left = ''
right = ''
    
if k > 0:
    left = S[:k-1]
if k < n:
    right = S[k:]
print(left + c + right)

Solution (Python):
n, k = map(int, input().split())
s = input()
ans = ''
for i, c in enumerate(s):
    if i == k - 1:
        ans += c.lower()
    else:
        ans += c
print(ans)

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

sl = list(S)

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

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

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

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

s_new = s
if s_new[k -1] == 'A':
    s_new[k -1] = 'a'
elif s_new[k -1] == 'B':
    s_new[k -1] = 'b'
elif s_new[k -1] == 'C':
    s_new[k -1] = 'c'
print(''.join(s_new))

Solution (Python):


def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  N, K = readInts()
  S = input()
  s = list(S)
  s[K-1] = s[K-1].lower()
  print("".join(s))

if __name__ == "__main__":
  main()

Solution (Python):
if __name__ == '__main__':
    import sys
    input = sys.stdin.readline

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

Solution (Python):

import sys


def solve(N: int, K: int, S: str):
    sl = list(S)

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

    print(''.join(sl))
    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):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

n,k = getList()
s = input()
a = s[k-1].lower()
s = s[:k-1] + a + s[k:]
print(s)

Solution (Python):




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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
def sub():
    N, K = [int(e) for e in input().split(" ")]
    S = input()
    ss = [s for s in S]
    ss[K-1] = ss[K-1].lower()
    print("".join(ss))

sub()

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

input = sys.stdin.readline
n, k = map(int, input().split())
s = input()
new = ''
for i in range(n):
    if i + 1 == k:
        new += s[i].lower()
    else:
        new += s[i]
print(new)

Solution (Python):
N,K=[int(a) for a in input().split()]
S=input()
print(S[:K-1]+{"A":"a","B":"b","C":"c"}[S[K-1]]+S[K:])

Solution (Python):
inp = lambda cast=int: list(map(cast, input().split()))
printf = lambda s='', *args, **kwargs: print(str(s).format(*args), flush=True, **kwargs)

n, k = inp()
s, = inp(str)
r = s[:k-1] + s[k-1].lower() + s[k:]
print(r)

Solution (Python):


















import math
import copy
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations
from bisect import bisect_left, bisect_right


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]

def i_inpl(): return int(input())
def s_inpl(): return map(int,input().split())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")



N, K = s_inpl()
S = input()

ans = ""

for i, s in enumerate(S):
    if i+1 == K:
        s = s.lower()
    ans = ans + s

print(ans)

Solution (Python):
N,K = map(int,input().split())
S = list(input())
for i in range(N):
    if i+1 == K:
        S[i] = S[i].lower()
    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 = input()
tmp = s[k-1].lower()
s_ =  list(s)
s_[k-1] = tmp
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()
res = ''
for i in range(n):
    if i!=k-1:
        res += s[i]
    else:
        if s[k - 1] == 'A':
            res += 'a'
        elif s[k - 1] == 'B':
            res += 'b'
        else:
            res += 'c'

print(res)

Solution (Python):
n,k=map(int,input().split())
s=[i for i in input()]
s[k-1]=chr(ord(s[k-1])+32)
for i in range(n):
    print(s[i],end="")

Solution (Python):

import sys


def solve(N: int, K: int, S: str):
    k = K-1
    print(S[0:k],end="")
    print(S[k].lower(),end="")
    print(S[k+1:])
    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())
S = input()
p = S[k-1]
if p == 'A':
  print(S[:k-1]+'a'+S[k:])
elif p == 'B':
  print(S[:k-1]+'b'+S[k:])
else:
  print(S[:k-1]+'c'+S[k:])

Solution (Python):



N, K = map(int, input().rstrip().split(' '))
X = [x for x in input()]
X[K-1] = X[K-1].lower()
print(''.join(X))

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools, random
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right; sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; ansli = []; tmpli = []; candili = []
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]
def mi(n): return [wi() for _ in range(n)]
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]

n, k = wi()
s = s()

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

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

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

d=S[K-1].lower()
SS=[]
for i in range(N):
    if i!=K-1:
        SS.append(S[i])
    else:
        SS.append(d)
SSS=''.join(SS)
print(SSS)

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

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'

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

Solution (Python):

"""
AtCoder C
"""
 



 


 
def main():
    A, B = list(map(int,input().split()))
    S =str(input())
    out=""
    i=1
    for s in S:
        if i==B:
            if s=="A":
                out+="a"
            elif s=="B":
                out+="b"
            elif s=="C":
                out+="c"
        else:
            out+=s
        i+=1
    print(out)
    
if __name__ == "__main__":
    main()

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

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"

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

Solution (Python):
from sys import stdin
import math
import fractions
from collections import deque

INF = 10 ** 10

N, K = [int(x) for x in stdin.readline().rstrip().split()]
S = stdin.readline().rstrip()

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

print(ans)

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

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

print(T)

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(*S, sep="")

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

Solution (Python):
n,k = map(int,input().split())
s = input()
if s[k-1:k] == "A":
    s = s[:k-1] + "a" + s[k:]
elif s[k-1:k] == "B":
    s = s[:k-1] + "b" + s[k:]
else:
    s = s[:k-1] + "c" + s[k:]
print(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()
ans=""
for i in range(n):
  x=s[i]
  if i==k-1:
    x=x.lower()
  ans+=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 = map(int, input().split())
s = list(input())
s[k-1] = s[k-1].lower()
print("".join(s))

Solution (Python):
import sys
range = xrange
input = raw_input

n,k = [int(x) for x 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())
    
K -= 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=list(map(int,input().split(" ")))
a=list(input())
a[K-1]=a[K-1].lower()
print("".join(a))

Solution (Python):

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)


def main():
    n,k = LI()
    k -= 1
    s = S()

    return s[:k] + chr(ord(s[k]) - ord('A') + ord('a')) + s[k+1:]


print(main())

Solution (Python):
import math

x,y = map(int,input().split())
s = input()
sss = ""
for i,ss in enumerate(s):
    if i==y-1:
        sss += ss.lower()
    else:
        sss += ss

print(sss)

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

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

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

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

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

ans = ""
for i in range(len(S)):
    _S = S[i]
    if i == K-1:
        if _S == "A":
            _S = "a"
        elif _S == "B":
            _S = "b"
        elif _S == "C":
            _S = "c"
    ans += _S
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"
    
S=''.join(S)
print(S)

Solution (Python):
import sys
input = sys.stdin.readline
n,k = input().split()
n = int(n)
k = int(k)
s = 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):
_, pos = [int(a) for a in input().split()]

s = input()

ss = list(s)

ss[pos-1] = ss[pos-1].lower()

print(''.join(ss))

Solution (Python):

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

ans = ""
for i,c in enumerate(s):
    if i==k-1:
        ans+=c.lower()
    else:
        ans+=c
print(ans)

Solution (Python):

from itertools import combinations
from itertools import product
import bisect
import math

N, K = [int(_) for _ in input().split()]
S = input()

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

print(s)

Solution (Python):

def main():
    buf = input()
    buflist = list(buf.split())
    N = int(buflist[0])
    K = int(buflist[1])
    buf = input()
    S = list(buf)
    S[K-1] = S[K-1].lower()
    print(''.join(S))


if __name__ == '__main__':
    main()