import std.conv;
import std.stdio;
import std.string;

void main()
{
	auto s = readln.strip;
	writeln( solve( s ) );
}

auto solve( in string s )
{
	auto checkA = false;
	auto checkC = false;
	auto checklower = true;
	
	foreach( i, c; s )
	{
		if( i == 0 && c == 'A' )
		{
			checkA = true;
			continue;
		}
		
		if( 2 <= i && i <= s.length - 2 && c == 'C' && !checkC )
		{
			checkC = true;
			continue;
		}
		
		if( c < 'a' || 'z' < c )
		{
			checklower = false;
			break;
		}
	}
	
	if( checkA && checkC && checklower ) return "AC";
	else                                 return "WA";
}
