
def main():
    n, k = map(int, input().split())
    s = input()
    result = ''
    for i in range(0, len(s)):
        if i == k-1:
            result += s[i].lower()
        else:
            result += s[i]
    print(result)


if __name__ == "__main__":
    main() def main():
    n, k = map(int, input().split())
    s = input()
    result = ''
    for i in range(0, len(s)):
        if i == k-1:
            result += s[i].lower()
        else:
            result += s[i]
    print(result) 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 result = '' result '' for i in range(0, len(s)):
        if i == k-1:
            result += s[i].lower()
        else:
            result += s[i]
     i range(0, len(s)) range 0 len(s) len s if i == k-1:
            result += s[i].lower()
        else:
            result += s[i]
     i == k-1 i k-1 k 1 result += s[i].lower() result s[i].lower() [i].lower [i] s i lower result += s[i] result s[i] s i print(result) print result if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n, k = map(int, input().split())
    s = input()
    result = ''
    for i in range(0, len(s)):
        if i == k-1:
            result += s[i].lower()
        else:
            result += s[i]
    print(result) def main():
    n, k = map(int, input().split())
    s = input()
    result = ''
    for i in range(0, len(s)):
        if i == k-1:
            result += s[i].lower()
        else:
            result += s[i]
    print(result) main

def main():
    n, k = map(int, input().split())
    s = input()
    result = ''
    for i in range(0, len(s)):
        if i == k-1:
            result += s[i].lower()
        else:
            result += s[i]
    print(result)


if __name__ == "__main__":
    main()
