import java.util.*;

public class Main {
    public void main(Scanner sc) {
        System.out.println(sc.next().matches("^A[a-z]+C[a-z]+$") ? "AC" : "WA");
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        new Main().main(sc);
        sc.close();
    }
} import java.util.*; util.* java public class Main {
    public void main(Scanner sc) {
        System.out.println(sc.next().matches("^A[a-z]+C[a-z]+$") ? "AC" : "WA");
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        new Main().main(sc);
        sc.close();
    }
} Main public void main(Scanner sc) {
        System.out.println(sc.next().matches("^A[a-z]+C[a-z]+$") ? "AC" : "WA");
    } main {
        System.out.println(sc.next().matches("^A[a-z]+C[a-z]+$") ? "AC" : "WA");
    } System.out.println(sc.next().matches("^A[a-z]+C[a-z]+$") ? "AC" : "WA") System.out.println System.out System System.out sc.next().matches("^A[a-z]+C[a-z]+$") ? "AC" : "WA" sc.next().matches("^A[a-z]+C[a-z]+$") sc.next().matches sc.next() sc.next sc "^A[a-z]+C[a-z]+$" "AC" "WA" Scanner sc sc public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        new Main().main(sc);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        new Main().main(sc);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) new Main().main(sc) new Main().main new Main() sc sc.close() sc.close sc String[] args args public class Main {
    public void main(Scanner sc) {
        System.out.println(sc.next().matches("^A[a-z]+C[a-z]+$") ? "AC" : "WA");
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        new Main().main(sc);
        sc.close();
    }
} public class Main {
    public void main(Scanner sc) {
        System.out.println(sc.next().matches("^A[a-z]+C[a-z]+$") ? "AC" : "WA");
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        new Main().main(sc);
        sc.close();
    }
} Main
import java.util.*;

public class Main {
    public void main(Scanner sc) {
        System.out.println(sc.next().matches("^A[a-z]+C[a-z]+$") ? "AC" : "WA");
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        new Main().main(sc);
        sc.close();
    }
}
