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 i in range(n):
  print(S[i],end='') 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"
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" for i in range(n):
  print(S[i],end='') i range(n) range n print(S[i],end='') print S[i] S i end='' end '' S = list(input()) list(input()) S k = map(int,input().split()) map(int,input().split()) k n,k = map(int,input().split()) map(int,input().split()) n
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 i in range(n):
  print(S[i],end='')