let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}
var arr2=readLine()!
 let characters = arr2.characters

var c = 1
var o  = "";
var p : String = "" 
for var s in characters {
  	
  	if( arr[1] == c ) { 
    	p = String(s).lowercaseString
    } else {
 		p = String(s)
	}
	
    o += p
	c += 1
}

print( o )