import java.io.IOException;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            boolean flg = false;
            if (s.charAt(0) == 'A') {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            }

            System.out.println(flg ? "AC" : "WA");
        }
    }
} import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            boolean flg = false;
            if (s.charAt(0) == 'A') {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            }

            System.out.println(flg ? "AC" : "WA");
        }
    }
} Main public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            boolean flg = false;
            if (s.charAt(0) == 'A') {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            }

            System.out.println(flg ? "AC" : "WA");
        }
    } main {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            boolean flg = false;
            if (s.charAt(0) == 'A') {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            }

            System.out.println(flg ? "AC" : "WA");
        }
    } try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            boolean flg = false;
            if (s.charAt(0) == 'A') {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            }

            System.out.println(flg ? "AC" : "WA");
        } {
            final String s = reader.readLine();

            boolean flg = false;
            if (s.charAt(0) == 'A') {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            }

            System.out.println(flg ? "AC" : "WA");
        } BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in)) BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in)) new BufferedReader(
                new InputStreamReader(System.in)) final String s = reader.readLine(); s reader.readLine() reader.readLine reader boolean flg = false; flg false if (s.charAt(0) == 'A') {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            } s.charAt(0) == 'A' s.charAt(0) s.charAt s 0 'A' {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            } int cnt = 0; cnt 0 int at = 0; at 0 for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                } int i = 2; int i = 2; i 2 i <= s.length() - 2 i s.length() - 2 s.length() s.length s 2 i++ i++ i {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                } {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                } if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                        cnt++;
                        at = i;
                    } cnt++ cnt at = i at i if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                } cnt == 1 cnt 1 {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                } flg = true flg true for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    } {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    } if (i == at) continue; i == at i at continue; if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        } s.charAt(i) < 'a'  || 'z' < s.charAt(i) s.charAt(i) < 'a' s.charAt(i) s.charAt s i 'a' 'z' < s.charAt(i) 'z' s.charAt(i) s.charAt s i {
                            flg = false;
                            break;
                        } flg = false flg false break; System.out.println(flg ? "AC" : "WA") System.out.println System.out System System.out flg ? "AC" : "WA" flg "AC" "WA" String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            boolean flg = false;
            if (s.charAt(0) == 'A') {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            }

            System.out.println(flg ? "AC" : "WA");
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            boolean flg = false;
            if (s.charAt(0) == 'A') {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            }

            System.out.println(flg ? "AC" : "WA");
        }
    }
} Main
import java.io.IOException;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            boolean flg = false;
            if (s.charAt(0) == 'A') {
                int cnt = 0;
                int at = 0;
                for (int i = 2; i <= s.length() - 2; i++) {
                    if (s.charAt(i) == 'C') {
                        cnt++;
                        at = i;
                    }
                }
                if (cnt == 1) {
                    flg = true;
                    for (int i = 1; i < s.length(); i++) {
                        if (i == at) continue;
                        if (s.charAt(i) < 'a'  || 'z' < s.charAt(i)) {
                            flg = false;
                            break;
                        }
                    }
                }
            }

            System.out.println(flg ? "AC" : "WA");
        }
    }
}
