[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reads f = stdin.ReadLine().Split() |> Array.map f

[<EntryPoint>]
let main argv =
    let [|_;k|] = reads int
    let s = read string
    String.mapi (fun i c -> if i = k - 1 then Char.ToLower(c) else c) s
    |> printfn "%s"
    0