let () =
    let main () =
        let n, k = Scanf.sscanf (read_line ()) "%d %d" (fun n k -> n, k) in
        let s = read_line () in
        s.[k - 1] <- Char.lowercase s.[k - 1];
        print_endline s
    in
    main ()