import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, K = map(int, readline().split())
S = list(read().rstrip().decode())

S[K - 1] = S[K - 1].lower()
print(''.join(S)) import sys sys read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines N, K = map(int, readline().split()) N map(int, readline().split()) map int readline().split() ().split () readline split K S = list(read().rstrip().decode()) S list(read().rstrip().decode()) list read().rstrip().decode() ().rstrip().decode ().rstrip() ().rstrip () read rstrip decode 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(''.join(S)) print ''.join(S) ''.join '' join S readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline read = sys.stdin.buffer.read sys.stdin.buffer.read read S = list(read().rstrip().decode()) list(read().rstrip().decode()) S readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines N, K = map(int, readline().split()) map(int, readline().split()) N K = map(int, readline().split()) map(int, readline().split()) K
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, K = map(int, readline().split())
S = list(read().rstrip().decode())

S[K - 1] = S[K - 1].lower()
print(''.join(S))