Imports System
Module ABC104B
	Function Check(ByVal s As String) As Boolean
		If s(0) <> "A" Then Return False
		
		Dim cnt As Integer = 0
		Dim l As Integer = s.Length
		For idx As Integer = 2 To l-2
			If s(idx) = "C" Then cnt += 1
		Next
		If cnt <> 1
			Return False
		End IF
		
		cnt = 0
		For idx As Integer = 0 To l-1
			If Char.IsUpper(CType(s(idx),Char)) Then cnt += 1
		Next
		If cnt <> 2
			Return False
		End IF
		Return True
	
	End Function
	
	Sub Main()
		Dim s As String = Console.ReadLine()
		
		If Check(s)
			Console.WriteLine("AC")
		Else
			Console.WriteLine("WA")
		End IF
		
	End Sub
End Module

