program main
  implicit none
  integer i, N, K
  character(50) S
  read(*, *) N, K
  read(*, *) S
  if (S(K:K) == 'A') then
    S(K:K) = 'a'
  end if
  if (S(K:K) == 'B') then
    S(K:K) = 'b'
  end if
  if (S(K:K) == 'C') then
    S(K:K) = 'c'
  end if

  write(*,'(A)') S
end program main
