import sys

input = sys.stdin.readline


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

    ans = "".join([S[:K - 1], S[K - 1].lower(), S[K:]])

    print(ans)


if __name__ == "__main__":
    main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def main():
    N, K = map(int, input().split())
    S = input().rstrip()

    ans = "".join([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().rstrip() S input().rstrip() ().rstrip () input rstrip ans = "".join([S[:K - 1], S[K - 1].lower(), S[K:]]) ans "".join([S[:K - 1], S[K - 1].lower(), S[K:]]) "".join "" join [S[:K - 1], S[K - 1].lower(), S[K:]] 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().rstrip()

    ans = "".join([S[:K - 1], S[K - 1].lower(), S[K:]])

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

    ans = "".join([S[:K - 1], S[K - 1].lower(), S[K:]])

    print(ans) main input = sys.stdin.readline sys.stdin.readline input
import sys

input = sys.stdin.readline


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

    ans = "".join([S[:K - 1], S[K - 1].lower(), S[K:]])

    print(ans)


if __name__ == "__main__":
    main()
