
import java.util.*;

public class Main {

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ok = true;
        if (s.charAt(0) != 'A')
            ok = false;
        boolean check = false;
        int idx = 0;
        for (int i = 2; i < s.length() - 1; i++) {
            if (s.charAt(i) == 'C') {
                check = true;
                idx = i;
                break;
            }
        }
        ok &= check;
        for (int i = 1; i < s.length(); i++) {
            if (i == idx)
                continue;
            if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')
                ok = false;
        }
        System.out.println(ok ? "AC" : "WA");

    }

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

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ok = true;
        if (s.charAt(0) != 'A')
            ok = false;
        boolean check = false;
        int idx = 0;
        for (int i = 2; i < s.length() - 1; i++) {
            if (s.charAt(i) == 'C') {
                check = true;
                idx = i;
                break;
            }
        }
        ok &= check;
        for (int i = 1; i < s.length(); i++) {
            if (i == idx)
                continue;
            if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')
                ok = false;
        }
        System.out.println(ok ? "AC" : "WA");

    }

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

    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ok = true;
        if (s.charAt(0) != 'A')
            ok = false;
        boolean check = false;
        int idx = 0;
        for (int i = 2; i < s.length() - 1; i++) {
            if (s.charAt(i) == 'C') {
                check = true;
                idx = i;
                break;
            }
        }
        ok &= check;
        for (int i = 1; i < s.length(); i++) {
            if (i == idx)
                continue;
            if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')
                ok = false;
        }
        System.out.println(ok ? "AC" : "WA");

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc boolean ok = true; ok true if (s.charAt(0) != 'A')
            ok = false; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' ok = false ok false boolean check = false; check false int idx = 0; idx 0 for (int i = 2; i < s.length() - 1; i++) {
            if (s.charAt(i) == 'C') {
                check = true;
                idx = i;
                break;
            }
        } int i = 2; int i = 2; i 2 i < s.length() - 1 i s.length() - 1 s.length() s.length s 1 i++ i++ i {
            if (s.charAt(i) == 'C') {
                check = true;
                idx = i;
                break;
            }
        } {
            if (s.charAt(i) == 'C') {
                check = true;
                idx = i;
                break;
            }
        } if (s.charAt(i) == 'C') {
                check = true;
                idx = i;
                break;
            } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                check = true;
                idx = i;
                break;
            } check = true check true idx = i idx i break; ok &= check ok check for (int i = 1; i < s.length(); i++) {
            if (i == idx)
                continue;
            if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')
                ok = false;
        } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
            if (i == idx)
                continue;
            if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')
                ok = false;
        } {
            if (i == idx)
                continue;
            if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')
                ok = false;
        } if (i == idx)
                continue; i == idx i idx continue; if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')
                ok = false; 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' ok = false ok false System.out.println(ok ? "AC" : "WA") System.out.println System.out System System.out ok ? "AC" : "WA" ok "AC" "WA" String args[] args public class Main {

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ok = true;
        if (s.charAt(0) != 'A')
            ok = false;
        boolean check = false;
        int idx = 0;
        for (int i = 2; i < s.length() - 1; i++) {
            if (s.charAt(i) == 'C') {
                check = true;
                idx = i;
                break;
            }
        }
        ok &= check;
        for (int i = 1; i < s.length(); i++) {
            if (i == idx)
                continue;
            if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')
                ok = false;
        }
        System.out.println(ok ? "AC" : "WA");

    }

} public class Main {

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ok = true;
        if (s.charAt(0) != 'A')
            ok = false;
        boolean check = false;
        int idx = 0;
        for (int i = 2; i < s.length() - 1; i++) {
            if (s.charAt(i) == 'C') {
                check = true;
                idx = i;
                break;
            }
        }
        ok &= check;
        for (int i = 1; i < s.length(); i++) {
            if (i == idx)
                continue;
            if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')
                ok = false;
        }
        System.out.println(ok ? "AC" : "WA");

    }

} Main

import java.util.*;

public class Main {

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ok = true;
        if (s.charAt(0) != 'A')
            ok = false;
        boolean check = false;
        int idx = 0;
        for (int i = 2; i < s.length() - 1; i++) {
            if (s.charAt(i) == 'C') {
                check = true;
                idx = i;
                break;
            }
        }
        ok &= check;
        for (int i = 1; i < s.length(); i++) {
            if (i == idx)
                continue;
            if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')
                ok = false;
        }
        System.out.println(ok ? "AC" : "WA");

    }

}
