def main():
    n,k = map(int, input().split())
    s = input()
    a = s[k-1].lower()
    b=list(s)
    b[k-1]=a
    s="".join(b)
    print(s)
main() def main():
    n,k = map(int, input().split())
    s = input()
    a = s[k-1].lower()
    b=list(s)
    b[k-1]=a
    s="".join(b)
    print(s) main n,k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = input() s input() input a = s[k-1].lower() a s[k-1].lower() [k-1].lower [k-1] s k-1 k 1 lower b=list(s) b list(s) list s b[k-1]=a b[k-1] b k-1 k 1 a s="".join(b) s "".join(b) "".join "" join b print(s) print s main() main def main():
    n,k = map(int, input().split())
    s = input()
    a = s[k-1].lower()
    b=list(s)
    b[k-1]=a
    s="".join(b)
    print(s) def main():
    n,k = map(int, input().split())
    s = input()
    a = s[k-1].lower()
    b=list(s)
    b[k-1]=a
    s="".join(b)
    print(s) main
def main():
    n,k = map(int, input().split())
    s = input()
    a = s[k-1].lower()
    b=list(s)
    b[k-1]=a
    s="".join(b)
    print(s)
main()