#!/usr/bin/env python3
# -*- coding: utf-8 -*-

N, K = map(int, input().strip().split())
s = input()
res = ''
for i in range(N):
    if i == K - 1:
        res += s[i].lower()
    else:
        res += s[i]
print(res) N, K = map(int, input().strip().split()) N map(int, input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split K s = input() s input() input res = '' res '' for i in range(N):
    if i == K - 1:
        res += s[i].lower()
    else:
        res += s[i] i range(N) range N if i == K - 1:
        res += s[i].lower()
    else:
        res += s[i] i == K - 1 i K - 1 K 1 res += s[i].lower() res s[i].lower() [i].lower [i] s i lower res += s[i] res s[i] s i print(res) print res N, K = map(int, input().strip().split()) map(int, input().strip().split()) N res = '' '' res res += s[i].lower() s[i].lower() res K = map(int, input().strip().split()) map(int, input().strip().split()) K s = input() input() s res += s[i] s[i] res
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

N, K = map(int, input().strip().split())
s = input()
res = ''
for i in range(N):
    if i == K - 1:
        res += s[i].lower()
    else:
        res += s[i]
print(res)
