import java.math.BigDecimal;
import java.math.MathContext;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] ca = scanner.next().toCharArray();
        boolean fl1 = false;
        if(ca[0] != 'A'||Character.isUpperCase(ca[1])){
            System.out.println("WA");
            return;
        }
        for (int n = 2;n < ca.length - 1;++n){
            if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            }
        }
        if(fl1&&Character.isLowerCase(ca[ca.length - 1])){
            System.out.println("AC");
        }
        else{
            System.out.println("WA");
        }
    }
} import java.math.BigDecimal; BigDecimal java.math import java.math.MathContext; MathContext java.math import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] ca = scanner.next().toCharArray();
        boolean fl1 = false;
        if(ca[0] != 'A'||Character.isUpperCase(ca[1])){
            System.out.println("WA");
            return;
        }
        for (int n = 2;n < ca.length - 1;++n){
            if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            }
        }
        if(fl1&&Character.isLowerCase(ca[ca.length - 1])){
            System.out.println("AC");
        }
        else{
            System.out.println("WA");
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] ca = scanner.next().toCharArray();
        boolean fl1 = false;
        if(ca[0] != 'A'||Character.isUpperCase(ca[1])){
            System.out.println("WA");
            return;
        }
        for (int n = 2;n < ca.length - 1;++n){
            if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            }
        }
        if(fl1&&Character.isLowerCase(ca[ca.length - 1])){
            System.out.println("AC");
        }
        else{
            System.out.println("WA");
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        char[] ca = scanner.next().toCharArray();
        boolean fl1 = false;
        if(ca[0] != 'A'||Character.isUpperCase(ca[1])){
            System.out.println("WA");
            return;
        }
        for (int n = 2;n < ca.length - 1;++n){
            if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            }
        }
        if(fl1&&Character.isLowerCase(ca[ca.length - 1])){
            System.out.println("AC");
        }
        else{
            System.out.println("WA");
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] ca = scanner.next().toCharArray(); ca scanner.next().toCharArray() scanner.next().toCharArray scanner.next() scanner.next scanner boolean fl1 = false; fl1 false if(ca[0] != 'A'||Character.isUpperCase(ca[1])){
            System.out.println("WA");
            return;
        } ca[0] != 'A'||Character.isUpperCase(ca[1]) ca[0] != 'A' ca[0] ca 0 'A' Character.isUpperCase(ca[1]) Character.isUpperCase Character ca[1] ca 1 {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int n = 2;n < ca.length - 1;++n){
            if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            }
        } int n = 2; int n = 2; n 2 n < ca.length - 1 n ca.length - 1 ca.length ca ca.length 1 ++n ++n n {
            if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            }
        } {
            if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            }
        } if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            } ca[n] == 'C' ca[n] ca n 'C' {
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            } if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true; fl1 {
                    System.out.println("WA");
                    return;
                } System.out.println("WA") System.out.println System.out System System.out "WA" return; fl1 = true fl1 true if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            } Character.isUpperCase(ca[n]) Character.isUpperCase Character ca[n] ca n {
                System.out.println("WA");
                return;
            } System.out.println("WA") System.out.println System.out System System.out "WA" return; if(fl1&&Character.isLowerCase(ca[ca.length - 1])){
            System.out.println("AC");
        }
        else{
            System.out.println("WA");
        } fl1&&Character.isLowerCase(ca[ca.length - 1]) fl1 Character.isLowerCase(ca[ca.length - 1]) Character.isLowerCase Character ca[ca.length - 1] ca ca.length - 1 ca.length ca ca.length 1 {
            System.out.println("AC");
        } System.out.println("AC") System.out.println System.out System System.out "AC" {
            System.out.println("WA");
        } 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 scanner = new Scanner(System.in);
        char[] ca = scanner.next().toCharArray();
        boolean fl1 = false;
        if(ca[0] != 'A'||Character.isUpperCase(ca[1])){
            System.out.println("WA");
            return;
        }
        for (int n = 2;n < ca.length - 1;++n){
            if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            }
        }
        if(fl1&&Character.isLowerCase(ca[ca.length - 1])){
            System.out.println("AC");
        }
        else{
            System.out.println("WA");
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] ca = scanner.next().toCharArray();
        boolean fl1 = false;
        if(ca[0] != 'A'||Character.isUpperCase(ca[1])){
            System.out.println("WA");
            return;
        }
        for (int n = 2;n < ca.length - 1;++n){
            if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            }
        }
        if(fl1&&Character.isLowerCase(ca[ca.length - 1])){
            System.out.println("AC");
        }
        else{
            System.out.println("WA");
        }
    }
} Main
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] ca = scanner.next().toCharArray();
        boolean fl1 = false;
        if(ca[0] != 'A'||Character.isUpperCase(ca[1])){
            System.out.println("WA");
            return;
        }
        for (int n = 2;n < ca.length - 1;++n){
            if(ca[n] == 'C'){
                if(fl1){
                    System.out.println("WA");
                    return;
                }
                else fl1 = true;
            }
            else if(Character.isUpperCase(ca[n])){
                System.out.println("WA");
                return;
            }
        }
        if(fl1&&Character.isLowerCase(ca[ca.length - 1])){
            System.out.println("AC");
        }
        else{
            System.out.println("WA");
        }
    }
}
