def main():
    n, k = map(int, input().split())
    s = input()
    
    print(s[:k-1] + s[k-1].lower() + s[k:])

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

if __name__ == "__main__":
    main()