from collections import defaultdict, deque
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


n, k = LI()
s = S()
c = s[k - 1].lower()
print(s[:k - 1] + c + s[k:]) from collections import defaultdict, deque import sys sys def LI(): return list(map(int, sys.stdin.buffer.readline().split())) LI def I(): return int(sys.stdin.buffer.readline()) I def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split() LS def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8') S I() for i in range(n) for i in range(n) i range(n) range n for i in range(n) I() I def IR(n): return [I() for i in range(n)] IR n n LI() for i in range(n) for i in range(n) i range(n) range n for i in range(n) LI() LI def LIR(n): return [LI() for i in range(n)] LIR n n S() for i in range(n) for i in range(n) i range(n) range n for i in range(n) S() S def SR(n): return [S() for i in range(n)] SR n n LS() for i in range(n) for i in range(n) i range(n) range n for i in range(n) LS() LS def LSR(n): return [LS() for i in range(n)] LSR n n list(S()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(S()) list S() S def SRL(n): return [list(S()) for i in range(n)] SRL n n [int(j) for j in list(S())] for i in range(n) for i in range(n) i range(n) range n for i in range(n) [int(j) for j in list(S())] def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)] MSRL n n n, k = LI() n LI() LI k s = S() s S() S c = s[k - 1].lower() c s[k - 1].lower() [k - 1].lower [k - 1] s k - 1 k 1 lower print(s[:k - 1] + c + s[k:]) print s[:k - 1] + c + s[k:] s[:k - 1] + c s[:k - 1] s :k - 1 k - 1 k 1 c s[k:] s k: k def IR(n): return [I() for i in range(n)] def IR(n): return [I() for i in range(n)] IR def SR(n): return [S() for i in range(n)] def SR(n): return [S() for i in range(n)] SR k = LI() LI() k def LI(): return list(map(int, sys.stdin.buffer.readline().split())) def LI(): return list(map(int, sys.stdin.buffer.readline().split())) LI def LSR(n): return [LS() for i in range(n)] def LSR(n): return [LS() for i in range(n)] LSR n, k = LI() LI() n def LIR(n): return [LI() for i in range(n)] def LIR(n): return [LI() for i in range(n)] LIR def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8') def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8') S def SRL(n): return [list(S()) for i in range(n)] def SRL(n): return [list(S()) for i in range(n)] SRL def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split() def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split() LS def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)] def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)] MSRL def I(): return int(sys.stdin.buffer.readline()) def I(): return int(sys.stdin.buffer.readline()) I c = s[k - 1].lower() s[k - 1].lower() c s = S() S() s
from collections import defaultdict, deque
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


n, k = LI()
s = S()
c = s[k - 1].lower()
print(s[:k - 1] + c + s[k:])
