import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String B = scan.next();
        char[] d = B.toCharArray();
        boolean answer = true;
        int count_upper = 0;
        int count_c = 0;
        int count_c_range = 0;
        for (int i = 0; i < d.length; i++) {
            if (d[i] == 'C') {
                count_c += 1;
            }
            if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            }
            if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            }
            if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            }
        }
        if (count_c_range != 1 || count_c_range != count_c) {
            answer = false;
        }
        if (count_upper != 2) {
            answer = false;
        }
        System.out.println(answer ? "AC" : "WA");
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String B = scan.next();
        char[] d = B.toCharArray();
        boolean answer = true;
        int count_upper = 0;
        int count_c = 0;
        int count_c_range = 0;
        for (int i = 0; i < d.length; i++) {
            if (d[i] == 'C') {
                count_c += 1;
            }
            if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            }
            if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            }
            if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            }
        }
        if (count_c_range != 1 || count_c_range != count_c) {
            answer = false;
        }
        if (count_upper != 2) {
            answer = false;
        }
        System.out.println(answer ? "AC" : "WA");
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String B = scan.next();
        char[] d = B.toCharArray();
        boolean answer = true;
        int count_upper = 0;
        int count_c = 0;
        int count_c_range = 0;
        for (int i = 0; i < d.length; i++) {
            if (d[i] == 'C') {
                count_c += 1;
            }
            if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            }
            if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            }
            if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            }
        }
        if (count_c_range != 1 || count_c_range != count_c) {
            answer = false;
        }
        if (count_upper != 2) {
            answer = false;
        }
        System.out.println(answer ? "AC" : "WA");
    } main {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String B = scan.next();
        char[] d = B.toCharArray();
        boolean answer = true;
        int count_upper = 0;
        int count_c = 0;
        int count_c_range = 0;
        for (int i = 0; i < d.length; i++) {
            if (d[i] == 'C') {
                count_c += 1;
            }
            if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            }
            if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            }
            if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            }
        }
        if (count_c_range != 1 || count_c_range != count_c) {
            answer = false;
        }
        if (count_upper != 2) {
            answer = false;
        }
        System.out.println(answer ? "AC" : "WA");
    } Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in))); scan new Scanner(new BufferedReader(new InputStreamReader(System.in))) String B = scan.next(); B scan.next() scan.next scan char[] d = B.toCharArray(); d B.toCharArray() B.toCharArray B boolean answer = true; answer true int count_upper = 0; count_upper 0 int count_c = 0; count_c 0 int count_c_range = 0; count_c_range 0 for (int i = 0; i < d.length; i++) {
            if (d[i] == 'C') {
                count_c += 1;
            }
            if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            }
            if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            }
            if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            }
        } int i = 0; int i = 0; i 0 i < d.length i d.length d d.length i++ i++ i {
            if (d[i] == 'C') {
                count_c += 1;
            }
            if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            }
            if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            }
            if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            }
        } {
            if (d[i] == 'C') {
                count_c += 1;
            }
            if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            }
            if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            }
            if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            }
        } if (d[i] == 'C') {
                count_c += 1;
            } d[i] == 'C' d[i] d i 'C' {
                count_c += 1;
            } count_c += 1 count_c 1 if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            } i == 0 i 0 {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            } if (d[i] != 'A') {
                    answer = false;
                    break;
                } d[i] != 'A' d[i] d i 'A' {
                    answer = false;
                    break;
                } answer = false answer false break; if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            } 2 <= i && i <= d.length - 2 2 <= i 2 i i <= d.length - 2 i d.length - 2 d.length d d.length 2 {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            } if (d[i] == 'C') {
                    count_c_range += 1;
                } d[i] == 'C' d[i] d i 'C' {
                    count_c_range += 1;
                } count_c_range += 1 count_c_range 1 if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            } 0 <= d[i] - 'A' && d[i] - 'A' <= 25 0 <= d[i] - 'A' 0 d[i] - 'A' d[i] d i 'A' d[i] - 'A' <= 25 d[i] - 'A' d[i] d i 'A' 25 {
                count_upper += 1;
            } count_upper += 1 count_upper 1 if (count_c_range != 1 || count_c_range != count_c) {
            answer = false;
        } count_c_range != 1 || count_c_range != count_c count_c_range != 1 count_c_range 1 count_c_range != count_c count_c_range count_c {
            answer = false;
        } answer = false answer false if (count_upper != 2) {
            answer = false;
        } count_upper != 2 count_upper 2 {
            answer = false;
        } answer = false answer false System.out.println(answer ? "AC" : "WA") System.out.println System.out System System.out answer ? "AC" : "WA" answer "AC" "WA" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String B = scan.next();
        char[] d = B.toCharArray();
        boolean answer = true;
        int count_upper = 0;
        int count_c = 0;
        int count_c_range = 0;
        for (int i = 0; i < d.length; i++) {
            if (d[i] == 'C') {
                count_c += 1;
            }
            if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            }
            if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            }
            if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            }
        }
        if (count_c_range != 1 || count_c_range != count_c) {
            answer = false;
        }
        if (count_upper != 2) {
            answer = false;
        }
        System.out.println(answer ? "AC" : "WA");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String B = scan.next();
        char[] d = B.toCharArray();
        boolean answer = true;
        int count_upper = 0;
        int count_c = 0;
        int count_c_range = 0;
        for (int i = 0; i < d.length; i++) {
            if (d[i] == 'C') {
                count_c += 1;
            }
            if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            }
            if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            }
            if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            }
        }
        if (count_c_range != 1 || count_c_range != count_c) {
            answer = false;
        }
        if (count_upper != 2) {
            answer = false;
        }
        System.out.println(answer ? "AC" : "WA");
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String B = scan.next();
        char[] d = B.toCharArray();
        boolean answer = true;
        int count_upper = 0;
        int count_c = 0;
        int count_c_range = 0;
        for (int i = 0; i < d.length; i++) {
            if (d[i] == 'C') {
                count_c += 1;
            }
            if (i == 0) {
                if (d[i] != 'A') {
                    answer = false;
                    break;
                }
            }
            if (2 <= i && i <= d.length - 2) {
                if (d[i] == 'C') {
                    count_c_range += 1;
                }
            }
            if (0 <= d[i] - 'A' && d[i] - 'A' <= 25) {
                count_upper += 1;
            }
        }
        if (count_c_range != 1 || count_c_range != count_c) {
            answer = false;
        }
        if (count_upper != 2) {
            answer = false;
        }
        System.out.println(answer ? "AC" : "WA");
    }
}
