      program test
      implicit none
      character(:),allocatable :: s
      integer :: n,k,small,big
      
      read*,n,k
      allocate( character(n)::s )
      read*,s
      
      small = ichar('a')
      big = ichar('A')
      
      s(k:k) = char( ichar(s(k:k)) -big+small )
      
      print*,s
      
      
      
      end program
      