unittest
{
	assert( [ "A" ].parse.expand.solve == "T" );
	assert( [ "G" ].parse.expand.solve == "C" );
}



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 b = input.front;
	return tuple( b );
}

auto solve( string b )
{
	switch( b )
	{
		case "A": return "T";
		case "C": return "G";
		case "G": return "C";
		case "T": return "A";
		default : assert( false );
	}
}
