let isLower c = (c >= 'a') && (c <='z')

let S = stdin.ReadLine().ToCharArray()
let N = Array.length S

let check1 =
  S.[0] = 'A'
let check2 = 
  S.[2..(N - 2)]
  |> Array.filter ((=) 'C')
  |> Array.length
  |> (=) 1
let check3 = 
  S
  |> Array.filter isLower
  |> Array.length
  |> (=) (N - 2)

if (check1 && check2 && check3) then "AC" else "WA" 
|> printfn "%s"
