import java.util.*;

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

        String S = sc.next();
        int l = S.length();
        String a = "AC";
        int b = 0;
        int sum = 0;
        int[] x = new int[l+1];

        if(S.charAt(0)!=a.charAt(0)){
            System.out.println("WA");
        }
        else{
            for(int i=2; i<=l-2; i++){
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            }
            if(b!=l-2){
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("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();
        int l = S.length();
        String a = "AC";
        int b = 0;
        int sum = 0;
        int[] x = new int[l+1];

        if(S.charAt(0)!=a.charAt(0)){
            System.out.println("WA");
        }
        else{
            for(int i=2; i<=l-2; i++){
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            }
            if(b!=l-2){
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("WA");
                }
            }
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        int l = S.length();
        String a = "AC";
        int b = 0;
        int sum = 0;
        int[] x = new int[l+1];

        if(S.charAt(0)!=a.charAt(0)){
            System.out.println("WA");
        }
        else{
            for(int i=2; i<=l-2; i++){
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            }
            if(b!=l-2){
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("WA");
                }
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        int l = S.length();
        String a = "AC";
        int b = 0;
        int sum = 0;
        int[] x = new int[l+1];

        if(S.charAt(0)!=a.charAt(0)){
            System.out.println("WA");
        }
        else{
            for(int i=2; i<=l-2; i++){
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            }
            if(b!=l-2){
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    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 int l = S.length(); l S.length() S.length S String a = "AC"; a "AC" int b = 0; b 0 int sum = 0; sum 0 int[] x = new int[l+1]; x new int[l+1] l+1 l 1 if(S.charAt(0)!=a.charAt(0)){
            System.out.println("WA");
        }
        else{
            for(int i=2; i<=l-2; i++){
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            }
            if(b!=l-2){
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("WA");
                }
            }
        } S.charAt(0)!=a.charAt(0) S.charAt(0) S.charAt S 0 a.charAt(0) a.charAt a 0 {
            System.out.println("WA");
        } System.out.println("WA") System.out.println System.out System System.out "WA" {
            for(int i=2; i<=l-2; i++){
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            }
            if(b!=l-2){
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("WA");
                }
            }
        } for(int i=2; i<=l-2; i++){
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            } int i=2; int i=2; i 2 i<=l-2 i l-2 l 2 i++ i++ i {
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            } {
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            } if(S.charAt(i)==a.charAt(1)){
                    break;
                } S.charAt(i)==a.charAt(1) S.charAt(i) S.charAt S i a.charAt(1) a.charAt a 1 {
                    break;
                } break; if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                } i==l-2 i l-2 l 2 {
                    System.out.println("WA");
                    b = l-2;
                } System.out.println("WA") System.out.println System.out System System.out "WA" b = l-2 b l-2 l 2 if(b!=l-2){
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("WA");
                }
            } b!=l-2 b l-2 l 2 {
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("WA");
                }
            } String US = S.toUpperCase(); US S.toUpperCase() S.toUpperCase S for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                } int i=0; int i=0; i 0 i<l i l i++ i++ i {
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                } {
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                } if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    } S.charAt(i)==US.charAt(i) S.charAt(i) S.charAt S i US.charAt(i) US.charAt US i {
                        sum += 1;
                        x[sum] = i;
                    } sum += 1 sum 1 x[sum] = i x[sum] x sum i if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("WA");
                } sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1) sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1) sum==2 sum 2 S.charAt(x[1])==a.charAt(0) S.charAt(x[1]) S.charAt S x[1] x 1 a.charAt(0) a.charAt a 0 S.charAt(x[2])==a.charAt(1) S.charAt(x[2]) S.charAt S x[2] x 2 a.charAt(1) a.charAt a 1 {
                    System.out.println("AC");
                } System.out.println("AC") System.out.println System.out System System.out "AC" if(sum>2){
                    System.out.println("WA");
                } sum>2 sum 2 {
                    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 sc = new Scanner(System.in);

        String S = sc.next();
        int l = S.length();
        String a = "AC";
        int b = 0;
        int sum = 0;
        int[] x = new int[l+1];

        if(S.charAt(0)!=a.charAt(0)){
            System.out.println("WA");
        }
        else{
            for(int i=2; i<=l-2; i++){
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            }
            if(b!=l-2){
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("WA");
                }
            }
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        int l = S.length();
        String a = "AC";
        int b = 0;
        int sum = 0;
        int[] x = new int[l+1];

        if(S.charAt(0)!=a.charAt(0)){
            System.out.println("WA");
        }
        else{
            for(int i=2; i<=l-2; i++){
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            }
            if(b!=l-2){
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("WA");
                }
            }
        }
    }
} Main
import java.util.*;

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

        String S = sc.next();
        int l = S.length();
        String a = "AC";
        int b = 0;
        int sum = 0;
        int[] x = new int[l+1];

        if(S.charAt(0)!=a.charAt(0)){
            System.out.println("WA");
        }
        else{
            for(int i=2; i<=l-2; i++){
                if(S.charAt(i)==a.charAt(1)){
                    break;
                }
                if(i==l-2){
                    System.out.println("WA");
                    b = l-2;
                }
            }
            if(b!=l-2){
                String US = S.toUpperCase();
                for(int i=0; i<l; i++){
                    if(S.charAt(i)==US.charAt(i)){
                        sum += 1;
                        x[sum] = i;
                    }
                }
                
                if(sum==2 && S.charAt(x[1])==a.charAt(0) && S.charAt(x[2])==a.charAt(1)){
                    System.out.println("AC");
                }
                else if(sum>2){
                    System.out.println("WA");
                }
            }
        }
    }
}