program changing_a_character
  implicit none
  integer :: n, k, i
  character(50) :: s
  read(*,*) n, k
  read(*,*) s
  s = trim(adjustl(s))
  s(k:k) = achar(ichar(s(k:k))+32)
  write(*,'(a)') trim(s)
  stop
end program changing_a_character