def main():
    n,k=map(int,input().split(' '))
    s=input()
    print(s[0:k-1],end='')
    print(s[k-1].lower(),end='')
    print(s[k:n+1])

main() def main():
    n,k=map(int,input().split(' '))
    s=input()
    print(s[0:k-1],end='')
    print(s[k-1].lower(),end='')
    print(s[k:n+1]) 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 print(s[0:k-1],end='') print s[0:k-1] s 0:k-1 0 k-1 k 1 end='' end '' print(s[k-1].lower(),end='') print s[k-1].lower() [k-1].lower [k-1] s k-1 k 1 lower end='' end '' print(s[k:n+1]) print s[k:n+1] s k:n+1 k n+1 n 1 main() main def main():
    n,k=map(int,input().split(' '))
    s=input()
    print(s[0:k-1],end='')
    print(s[k-1].lower(),end='')
    print(s[k:n+1]) def main():
    n,k=map(int,input().split(' '))
    s=input()
    print(s[0:k-1],end='')
    print(s[k-1].lower(),end='')
    print(s[k:n+1]) main
def main():
    n,k=map(int,input().split(' '))
    s=input()
    print(s[0:k-1],end='')
    print(s[k-1].lower(),end='')
    print(s[k:n+1])

main()
