n,k = map(int,input().split())
s = input()

if s[k-1] =='A':
  s2 = 'a'
elif s[k-1] =='B':
  s2 = 'b'
else:
  s2 = 'c'
  
if k == 1:
  print(s2+s[1:n])
elif k == n:
  print(s[:k-1]+s2)
else:
  print(s[:k-1]+s2+s[k:n]) n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s = input() s input() input if s[k-1] =='A':
  s2 = 'a'
elif s[k-1] =='B':
  s2 = 'b'
else:
  s2 = 'c'
   s[k-1] =='A' s[k-1] s k-1 k 1 'A' s2 = 'a' s2 'a' elif s[k-1] =='B':
  s2 = 'b' s[k-1] =='B' s[k-1] s k-1 k 1 'B' s2 = 'b' s2 'b' s2 = 'c' s2 'c' if k == 1:
  print(s2+s[1:n])
elif k == n:
  print(s[:k-1]+s2)
else:
  print(s[:k-1]+s2+s[k:n]) k == 1 k 1 print(s2+s[1:n]) print s2+s[1:n] s2 s[1:n] s 1:n 1 n elif k == n:
  print(s[:k-1]+s2) k == n k n print(s[:k-1]+s2) print s[:k-1]+s2 s[:k-1] s :k-1 k-1 k 1 s2 print(s[:k-1]+s2+s[k:n]) print s[:k-1]+s2+s[k:n] s[:k-1]+s2 s[:k-1] s :k-1 k-1 k 1 s2 s[k:n] s k:n k n s2 = 'a' 'a' s2 s2 = 'b' 'b' s2 s2 = 'c' 'c' s2 n,k = map(int,input().split()) map(int,input().split()) n k = map(int,input().split()) map(int,input().split()) k s = input() input() s
n,k = map(int,input().split())
s = input()

if s[k-1] =='A':
  s2 = 'a'
elif s[k-1] =='B':
  s2 = 'b'
else:
  s2 = 'c'
  
if k == 1:
  print(s2+s[1:n])
elif k == n:
  print(s[:k-1]+s2)
else:
  print(s[:k-1]+s2+s[k:n])