n, k = map(int, input().split())
s = str(input())
ans = ''
if s[k-1] == 'A':
    ans = s[:k-1] + 'a' + s[k:]
    print(ans)
    exit()
elif s[k-1] == 'B':
    ans = s[:k-1] + 'b' + s[k:]
    print(ans)
    exit()
elif s[k-1] == 'C':
    ans = s[:k-1] + 'c' + s[k:]
    print(ans)
    exit() n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = str(input()) s str(input()) str input() input ans = '' ans '' if s[k-1] == 'A':
    ans = s[:k-1] + 'a' + s[k:]
    print(ans)
    exit()
elif s[k-1] == 'B':
    ans = s[:k-1] + 'b' + s[k:]
    print(ans)
    exit()
elif s[k-1] == 'C':
    ans = s[:k-1] + 'c' + s[k:]
    print(ans)
    exit() s[k-1] == 'A' s[k-1] s k-1 k 1 'A' ans = s[:k-1] + 'a' + s[k:] ans 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 print(ans) print ans exit() exit elif s[k-1] == 'B':
    ans = s[:k-1] + 'b' + s[k:]
    print(ans)
    exit() s[k-1] == 'B' s[k-1] s k-1 k 1 'B' ans = s[:k-1] + 'b' + s[k:] ans 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 print(ans) print ans exit() exit elif s[k-1] == 'C':
    ans = s[:k-1] + 'c' + s[k:]
    print(ans)
    exit() s[k-1] == 'C' s[k-1] s k-1 k 1 'C' ans = s[:k-1] + 'c' + s[k:] ans 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(ans) print ans exit() exit ans = s[:k-1] + 'c' + s[k:] s[:k-1] + 'c' + s[k:] ans ans = s[:k-1] + 'b' + s[k:] s[:k-1] + 'b' + s[k:] ans k = map(int, input().split()) map(int, input().split()) k ans = '' '' ans s = str(input()) str(input()) s n, k = map(int, input().split()) map(int, input().split()) n ans = s[:k-1] + 'a' + s[k:] s[:k-1] + 'a' + s[k:] ans
n, k = map(int, input().split())
s = str(input())
ans = ''
if s[k-1] == 'A':
    ans = s[:k-1] + 'a' + s[k:]
    print(ans)
    exit()
elif s[k-1] == 'B':
    ans = s[:k-1] + 'b' + s[k:]
    print(ans)
    exit()
elif s[k-1] == 'C':
    ans = s[:k-1] + 'c' + s[k:]
    print(ans)
    exit()