program prob
    implicit none
    character(12) :: s
    integer :: i, n, cnt
    logical :: ans
    read(*,*) s
    ans = .true.
    if(s(1:1) /= 'A')then
        ans = .false.
    end if
    n = len_trim(s)
    do i = 2, n
        if(ichar(s(i:i)) - ichar('a') >= 26 .or. ichar(s(i:i)) - ichar('a') < 0)then
            if(s(i:i) /= 'C')then
                ans = .false.
            end if
        end if
    end do
    cnt = 0
    do i = 3, n-1
        if(s(i:i) == 'C')then
            cnt = cnt + 1
        end if
    end do
    if(cnt /= 1)then
        ans = .false.
    end if
    if(ans)then
        write(*,'(a)') 'AC'
    else
        write(*,'(a)') 'WA'
    end if

    stop
contains
end program prob