unittest
{
	assert( [ "2", "ABCXYZ" ].parse.expand.solve == "CDEZAB" );
	assert( [ "0", "ABCXYZ" ].parse.expand.solve == "ABCXYZ" );
	assert( [ "13", "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ].parse.expand.solve == "NOPQRSTUVWXYZABCDEFGHIJKLM" );
}



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 n = input.front.to!( uint );
	input.popFront;
	auto s = input.front.to!( dchar[] );
	return tuple( n, s );
}

auto solve( uint n, dchar[] s )
{
	foreach( ref c; s )
	{
		if( c + n <= 'Z' ) c = c + n;
		else               c = 'A' - 1 + c + n - 'Z';
	}
	return s;
}
