#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc126_a

n, k = map(int, input().strip().split())
word = input()
res = ''

for i in range(n):
    s = word[i]
    if i == k - 1:
        s = s.lower()
    res += s

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 word = input() word input() input res = '' res '' for i in range(n):
    s = word[i]
    if i == k - 1:
        s = s.lower()
    res += s i range(n) range n s = word[i] s word[i] word i if i == k - 1:
        s = s.lower()
     i == k - 1 i k - 1 k 1 s = s.lower() s s.lower() s.lower s lower res += s res s print(res) print res s = word[i] word[i] s res += s s res k = map(int, input().strip().split()) map(int, input().strip().split()) k word = input() input() word n, k = map(int, input().strip().split()) map(int, input().strip().split()) n res = '' '' res s = s.lower() s.lower() s
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc126_a

n, k = map(int, input().strip().split())
word = input()
res = ''

for i in range(n):
    s = word[i]
    if i == k - 1:
        s = s.lower()
    res += s

print(res)
