program main
Implicit None
	integer(8)::n,k
	character(len = 50)::s
	
	read*,n,k
	read*,s
	
	if(s(k:k) == "A")then
		s(k:k) = "a"
		else if(s(k:k) == "B")then
		s(k:k) = "b"
		else
		s(k:k) = "c"
	endif
	
	print"(a)",trim(s)
end program main