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