n, k = list(map(int, input().split()))

s = list(eval(input()))



s[k-1] = chr(ord(s[k-1])+ord("a")-ord("A"))



print(("".join(s)))
import math





def main():

    # n = int(input())

    n, k = list(map(int, input().split()))

    # h = list(map(int, input().split()))

    s = list(eval(input()))

    # h = [int(input()) for _ in rane(n)]



    s[k-1] = s[k-1].lower()

    print(("".join(s)))





if __name__ == '__main__':

    main()

n, k = list(map(int, input().split()))
s = list(eval(input()))
s[k - 1] = chr(ord(s[k - 1]) + ord("a") - ord("A"))
print(("".join(s)))

import math


def main():
    # n = int(input())
    n, k = list(map(int, input().split()))
    # h = list(map(int, input().split()))
    s = list(eval(input()))
    # h = [int(input()) for _ in rane(n)]
    s[k - 1] = s[k - 1].lower()
    print(("".join(s)))


if __name__ == "__main__":
    main()

-n, k = list(map(int, input().split())) -s = list(eval(input())) -s[k - 1] = chr(ord(s[k - 1]) + ord("a") - ord("A")) -print(("".join(s))) +import math + + +def main(): +    # n = int(input()) +    n, k = list(map(int, input().split())) +    # h = list(map(int, input().split())) +    s = list(eval(input())) +    # h = [int(input()) for _ in rane(n)] +    s[k - 1] = s[k - 1].lower() +    print(("".join(s))) + + +if __name__ == "__main__": +    main()