from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n, k = map(int, input().split())
    s = list(input()[:-1].decode())
    s[k - 1] = s[k - 1].lower()
    print(*s, sep='')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main() from sys import stdin, setrecursionlimit def main():
    input = stdin.buffer.readline
    n, k = map(int, input().split())
    s = list(input()[:-1].decode())
    s[k - 1] = s[k - 1].lower()
    print(*s, sep='') main input = stdin.buffer.readline input stdin.buffer.readline stdin.buffer stdin buffer readline n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = list(input()[:-1].decode()) s list(input()[:-1].decode()) list input()[:-1].decode() [:-1].decode [:-1] () input :-1 -1 decode s[k - 1] = s[k - 1].lower() s[k - 1] s k - 1 k 1 s[k - 1].lower() [k - 1].lower [k - 1] s k - 1 k 1 lower print(*s, sep='') print *s s sep='' sep '' if __name__ == "__main__":
    setrecursionlimit(10000)
    main() __name__ == "__main__" __name__ "__main__" setrecursionlimit(10000) setrecursionlimit 10000 main() main def main():
    input = stdin.buffer.readline
    n, k = map(int, input().split())
    s = list(input()[:-1].decode())
    s[k - 1] = s[k - 1].lower()
    print(*s, sep='') def main():
    input = stdin.buffer.readline
    n, k = map(int, input().split())
    s = list(input()[:-1].decode())
    s[k - 1] = s[k - 1].lower()
    print(*s, sep='') main
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n, k = map(int, input().split())
    s = list(input()[:-1].decode())
    s[k - 1] = s[k - 1].lower()
    print(*s, sep='')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()
