import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    n, k = geta(int)
    s = gete()

    print(s[:k-1] + s[k-1].lower() + s[k:])


if __name__ == "__main__":
    main() import sys sys from collections import defaultdict readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split()) geta return map(fn, readline().split()) map(fn, readline().split()) map fn readline().split() ().split () readline split fn=lambda s: s.decode() fn lambda s: s.decode() s.decode() s.decode s decode s def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip()) gete return fn(readline().rstrip()) fn(readline().rstrip()) fn readline().rstrip() ().rstrip () readline rstrip fn=lambda s: s.decode() fn lambda s: s.decode() s.decode() s.decode s decode s def main():
    n, k = geta(int)
    s = gete()

    print(s[:k-1] + s[k-1].lower() + s[k:]) main n, k = geta(int) n geta(int) geta int k s = gete() s gete() gete 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__":
    main() __name__ == "__main__" __name__ "__main__" main() main def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip()) def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip()) gete def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split()) def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split()) geta readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline def main():
    n, k = geta(int)
    s = gete()

    print(s[:k-1] + s[k-1].lower() + s[k:]) def main():
    n, k = geta(int)
    s = gete()

    print(s[:k-1] + s[k-1].lower() + s[k:]) main
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    n, k = geta(int)
    s = gete()

    print(s[:k-1] + s[k-1].lower() + s[k:])


if __name__ == "__main__":
    main()
