n,k = map(int,input().split())

s = list(input())

s[k-1] = s[k-1].lower()
ans = ''.join(s)
print(ans) 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] = 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 ans = ''.join(s) ans ''.join(s) ''.join '' join s print(ans) print ans ans = ''.join(s) ''.join(s) ans k = map(int,input().split()) map(int,input().split()) k s = list(input()) list(input()) s n,k = map(int,input().split()) map(int,input().split()) n
n,k = map(int,input().split())

s = list(input())

s[k-1] = s[k-1].lower()
ans = ''.join(s)
print(ans)