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