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

        
   
    
    
    
        
        
    
    
    
    
        

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

        
   
    
    
    
        
        
    
    
    
    
        

      
    
    
        
        
    
    
    
    
        
