# -*- coding: utf-8 -*-

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

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


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

    print(S[:K - 1] + S[K - 1].lower() + S[K:]) main _, K = map(int, input().split(' ')) _ map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' K S = input() S input() input print(S[:K - 1] + S[K - 1].lower() + S[K:]) print 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 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    _, K = map(int, input().split(' '))
    S = input()

    print(S[:K - 1] + S[K - 1].lower() + S[K:]) def main():
    _, K = map(int, input().split(' '))
    S = input()

    print(S[:K - 1] + S[K - 1].lower() + S[K:]) main
# -*- coding: utf-8 -*-

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

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


if __name__ == '__main__':
    main()
