def changing_character(n, k, s):

    s[k-1] = s[k-1].lower()
    return "".join(s)
def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    print(changing_character(n, k, s))

if __name__ == '__main__':
    main() def changing_character(n, k, s):

    s[k-1] = s[k-1].lower()
    return "".join(s) changing_character 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 return "".join(s) "".join(s) "".join "" join s n n k k s s def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    print(changing_character(n, k, s)) main n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = list(str(input())) s list(str(input())) list str(input()) str input() input print(changing_character(n, k, s)) print changing_character(n, k, s) changing_character n k s if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def changing_character(n, k, s):

    s[k-1] = s[k-1].lower()
    return "".join(s) def changing_character(n, k, s):

    s[k-1] = s[k-1].lower()
    return "".join(s) changing_character def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    print(changing_character(n, k, s)) def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    print(changing_character(n, k, s)) main
def changing_character(n, k, s):

    s[k-1] = s[k-1].lower()
    return "".join(s)
def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    print(changing_character(n, k, s))

if __name__ == '__main__':
    main()