N, K = map(int, input().split())
S = input()

if S[K-1] == 'A':
    S = S[:K-1] + 'a' + S[K:]
elif S[K - 1] == 'B':
        S = S[:K - 1] + 'b' + S[K:]
elif S[K-1] == 'C':
    S = S[:K-1] + 'c' + S[K:]
print(S) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K S = input() S input() input if S[K-1] == 'A':
    S = S[:K-1] + 'a' + S[K:]
elif S[K - 1] == 'B':
        S = S[:K - 1] + 'b' + S[K:]
elif S[K-1] == 'C':
    S = S[:K-1] + 'c' + S[K:] S[K-1] == 'A' S[K-1] S K-1 K 1 'A' S = S[:K-1] + 'a' + S[K:] S S[:K-1] + 'a' + S[K:] S[:K-1] + 'a' S[:K-1] S :K-1 K-1 K 1 'a' S[K:] S K: K elif S[K - 1] == 'B':
        S = S[:K - 1] + 'b' + S[K:] S[K - 1] == 'B' S[K - 1] S K - 1 K 1 'B' S = S[:K - 1] + 'b' + S[K:] S S[:K - 1] + 'b' + S[K:] S[:K - 1] + 'b' S[:K - 1] S :K - 1 K - 1 K 1 'b' S[K:] S K: K elif S[K-1] == 'C':
    S = S[:K-1] + 'c' + S[K:] S[K-1] == 'C' S[K-1] S K-1 K 1 'C' S = S[:K-1] + 'c' + S[K:] S 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 print(S) print S N, K = map(int, input().split()) map(int, input().split()) N K = map(int, input().split()) map(int, input().split()) K S = S[:K-1] + 'a' + S[K:] S[:K-1] + 'a' + S[K:] S S = S[:K - 1] + 'b' + S[K:] S[:K - 1] + 'b' + S[K:] S S = S[:K-1] + 'c' + S[K:] S[:K-1] + 'c' + S[K:] S S = input() input() S
N, K = map(int, input().split())
S = input()

if S[K-1] == 'A':
    S = S[:K-1] + 'a' + S[K:]
elif S[K - 1] == 'B':
        S = S[:K - 1] + 'b' + S[K:]
elif S[K-1] == 'C':
    S = S[:K-1] + 'c' + S[K:]
print(S)