n,k=map(int,input().split())
s=input()
x=["a","b","c"]
y=[0]*n
for i in range(n):
  y[i]=s[i]
  if s[k-1]=="A":
    y[k-1]="a"
    
  elif s[k-1]=="B":
    y[k-1]="b"
    
  elif s[k-1]=="C":
    y[k-1]="c"
    

print("".join(y)) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s=input() s input() input x=["a","b","c"] x ["a","b","c"] "a" "b" "c" y=[0]*n y [0]*n [0] 0 n for i in range(n):
  y[i]=s[i]
  if s[k-1]=="A":
    y[k-1]="a"
    
  elif s[k-1]=="B":
    y[k-1]="b"
    
  elif s[k-1]=="C":
    y[k-1]="c"
     i range(n) range n y[i]=s[i] y[i] y i s[i] s i if s[k-1]=="A":
    y[k-1]="a"
    
  elif s[k-1]=="B":
    y[k-1]="b"
    
  elif s[k-1]=="C":
    y[k-1]="c"
     s[k-1]=="A" s[k-1] s k-1 k 1 "A" y[k-1]="a" y[k-1] y k-1 k 1 "a" elif s[k-1]=="B":
    y[k-1]="b"
    
   s[k-1]=="B" s[k-1] s k-1 k 1 "B" y[k-1]="b" y[k-1] y k-1 k 1 "b" elif s[k-1]=="C":
    y[k-1]="c"
     s[k-1]=="C" s[k-1] s k-1 k 1 "C" y[k-1]="c" y[k-1] y k-1 k 1 "c" print("".join(y)) print "".join(y) "".join "" join y s=input() input() s k=map(int,input().split()) map(int,input().split()) k x=["a","b","c"] ["a","b","c"] x y=[0]*n [0]*n y n,k=map(int,input().split()) map(int,input().split()) n
n,k=map(int,input().split())
s=input()
x=["a","b","c"]
y=[0]*n
for i in range(n):
  y[i]=s[i]
  if s[k-1]=="A":
    y[k-1]="a"
    
  elif s[k-1]=="B":
    y[k-1]="b"
    
  elif s[k-1]=="C":
    y[k-1]="c"
    

print("".join(y))