import sys
input = sys.stdin.readline
def main():
    N, K = map(int, input().split())
    S = list(input().rstrip())
    S[K-1] = S[K-1].lower()
    print("".join(S))

if __name__ == '__main__':
    main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def main():
    N, K = map(int, input().split())
    S = list(input().rstrip())
    S[K-1] = S[K-1].lower()
    print("".join(S)) main N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K S = list(input().rstrip()) S list(input().rstrip()) list input().rstrip() ().rstrip () input rstrip 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("".join(S)) print "".join(S) "".join "" join S if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main input = sys.stdin.readline sys.stdin.readline input def main():
    N, K = map(int, input().split())
    S = list(input().rstrip())
    S[K-1] = S[K-1].lower()
    print("".join(S)) def main():
    N, K = map(int, input().split())
    S = list(input().rstrip())
    S[K-1] = S[K-1].lower()
    print("".join(S)) main
import sys
input = sys.stdin.readline
def main():
    N, K = map(int, input().split())
    S = list(input().rstrip())
    S[K-1] = S[K-1].lower()
    print("".join(S))

if __name__ == '__main__':
    main()