# -*- coding: utf-8 -*-

n, k = map(int, input().split())
s = list(str(input()))

s[k - 1] = s[k - 1].lower()

print(*s, sep='') 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 print(*s, sep='') print *s s sep='' sep '' n, k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k s = list(str(input())) list(str(input())) s
# -*- coding: utf-8 -*-

n, k = map(int, input().split())
s = list(str(input()))

s[k - 1] = s[k - 1].lower()

print(*s, sep='')