program test
implicit none
integer :: i,j,k,m,n,a1=0,a2=0,a3=0,leng
character(10) :: mozi
read(*,*) mozi
leng = len_trim(mozi)

if(mozi(1:1) .ne. 'A') then
	write(*,*) 'WA'
else
	do i=2,leng
		if(i>=3 .and. i<=leng-1 .and. mozi(i:i) .eq. 'C') then
			a1 = a1 + 1
		
		else if(mozi(i:i) >= 'A' .and. mozi(i:i) <= 'Z') then
			a2 = a2 + 1
		endif
	enddo
	
	if(a1 == 1 .and. a2 == 0) then
		write(*,*) 'AC'
	else
		write(*,*) 'WA'
	endif
endif


end program