n, k = map(int, input().split())
s = list(input())

if s[k-1].isupper():
    s[k-1] = s[k-1].lower()
else:
    s[k-1] = s[k-1].upper()

print(''.join(s)) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = list(input()) s list(input()) list input() input if s[k-1].isupper():
    s[k-1] = s[k-1].lower()
else:
    s[k-1] = s[k-1].upper() s[k-1].isupper() [k-1].isupper [k-1] s k-1 k 1 isupper 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 s[k-1] = s[k-1].upper() s[k-1] s k-1 k 1 s[k-1].upper() [k-1].upper [k-1] s k-1 k 1 upper print(''.join(s)) print ''.join(s) ''.join '' join s k = map(int, input().split()) map(int, input().split()) k n, k = map(int, input().split()) map(int, input().split()) n s = list(input()) list(input()) s
n, k = map(int, input().split())
s = list(input())

if s[k-1].isupper():
    s[k-1] = s[k-1].lower()
else:
    s[k-1] = s[k-1].upper()

print(''.join(s))
