import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        sc.close();
        int len = s.length;
        boolean ans = true;
        int count = 0;
        for (int i = 0; i < len; i++){
            if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            }
        }
        if(count != 1)ans = false;
        if(ans){
            System.out.println("AC");
        }else{
            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);
        char[] s = sc.next().toCharArray();
        sc.close();
        int len = s.length;
        boolean ans = true;
        int count = 0;
        for (int i = 0; i < len; i++){
            if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            }
        }
        if(count != 1)ans = false;
        if(ans){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }

    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        sc.close();
        int len = s.length;
        boolean ans = true;
        int count = 0;
        for (int i = 0; i < len; i++){
            if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            }
        }
        if(count != 1)ans = false;
        if(ans){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }

    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        sc.close();
        int len = s.length;
        boolean ans = true;
        int count = 0;
        for (int i = 0; i < len; i++){
            if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            }
        }
        if(count != 1)ans = false;
        if(ans){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }

    } 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 sc.close() sc.close sc int len = s.length; len s.length s s.length boolean ans = true; ans true int count = 0; count 0 for (int i = 0; i < len; i++){
            if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            }
        } int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
            if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            }
        } {
            if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            }
        } if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            } i == 0 i 0 {
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            } if(s[i] !='A'){
                    ans = false;
                    break;
                } s[i] !='A' s[i] s i 'A' {
                    ans = false;
                    break;
                } ans = false ans false break; if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            } i > 1 && i < len -1 && s[i] == 'C' i > 1 && i < len -1 && s[i] == 'C' i > 1 i 1 i < len -1 i len -1 len 1 s[i] == 'C' s[i] s i 'C' {
                count += 1;
            } count += 1 count 1 {
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            } if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                } Character.isUpperCase(s[i]) Character.isUpperCase Character s[i] s i {
                    ans = false;
                    break;
                } ans = false ans false break; if(count != 1)ans = false; count != 1 count 1 ans = false ans false if(ans){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        } ans {
            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 sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        sc.close();
        int len = s.length;
        boolean ans = true;
        int count = 0;
        for (int i = 0; i < len; i++){
            if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            }
        }
        if(count != 1)ans = false;
        if(ans){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }

    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        sc.close();
        int len = s.length;
        boolean ans = true;
        int count = 0;
        for (int i = 0; i < len; i++){
            if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            }
        }
        if(count != 1)ans = false;
        if(ans){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }

    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        sc.close();
        int len = s.length;
        boolean ans = true;
        int count = 0;
        for (int i = 0; i < len; i++){
            if(i == 0 ){
                if(s[i] !='A'){
                    ans = false;
                    break;
                }
            }else if(i > 1 && i < len -1 && s[i] == 'C'){
                count += 1;
            }else{
                if(Character.isUpperCase(s[i])){
                    ans = false;
                    break;
                }
            }
        }
        if(count != 1)ans = false;
        if(ans){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }

    }

}
