def readinput():
    n,k=map(int,input().split())
    s=input()
    return n,k,s

def main(n,k,s):
    ans=s[:k-1]+s[k-1].lower()+s[k:]
    return ans

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

def main(n,k,s):
    ans=s[:k-1]+s[k-1].lower()+s[k:]
    return ans

if __name__=='__main__':
    n,k,s=readinput()
    ans=main(n,k,s)
    print(ans)
