#!/usr/bin/env python3
# N = int(input())
# S = input()
N, K = map(int, input().split())
S = [s for s in input()]
# A = list(map(int, input().split()))
S[K - 1] = S[K - 1].lower()
print("".join(S)) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K s for s in input() for s in input() s input() input for s in input() s S = [s for s in input()] S [s for s in input()] 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 S = [s for s in input()] [s for s in input()] S K = map(int, input().split()) map(int, input().split()) K N, K = map(int, input().split()) map(int, input().split()) N
#!/usr/bin/env python3
# N = int(input())
# S = input()
N, K = map(int, input().split())
S = [s for s in input()]
# A = list(map(int, input().split()))
S[K - 1] = S[K - 1].lower()
print("".join(S))