N,K=map(int,input().split())
S=input()
ans=""
for x in range(N):
  if x!=K-1:
    ans+=S[x]
  else:
    if S[x]=="A":
      ans+="a"
    elif S[x]=="B":
      ans+="b"
    elif S[x]=="C":
      ans+="c"
print(ans) N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K S=input() S input() input ans="" ans "" for x in range(N):
  if x!=K-1:
    ans+=S[x]
  else:
    if S[x]=="A":
      ans+="a"
    elif S[x]=="B":
      ans+="b"
    elif S[x]=="C":
      ans+="c" x range(N) range N if x!=K-1:
    ans+=S[x]
  else:
    if S[x]=="A":
      ans+="a"
    elif S[x]=="B":
      ans+="b"
    elif S[x]=="C":
      ans+="c" x!=K-1 x K-1 K 1 ans+=S[x] ans S[x] S x if S[x]=="A":
      ans+="a"
    elif S[x]=="B":
      ans+="b"
    elif S[x]=="C":
      ans+="c" S[x]=="A" S[x] S x "A" ans+="a" ans "a" elif S[x]=="B":
      ans+="b"
     S[x]=="B" S[x] S x "B" ans+="b" ans "b" elif S[x]=="C":
      ans+="c" S[x]=="C" S[x] S x "C" ans+="c" ans "c" print(ans) print ans S=input() input() S ans+=S[x] S[x] ans ans+="b" "b" ans ans="" "" ans ans+="c" "c" ans K=map(int,input().split()) map(int,input().split()) K ans+="a" "a" ans N,K=map(int,input().split()) map(int,input().split()) N
N,K=map(int,input().split())
S=input()
ans=""
for x in range(N):
  if x!=K-1:
    ans+=S[x]
  else:
    if S[x]=="A":
      ans+="a"
    elif S[x]=="B":
      ans+="b"
    elif S[x]=="C":
      ans+="c"
print(ans)