def solve():
    n, k = map(int, input().split())
    s = input()
    print(s[:k-1] + s[k-1].lower() + s[k:])


if __name__ == '__main__':
    solve() def solve():
    n, k = map(int, input().split())
    s = input()
    print(s[:k-1] + s[k-1].lower() + s[k:]) solve n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = input() s input() input print(s[:k-1] + s[k-1].lower() + s[k:]) print s[:k-1] + s[k-1].lower() + s[k:] s[:k-1] + s[k-1].lower() s[:k-1] s :k-1 k-1 k 1 s[k-1].lower() [k-1].lower [k-1] s k-1 k 1 lower s[k:] s k: k if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve def solve():
    n, k = map(int, input().split())
    s = input()
    print(s[:k-1] + s[k-1].lower() + s[k:]) def solve():
    n, k = map(int, input().split())
    s = input()
    print(s[:k-1] + s[k-1].lower() + s[k:]) solve
def solve():
    n, k = map(int, input().split())
    s = input()
    print(s[:k-1] + s[k-1].lower() + s[k:])


if __name__ == '__main__':
    solve()
