from sys import stdin
def S(): return stdin.readline().rstrip()
def LI(): return list(map(int,stdin.readline().rstrip().split()))

tmp = LI()
n,k = [tmp.pop(0) for _ in range(2)]
s = list(S())
k -= 1
l = {'A':'a', 'B':'b', 'C':'c'}

s[k] = l[s[k]]

ans = ''

for i in range(n):
    ans += s[i]

print(ans) from sys import stdin def S(): return stdin.readline().rstrip() S def LI(): return list(map(int,stdin.readline().rstrip().split())) LI tmp = LI() tmp LI() LI tmp.pop(0) for _ in range(2) for _ in range(2) _ range(2) range 2 for _ in range(2) tmp.pop(0) tmp.pop tmp pop 0 n,k = [tmp.pop(0) for _ in range(2)] n [tmp.pop(0) for _ in range(2)] k s = list(S()) s list(S()) list S() S k -= 1 k 1 l = {'A':'a', 'B':'b', 'C':'c'} l {'A':'a', 'B':'b', 'C':'c'} 'A' 'A' 'a' 'B' 'B' 'b' 'C' 'C' 'c' s[k] = l[s[k]] s[k] s k l[s[k]] l s[k] s k ans = '' ans '' for i in range(n):
    ans += s[i] i range(n) range n ans += s[i] ans s[i] s i print(ans) print ans tmp = LI() LI() tmp l = {'A':'a', 'B':'b', 'C':'c'} {'A':'a', 'B':'b', 'C':'c'} l ans += s[i] s[i] ans def LI(): return list(map(int,stdin.readline().rstrip().split())) def LI(): return list(map(int,stdin.readline().rstrip().split())) LI s = list(S()) list(S()) s def S(): return stdin.readline().rstrip() def S(): return stdin.readline().rstrip() S n,k = [tmp.pop(0) for _ in range(2)] [tmp.pop(0) for _ in range(2)] n k = [tmp.pop(0) for _ in range(2)] [tmp.pop(0) for _ in range(2)] k ans = '' '' ans k -= 1 1 k
from sys import stdin
def S(): return stdin.readline().rstrip()
def LI(): return list(map(int,stdin.readline().rstrip().split()))

tmp = LI()
n,k = [tmp.pop(0) for _ in range(2)]
s = list(S())
k -= 1
l = {'A':'a', 'B':'b', 'C':'c'}

s[k] = l[s[k]]

ans = ''

for i in range(n):
    ans += s[i]

print(ans)