PROGRAM ATCODER

implicit none
integer :: n,k
character(len=50) :: s

read*, n,k,s

if ( s(k:k) == 'A' ) then
  s(k:k) = 'a'
else if ( s(k:k) == 'B' ) then
  s(k:k) = 'b'
else
  s(k:k) = 'c'
end if

print'(a)', s(1:n)

END PROGRAM ATCODER