local mce, mfl, msq, mmi, mma = math.ceil, math.floor, math.sqrt, math.min, math.max
local n, k = io.read("*n", "*n", "*l")
local s = io.read()
for i = 1, n do
  if(i ~= k) then io.write(s:sub(i, i))
  else
    io.write(string.char(s:byte(i, i) + 32))
  end
end
io.write("\n")
