import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n, k = map(int, input().split())
    s = list(input())
    s[k-1] = s[k-1].lower()
    print(*s, sep='')
    
if __name__ == '__main__':
    main() import sys sys input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip def main():
    n, k = map(int, input().split())
    s = list(input())
    s[k-1] = s[k-1].lower()
    print(*s, sep='')
     main 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 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 print(*s, sep='') print *s s sep='' sep '' if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input def main():
    n, k = map(int, input().split())
    s = list(input())
    s[k-1] = s[k-1].lower()
    print(*s, sep='')
     def main():
    n, k = map(int, input().split())
    s = list(input())
    s[k-1] = s[k-1].lower()
    print(*s, sep='')
     main
import sys
input = lambda: sys.stdin.readline().rstrip()

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