program main
	implicit none
	integer       :: i, counter_C = 0, counter_Big = 0
	character(10) :: S
	read(*, *) S
	if(S(1:1) /= "A") then
		write(*, *) "WA"
	else
		do i = 3, len_trim(S)-1
			if(S(i:i) == "C") then
				counter_C = counter_C + 1
			end if
		end do
		do i = 1, len_trim(S)
			if(S(i:i) >= "A" .AND. S(i:i) <= "Z") then
				counter_Big = counter_Big + 1
			end if
		end do
	end if
	if(counter_C == 1 .AND. counter_Big == 2) then
		write(*, *) "AC"
	else
		write(*, *) "WA"
	end if
end program main