unittest
{
	assert( [ "3 1", "ABC" ].parse.expand.solve == "aBC" );
	assert( [ "4 3", "CABA" ].parse.expand.solve == "CAbA" );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto nk = input.front.split.to!( long[] );
	input.popFront;
	auto s = input.front.to!( dchar[] );
	return tuple( nk[ 1 ], s );
}

auto solve( long k, dchar[] s )
{
	s[ k - 1 ] = s[ k - 1 ] - ( 'A' - 'a' );
	return s;
}
