import sys

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N, K = LI()
S = list(S())

S[K-1] = S[K-1].lower()
print(''.join(S)) import sys sys def S(): return sys.stdin.readline().rstrip() S def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) LS N, K = LI() N LI() LI K S = list(S()) S list(S()) list S() S 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 def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS K = LI() LI() K N, K = LI() LI() N def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI S = list(S()) list(S()) S def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S
import sys

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N, K = LI()
S = list(S())

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