import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            return;
        }
        int cnt = 0;
        boolean can = false;
        for(int i = 1;i < s.length();i++){
            if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            }
            if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            }
            if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            }
        }
        if(can){
            System.out.println("AC");
            return;
        }
            System.out.println("WA");
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            return;
        }
        int cnt = 0;
        boolean can = false;
        for(int i = 1;i < s.length();i++){
            if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            }
            if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            }
            if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            }
        }
        if(can){
            System.out.println("AC");
            return;
        }
            System.out.println("WA");
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            return;
        }
        int cnt = 0;
        boolean can = false;
        for(int i = 1;i < s.length();i++){
            if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            }
            if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            }
            if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            }
        }
        if(can){
            System.out.println("AC");
            return;
        }
            System.out.println("WA");
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            return;
        }
        int cnt = 0;
        boolean can = false;
        for(int i = 1;i < s.length();i++){
            if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            }
            if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            }
            if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            }
        }
        if(can){
            System.out.println("AC");
            return;
        }
            System.out.println("WA");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc if(s.charAt(0) != 'A'){
            System.out.println("WA");
            return;
        } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; int cnt = 0; cnt 0 boolean can = false; can false for(int i = 1;i < s.length();i++){
            if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            }
            if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            }
            if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            }
        } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
            if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            }
            if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            }
            if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            }
        } {
            if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            }
            if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            }
            if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            }
        } if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            } s.charAt(i) == 'C' && (i == s.length()-1 || i == 1) s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' (i == s.length()-1 || i == 1) i == s.length()-1 i s.length()-1 s.length() s.length s 1 i == 1 i 1 {
                can = false;
                break;
            } can = false can false break; if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            } can = true can true cnt++ cnt if(cnt >= 2){
                    can = false;
                    break;
                } cnt >= 2 cnt 2 {
                    can = false;
                    break;
                } can = false can false break; continue; if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            } s.charAt(i) >= 'A' && s.charAt(i) <= 'Z' s.charAt(i) >= 'A' s.charAt(i) s.charAt s i 'A' s.charAt(i) <= 'Z' s.charAt(i) s.charAt s i 'Z' {
                can = false;
                break;
            } can = false can false break; if(can){
            System.out.println("AC");
            return;
        } can {
            System.out.println("AC");
            return;
        } System.out.println("AC") System.out.println System.out System System.out "AC" return; System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            return;
        }
        int cnt = 0;
        boolean can = false;
        for(int i = 1;i < s.length();i++){
            if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            }
            if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            }
            if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            }
        }
        if(can){
            System.out.println("AC");
            return;
        }
            System.out.println("WA");
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            return;
        }
        int cnt = 0;
        boolean can = false;
        for(int i = 1;i < s.length();i++){
            if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            }
            if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            }
            if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            }
        }
        if(can){
            System.out.println("AC");
            return;
        }
            System.out.println("WA");
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            return;
        }
        int cnt = 0;
        boolean can = false;
        for(int i = 1;i < s.length();i++){
            if(s.charAt(i) == 'C' && (i == s.length()-1 || i == 1)){
                can = false;
                break;
            }
            if(s.charAt(i) == 'C'){
                can = true;
                cnt++;
                if(cnt >= 2){
                    can = false;
                    break;
                }
                continue;
            }
            if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z'){
                can = false;
                break;
            }
        }
        if(can){
            System.out.println("AC");
            return;
        }
            System.out.println("WA");
    }
}
