import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mat = lambda x, y, v: [[v]*y for _ in range(x)]
ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)]
mod = 1000000007
sys.setrecursionlimit(1000000)

N, K = rl()
S = rs()

ans = ''
for i, c in enumerate(S):
	if i == K-1:
		c = c.lower()
	ans += c
print(ans)
 import sys, math sys math from collections import defaultdict, deque, Counter from bisect import bisect_left, bisect_right from itertools import combinations, permutations, product from heapq import heappush, heappop from functools import lru_cache input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline rs = lambda: input().strip() rs lambda: input().strip() input().strip() ().strip () input strip ri = lambda: int(input()) ri lambda: int(input()) int(input()) int input() input rl = lambda: list(map(int, input().split())) rl lambda: list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split [v]*y for _ in range(x) for _ in range(x) _ range(x) range x for _ in range(x) [v]*y [v] v y mat = lambda x, y, v: [[v]*y for _ in range(x)] mat lambda x, y, v: [[v]*y for _ in range(x)] [[v]*y for _ in range(x)] x y v mat(y, z, v) for _ in range(x) for _ in range(x) _ range(x) range x for _ in range(x) mat(y, z, v) mat y z v ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] ten lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] [mat(y, z, v) for _ in range(x)] x y z v mod = 1000000007 mod 1000000007 sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 N, K = rl() N rl() rl K S = rs() S rs() rs ans = '' ans '' for i, c in enumerate(S):
	if i == K-1:
		c = c.lower()
	ans += c i c enumerate(S) enumerate S if i == K-1:
		c = c.lower()
	 i == K-1 i K-1 K 1 c = c.lower() c c.lower() c.lower c lower ans += c ans c print(ans) print ans mod = 1000000007 1000000007 mod mat = lambda x, y, v: [[v]*y for _ in range(x)] lambda x, y, v: [[v]*y for _ in range(x)] mat N, K = rl() rl() N rl = lambda: list(map(int, input().split())) lambda: list(map(int, input().split())) rl K = rl() rl() K c = c.lower() c.lower() c ans += c c ans ri = lambda: int(input()) lambda: int(input()) ri S = rs() rs() S rs = lambda: input().strip() lambda: input().strip() rs ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] ten ans = '' '' ans input = sys.stdin.readline sys.stdin.readline input
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mat = lambda x, y, v: [[v]*y for _ in range(x)]
ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)]
mod = 1000000007
sys.setrecursionlimit(1000000)

N, K = rl()
S = rs()

ans = ''
for i, c in enumerate(S):
	if i == K-1:
		c = c.lower()
	ans += c
print(ans)

