program main
implicit none
integer :: n, k, i
character :: s*50,t*50

do i = 1, 50
t(i:i) = '1'
end do

read(*,*) n, k
read(*,*) s(1:n)
do i = 1, n
   if( i/= k ) then
   t(i:i) = s(i:i)
   else
   t(i:i) = char( ichar(s(i:i))+32 )
   end if
end do
write(*,*) t(1:n)

end program main
