n,k = map(int,input().split())
s = input()
ans=[]
t = s[k-1].lower()
for i in range(0,k-1):
  ans += s[i]
ans+= t
for i in range(k,n):
  ans+=s[i]
print(''.join(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 [] t = s[k-1].lower() t s[k-1].lower() [k-1].lower [k-1] s k-1 k 1 lower for i in range(0,k-1):
  ans += s[i] i range(0,k-1) range 0 k-1 k 1 ans += s[i] ans s[i] s i ans+= t ans t for i in range(k,n):
  ans+=s[i] i range(k,n) range k n ans+=s[i] ans s[i] s i print(''.join(ans)) print ''.join(ans) ''.join '' join ans n,k = map(int,input().split()) map(int,input().split()) n k = map(int,input().split()) map(int,input().split()) k ans+=s[i] s[i] ans t = s[k-1].lower() s[k-1].lower() t ans=[] [] ans ans+= t t ans s = input() input() s ans += s[i] s[i] ans
n,k = map(int,input().split())
s = input()
ans=[]
t = s[k-1].lower()
for i in range(0,k-1):
  ans += s[i]
ans+= t
for i in range(k,n):
  ans+=s[i]
print(''.join(ans))