def main():
    n,k = map(int,input().split())
    s = list(input())
    s[k - 1] = chr(ord(s[k - 1]) + 32)
    t = ''
    for i in s:
        t = t + i
    print(t)
main() def main():
    n,k = map(int,input().split())
    s = list(input())
    s[k - 1] = chr(ord(s[k - 1]) + 32)
    t = ''
    for i in s:
        t = t + i
    print(t) main n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s = list(input()) s list(input()) list input() input s[k - 1] = chr(ord(s[k - 1]) + 32) s[k - 1] s k - 1 k 1 chr(ord(s[k - 1]) + 32) chr ord(s[k - 1]) + 32 ord(s[k - 1]) ord s[k - 1] s k - 1 k 1 32 t = '' t '' for i in s:
        t = t + i
     i s t = t + i t t + i t i print(t) print t main() main def main():
    n,k = map(int,input().split())
    s = list(input())
    s[k - 1] = chr(ord(s[k - 1]) + 32)
    t = ''
    for i in s:
        t = t + i
    print(t) def main():
    n,k = map(int,input().split())
    s = list(input())
    s[k - 1] = chr(ord(s[k - 1]) + 32)
    t = ''
    for i in s:
        t = t + i
    print(t) main
def main():
    n,k = map(int,input().split())
    s = list(input())
    s[k - 1] = chr(ord(s[k - 1]) + 32)
    t = ''
    for i in s:
        t = t + i
    print(t)
main()