def main():
    N, K = map(int, input().split())
    S = input()

    ans = S[:K - 1] + S[K - 1].lower() + S[K:]

    print(ans)


if __name__ == "__main__":
    main() def main():
    N, K = map(int, input().split())
    S = input()

    ans = S[:K - 1] + S[K - 1].lower() + S[K:]

    print(ans) main N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K S = input() S input() input ans = S[:K - 1] + S[K - 1].lower() + S[K:] ans S[:K - 1] + S[K - 1].lower() + S[K:] S[:K - 1] + S[K - 1].lower() S[:K - 1] S :K - 1 K - 1 K 1 S[K - 1].lower() [K - 1].lower [K - 1] S K - 1 K 1 lower S[K:] S K: K print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    N, K = map(int, input().split())
    S = input()

    ans = S[:K - 1] + S[K - 1].lower() + S[K:]

    print(ans) def main():
    N, K = map(int, input().split())
    S = input()

    ans = S[:K - 1] + S[K - 1].lower() + S[K:]

    print(ans) main
def main():
    N, K = map(int, input().split())
    S = input()

    ans = S[:K - 1] + S[K - 1].lower() + S[K:]

    print(ans)


if __name__ == "__main__":
    main()
