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)) import re re import sys sys import math math import itertools itertools import bisect bisect from copy import copy from collections import deque,Counter from decimal import Decimal import functools functools def v(): return input() v def k(): return int(input()) k def S(): return input().split() S def I(): return map(int,input().split()) I def X(): return list(input()) X def L(): return list(input().split()) L def l(): return list(map(int,input().split())) l def lcm(a,b): return a*b//math.gcd(a,b) lcm a a b b sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 cnt = 0 cnt 0 ans = 0 ans 0 inf = float("inf") inf float("inf") float "inf" n,k=I() n I() I k s=X() s X() X if s[k-1]=="A":
    s[k-1]="a"
elif s[k-1]=="B":
    s[k-1]="b"
else:
    s[k-1]="c" s[k-1]=="A" s[k-1] s k-1 k 1 "A" s[k-1]="a" s[k-1] s k-1 k 1 "a" elif s[k-1]=="B":
    s[k-1]="b" s[k-1]=="B" s[k-1] s k-1 k 1 "B" s[k-1]="b" s[k-1] s k-1 k 1 "b" s[k-1]="c" s[k-1] s k-1 k 1 "c" print("".join(s)) print "".join(s) "".join "" join s def I(): return map(int,input().split()) def I(): return map(int,input().split()) I def v(): return input() def v(): return input() v def lcm(a,b): return a*b//math.gcd(a,b) def lcm(a,b): return a*b//math.gcd(a,b) lcm def S(): return input().split() def S(): return input().split() S cnt = 0 0 cnt def L(): return list(input().split()) def L(): return list(input().split()) L n,k=I() I() n def l(): return list(map(int,input().split())) def l(): return list(map(int,input().split())) l s=X() X() s ans = 0 0 ans mod = 10**9+7 10**9+7 mod inf = float("inf") float("inf") inf def X(): return list(input()) def X(): return list(input()) X k=I() I() k def k(): return int(input()) def k(): return int(input()) k
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))
