def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    s[k - 1] = s[k - 1].lower()
    w = ''
    for i in s:
        w = w + i
    print(w)
main() def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    s[k - 1] = s[k - 1].lower()
    w = ''
    for i in s:
        w = w + i
    print(w) main n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = list(str(input())) s list(str(input())) list str(input()) str input() input 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 w = '' w '' for i in s:
        w = w + i
     i s w = w + i w w + i w i print(w) print w main() main def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    s[k - 1] = s[k - 1].lower()
    w = ''
    for i in s:
        w = w + i
    print(w) def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    s[k - 1] = s[k - 1].lower()
    w = ''
    for i in s:
        w = w + i
    print(w) main
def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    s[k - 1] = s[k - 1].lower()
    w = ''
    for i in s:
        w = w + i
    print(w)
main()