program Changing_a_Character
    implicit none
    integer(4):: n, k
    character(:),allocatable:: s

    read*, n,k
    allocate(character(n):: s)
    read*, s

    s(k:k) = char(ichar(s(k:k)) - (ichar('A') - ichar('a')))
    print*, s(:)
end program Changing_a_Character