import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        boolean flg = true;
        if (s[0] != 'A') {
            flg = false;
        }

        boolean flg2 = false;
        for (int i = 2 ; i < s.length - 1 ; i++) {
            if (s[i] == 'C') {
                flg2 = true;
            }
        }

        int large = 0;
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            }
        }
        System.out.println(flg && flg2 && large == 2 ? "AC" : "WA");

    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        boolean flg = true;
        if (s[0] != 'A') {
            flg = false;
        }

        boolean flg2 = false;
        for (int i = 2 ; i < s.length - 1 ; i++) {
            if (s[i] == 'C') {
                flg2 = true;
            }
        }

        int large = 0;
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            }
        }
        System.out.println(flg && flg2 && large == 2 ? "AC" : "WA");

    }

} Main public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        boolean flg = true;
        if (s[0] != 'A') {
            flg = false;
        }

        boolean flg2 = false;
        for (int i = 2 ; i < s.length - 1 ; i++) {
            if (s[i] == 'C') {
                flg2 = true;
            }
        }

        int large = 0;
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            }
        }
        System.out.println(flg && flg2 && large == 2 ? "AC" : "WA");

    } main {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        boolean flg = true;
        if (s[0] != 'A') {
            flg = false;
        }

        boolean flg2 = false;
        for (int i = 2 ; i < s.length - 1 ; i++) {
            if (s[i] == 'C') {
                flg2 = true;
            }
        }

        int large = 0;
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            }
        }
        System.out.println(flg && flg2 && large == 2 ? "AC" : "WA");

    } @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc boolean flg = true; flg true if (s[0] != 'A') {
            flg = false;
        } s[0] != 'A' s[0] s 0 'A' {
            flg = false;
        } flg = false flg false boolean flg2 = false; flg2 false for (int i = 2 ; i < s.length - 1 ; i++) {
            if (s[i] == 'C') {
                flg2 = true;
            }
        } int i = 2 ; int i = 2 ; i 2 i < s.length - 1 i s.length - 1 s.length s s.length 1 i++ i++ i {
            if (s[i] == 'C') {
                flg2 = true;
            }
        } {
            if (s[i] == 'C') {
                flg2 = true;
            }
        } if (s[i] == 'C') {
                flg2 = true;
            } s[i] == 'C' s[i] s i 'C' {
                flg2 = true;
            } flg2 = true flg2 true int large = 0; large 0 for (int i = 0 ; i < s.length ; i++) {
            if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            }
        } int i = 0 ; int i = 0 ; i 0 i < s.length i s.length s s.length i++ i++ i {
            if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            }
        } {
            if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            }
        } if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            } s[i] >= 'A' && s[i] <= 'Z' s[i] >= 'A' s[i] s i 'A' s[i] <= 'Z' s[i] s i 'Z' {
                large++;
            } large++ large System.out.println(flg && flg2 && large == 2 ? "AC" : "WA") System.out.println System.out System System.out flg && flg2 && large == 2 ? "AC" : "WA" flg && flg2 && large == 2 flg && flg2 && large == 2 flg flg2 large == 2 large 2 "AC" "WA" String[] args args public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        boolean flg = true;
        if (s[0] != 'A') {
            flg = false;
        }

        boolean flg2 = false;
        for (int i = 2 ; i < s.length - 1 ; i++) {
            if (s[i] == 'C') {
                flg2 = true;
            }
        }

        int large = 0;
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            }
        }
        System.out.println(flg && flg2 && large == 2 ? "AC" : "WA");

    }

} public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        boolean flg = true;
        if (s[0] != 'A') {
            flg = false;
        }

        boolean flg2 = false;
        for (int i = 2 ; i < s.length - 1 ; i++) {
            if (s[i] == 'C') {
                flg2 = true;
            }
        }

        int large = 0;
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            }
        }
        System.out.println(flg && flg2 && large == 2 ? "AC" : "WA");

    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        boolean flg = true;
        if (s[0] != 'A') {
            flg = false;
        }

        boolean flg2 = false;
        for (int i = 2 ; i < s.length - 1 ; i++) {
            if (s[i] == 'C') {
                flg2 = true;
            }
        }

        int large = 0;
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] >= 'A' && s[i] <= 'Z') {
                large++;
            }
        }
        System.out.println(flg && flg2 && large == 2 ? "AC" : "WA");

    }

}
