Problem:


Score : 200 points

Problem Statement

You are given a string S. Each character of S is uppercase or lowercase English letter.
Determine if S satisfies all of the following conditions:

The initial character of S is an uppercase A.

There is exactly one occurrence of C between the third character from the beginning and the second to last character (inclusive).

All letters except the A and C mentioned above are lowercase.

Constraints

4 ≤ |S| ≤ 10 (|S| is the length of the string S.)

Each character of S is uppercase or lowercase English letter.

Input

Input is given from Standard Input in the following format:

S

Output

If S satisfies all of the conditions in the problem statement, print AC; otherwise, print WA.

Sample Input 1

AtCoder

Sample Output 1

AC

The first letter is A, the third letter is C and the remaining letters are all lowercase, so all the conditions are satisfied.

Sample Input 2

ACoder

Sample Output 2

WA

The second letter should not be C.

Sample Input 3

AcycliC

Sample Output 3

WA

The last letter should not be C, either.

Sample Input 4

AtCoCo

Sample Output 4

WA

There should not be two or more occurrences of C.

Sample Input 5

Atcoder

Sample Output 5

WA

The number of C should not be zero, either.



Sample input:
AtCoder


Sample output:
AC

Submission status: Wrong Answer

Solution code:
A=False
S=input()
if S[0]=='A':
  for i in range(1,len(S)-1):
    if i=='C':
      A=True
      break
    else:
      A=False
  if A is True:
    if S.iflower():
      print('AC')
    else:
      print('WA')
  else:
    print('WA')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
ans = "AC"
if s[0] != 'A':
    ans = "WA"
cnt = 0
for i in range(len(s)):
    if s[i].isupper():
        if i == 1 or i!='C' or i==len(s)-1:
            ans = "WA"
        cnt+=1
if cnt!=1:
    ans="WA"
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = "AC"
if s[0] != 'A':
    ans = "WA"
cnt = 0
for i in s[2:-1]:
    if i.isupper() and i!='C':
        ans ="WA"
    elif i=='C':
        cnt +=1

if cnt!=1:
    ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
flag = True
if s[0] != 'A':
    flag = False
cnt = 0
for i in s[2:-1]:
    if i=='C':
        cnt += 1
if cnt!=1:
    flag=False
print("AC"if flag else "WA")

Submission status: Wrong Answer

Solution code:
sml = list("abcdefghijklmnopqrstuvwxyz")
big = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")

s = list(input())

if s[0] != big[0]:
  print("WA")
else:
  bigc = s[2:-1]
  cnt_c = 0
  cnt_big = 0
  for item in bigc:
    if item == "C":
      cnt_c += 1
    elif item in big:
      cnt_big += 1
  if cnt_c == 1 and cnt_big == 0 and s[1] in sml:
    print("AC")
  else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0]=='A' and s[2:-2:].count('C')==1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
flag1 = 0
flag2 = 0
flag3 = 0

if not ('A' in S and 'C' in S):
	print('WA')
	exit() 

if S[0] == 'A':
	flag1 = 1

C_num = 0
for i in range(len(S[2:-2])):
	if S[2+i] == 'C':
		C_num = C_num + 1 
if C_num == 1:
	flag2 = 1

S_list = list(S)
S_list.remove('A')
S_list.remove('C')
if str(S_list).islower():
	flag3 = 1

if flag1 == 1 and flag2 == 1 and flag3 == 1:
	print('AC')
else:
	print('WA')

Submission status: Wrong Answer

Solution code:
N = input()
c = 0
for i, n in enumerate(N):
    if i == 0:
        if not n == "A":
            print("WA")
            exit()
    elif n == 'C':
        if 2<= i and i < len(N) -1:
            c += 1
    else:
        if not 97 <= ord(n) or not ord(n) <= 122:
            print(n, "WA")
            exit()
if c == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
N = input()
c = []
for i, n in enumerate(N):
    if i == 0:
        if not n == 'A':
            print("WA")
            exit()
    elif 2 <= i and i <= len(N) - 1:
        if n == "C":
            c.append(n)
    if not 97 <= ord(n) or not ord(n) <= 122:
        print("WA")
        exit()
if len(c) == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
N = input()
for i, n in enumerate(N):
    if i == 0:
        if not n == 'A':
            print("WA")
            exit()
    elif i == 2:
        if not n == "C":
            print("WA")
            exit()
    else:
        if not 97 <= ord(n) or not ord(n) <= 122:
            print("WA")
            exit()
print("AC")

Submission status: Wrong Answer

Solution code:
s=input();print("WAAC"[s[0]=="A"and 1==s[2:-1].count("C")::2])

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)

if s[0] != "A" or s[1].isupper() or s[2:].count("C") != 1:
    print("WA")
    exit()

for i in range(n):
    if s[i] == "C":
        s1 = s[1:i] + s[i+1:]

if s1.islower():
    print("AC")
else:
    print("WA")
    exit()

Submission status: Wrong Answer

Solution code:
s=input()
import re
if (s[0] == 'A') and ('C' in s[2:-2]) and (re.sub('A|C','',s,2) == re.sub('A|C','',s,2).lower()):
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc104/tasks/abc104_b


def main():
    S = input()
    if S[0] == "A" and S[2:-2].count("C") == 1:
        S = S.replace('A', '', 1).replace('C', '', 1)
        if all(c.islower() for c in S):
            print("AC")
            exit()

    print("WA")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc104/tasks/abc104_b


def main():
    S = input()
    if S[0] == "A" and S[2:-2].count("C") == 1:
        S = S.replace('A', '').replace('C', '')
        if all(c.islower() for c in S):
            print("AC")
            exit()

    print("WA")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 12 15:50:41 2019

@author: shinjisu
"""


import math


def getInt(): return int(input())


def getIntList(): return [int(x) for x in input().split()]


def zeros(n): return [0]*n


def getIntLines(n): return [int(input()) for i in range(n)]


def getIntMat(n):
    mat = []
    for i in range(n):
        mat.append(getIntList())
    return mat


def dmp(x):
    global debug
    if debug:
        print(x)
    return x


# ABC 100 B Ringo's Favorite Numbers
def abc100b():
    D, N = getIntList()
    if N % 100 == 0:
        return (N+1) * 100**D  # WA N==100のとき正しくない 101*100**D
    else:
        return N * 100**D


# ABC 101 B digit sum
def abc101b():
    N = getInt()
    sm = 0
    n = N
    while n > 0:
        sm += n % 10
        n //= 10
    if N % sm == 0:
        return 'Yes'
    else:
        return 'No'


# ABC 102 B Maximum Difference
def abc102b():
    N = getInt()
    A = getIntList()
    return max(A) - min(A)


# ABC 104 B AcCepted
def abc104b():
    S = input()
    WA = 'WA'
    AC = 'AC'
    ALPHABET = [chr(i+ord('a')) for i in range(26)]
    dmp(ALPHABET)

    if S[0] != 'A':
        return dmp(('A',WA))
    cFound = False

    for i in range(1, len(S)):
        if S[i] in ALPHABET:
            pass
        elif S[i] == 'C':
            if i >= 2 and i <= len(S)-2 and not cFound:
                cFound = True
            else:
                return dmp(('C',WA))
    else:
        if cFound:
            return AC
        else:
            return WA


debug = False  # True False
print(abc104b())

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 12 15:50:41 2019

@author: shinjisu
"""


import math


def getInt(): return int(input())


def getIntList(): return [int(x) for x in input().split()]


def zeros(n): return [0]*n


def getIntLines(n): return [int(input()) for i in range(n)]


def getIntMat(n):
    mat = []
    for i in range(n):
        mat.append(getIntList())
    return mat


def dmp(x):
    global debug
    if debug:
        print(x)
    return x


# ABC 100 B Ringo's Favorite Numbers
def abc100b():
    D, N = getIntList()
    if N % 100 == 0:
        return (N+1) * 100**D  # WA N==100のとき正しくない 101*100**D
    else:
        return N * 100**D


# ABC 101 B digit sum
def abc101b():
    N = getInt()
    sm = 0
    n = N
    while n > 0:
        sm += n % 10
        n //= 10
    if N % sm == 0:
        return 'Yes'
    else:
        return 'No'


# ABC 102 B Maximum Difference
def abc102b():
    N = getInt()
    A = getIntList()
    return max(A) - min(A)


# ABC 104 B AcCepted
def abc104b():
    S = input()
    WA = 'WA'
    AC = 'AC'
    ALPHABET = [chr(i+ord('a')) for i in range(26)]
    dmp(ALPHABET)

    if S[0] != 'A':
        return dmp(('alpha',WA))
    cFound = False

    for i in range(1, len(S)):
        if S[i] in ALPHABET:
            pass
        elif S[i] == 'C':
            if i >= 2 and i <= len(S)-3 and not cFound:
                cFound = True
            else:
                return dmp(('C',WA))
    else:
        if cFound:
            return AC
        else:
            return WA


debug = False  # True False
print(abc104b())

Submission status: Wrong Answer

Solution code:
S=str(input)
slist=list(S)
flag=0
if slist[0]!="A":
  flag=1
klist=slist[2:-1]
c=klist.count("C")
if c!=1:
  flag=1
del slist[0]
if "C" in slist:
  slist.remove("C")
SS=""
for x in slist:
  SS+=x
if SS.islower():
  pass
else:
  flag=1
if flag==0:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S=str(input)
slist=list(S)
flag=0
if slist[0]!="A":
  flag=1
klist=slist[2:-1]
c=klist.count("C")
if c!=1:
  flag=1
if flag==0:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
list = []

for i in range(n):
    list.append(s[i])

if list[0] != "A" or list[1].isupper():
    print("WA")
    exit()
else:
    if "C" in list[1:]:
        list.pop(0)
        list.pop(1)
        test = ""
        for j in range(n-2):
            test += list[j]
        if test.islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] != "A":
    print("WA")
    exit()
if s[1].isupper():
    print("WA")
    exit()
if s[-1].isupper() or s[-1] == "C":
    print("WA")
    exit()
flag = False
for c in s[3:]:
    if c == "C":
        if flag:
            print("WA")
            exit()
        else:
            flag = True
    if c.isupper():
        print("WA")
        exit()
if flag:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import sys
s = list(input())

if s[0] != 'A':
    print('WA')
    sys.exit(0)
for i in range(2, len(s) - 1):
    if [i] == 'C':
        s.pop(i)
        break
else:
    print('WA')
    sys.exit(0)

if ''.join(s[1:]) == ''.join(s[1:]).lower():
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import sys
s = list(input())

if s[0] != 'A':
    print('WA')
for i in range(2, len(s) - 1):
    if s[i] == 'C':
        s.pop(i)
        break
else:
    print('WA')
    sys.exit(0)

if ''.join(s[1:]) == ''.join(s[1:]).lower():
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] != 'A':
    print('WA')
    exit()
cnt = 0

for i in range(2, len(s)):
    if s[i] == 'C':
        cnt = cnt + 1

if cnt != 1:
    print('WA')
    exit()
index = 0
for i in range(2, len(s) - 1):
    if s[i] == 'C':
        index = i
        break
# print(index)

test = s[2:index] + s[index + 1:len(s)]
# print(test)

if test.islower():
    print('AC')
else:
    print('WA')
exit()

if index != 2 and index + 1 != len(s) - 1:
    if s[2:index].islower() and s[index + 1:len(s) - 1].islower():
        print('AC')
    else:
        print('WA')

elif index == 2:
    if s[index + 1:len(s) - 1].islower():
        print('AC')
    else:
        print('WA')
else:
    if s[2:index].islower():
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] != 'A':
    print('WA')
    exit()
cnt = 0

for i in range(2, len(s)):
    if s[i] == 'C':
        cnt = cnt + 1

if cnt != 1:
    print('WA')
    exit()
index = 0
for i in range(2, len(s) - 1):
    if s[i] == 'C':
        index = i
        break
# print(index)
# if s[2].isupper():
#     print('WA')
#     exit()
if index != 2 and index + 1 != len(s) - 1:
    if s[2:index].islower() and s[index + 1:len(s) - 1].islower():
        print('AC')
    else:
        print('WA')

elif index == 2:
    if s[index + 1:len(s) - 1].islower():
        print('AC')
    else:
        print('WA')
else:
    if s[2:index].islower():
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] != 'A':
    print('WA')
    exit()
cnt = 0

for i in range(2, len(s)):
    if s[i] == 'C':
        cnt = cnt + 1

if cnt != 1:
    print('WA')
    exit()
index = 0
for i in range(2, len(s) - 1):
    if s[i] == 'C':
        index = i
        break
# print(index)
# if s[2].isupper():
#     print('WA')
#     exit()
if index != 2:
    if s[2:index].islower() and s[index + 1:len(s) - 1].islower():
        print('AC')
    else:
        print('WA')

else:
    if s[index + 1:len(s) - 1].islower():
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

flg = True

if S[0] != 'A':
    flg = False

cnt = 0

for i in range(2, len(S) - 2):
    if S[i] == 'C':
        cnt += 1

if cnt != 1:
    flg = False

cnt = 0

for i in range(len(S)):
    if 'A' <= S[i] <= 'Z':
        cnt += 1

if cnt != 2:
    flg = False

print("AC" if flg else "WA")

Submission status: Wrong Answer

Solution code:
S = input()

flg = True

if S[0] != 'A':
    flg = False

cnt = 0

for i in range(2, len(S) - 2):
    if S[i] == 'C':
        cnt += 1

if cnt != 1:
    flg = False

cnt = 0

for i in range(len(S)):
    if 'A' <= S[i] <= 'C':
        cnt += 1

if cnt != 2:
    flg = False

print("AC" if flg else "WA")

Submission status: Wrong Answer

Solution code:
hoge=input()
no=0
if(hoge[0]=="A"):
  hoge=hoge[1:]
else:
  no=1
    
if(hoge[0].islower()):
  hoge=hoge[1:]
else:
  no=1

if(hoge[-1].islower()):
  hoge=hoge[:-1]
else:
  no=1
if(hoge.count("C")==1):
  hoge=hoge.replace("C","",1)
else:
  no=1

if(hoge.islower() and no==0):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
hoge=input()
no=0
if(hoge[0]=="A"):
  hoge=hoge[1:]
else:
  no=1
    
if(hoge[0].islower()):
  hoge=hoge[1:]
else:
  no=1

if(hoge[-1].islower()):
  hoge=hoge[:-1]
else:
  no=1
  
hoge=hoge.replace("C","",1)

if(hoge.islower() and no==0):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
hoge=input()

if(hoge[0]=="A"):
  hoge=hoge[1:]
    
if(hoge[0].islower()):
  hoge=hoge[1:]

if(hoge[-1].islower()):
  hoge=hoge[:-1]
  
hoge=hoge.replace("C","",1)

if(hoge.islower()):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
hoge=input()

if(hoge[0]=="A"):
  hoge=hoge[1:]
    
if(hoge[-1].islower()):
  hoge=hoge[:-1]
  
hoge=hoge.replace("C","",1)

if(hoge.islower()):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
hoge=input()

if(hoge[0]=="A"):
  if(hoge[-2]=="C"or hoge[2]=="C"):
  	hoge=hoge.replace("A","",1)
  	hoge=hoge.replace("C","",1)
  
if(hoge.islower()):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
hoge=input()

if(hoge[0]=="A" and hoge[2]=="C"):
  hoge=hoge.replace("A","",1)
  hoge=hoge.replace("C","",1)
  
if(hoge.islower()):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = "AC"
if s[0] != "A" or s.count("C") !=1 or s[2:-1].count("C") != 1 or ''.join([i for i in s if i != "A" and i != "C"]).islower != True:
    ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = "AC"
if s[0] != "A" or s.count("C") == s[2:-1].count("C") != 1 or ''.join([i for i in s if i != "A" and i != "C"]).islower == 0:
    ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
count=0
for i in range(len(s)):
    if s[i] == "A":
        if i!=0:
            print("WA")
            exit()
    elif s[i] == "C":
        if 2<=i<=len(s)-2:
            count += 1
            if count >= 2:
                print("WA")
                exit()
        else:
            print("WA")
            exit()
    else:
        if not s[i].islower():
            print("WA")
            exit()
print('AC') if count==1 else print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
count=0
for i in range(len(s)):
    if s[i] == "A":
        if i!=0:
            print("WA")
            exit()
    elif s[i] == "C":
        if 2<=i<=len(s)-2:
            count += 1
            if count >= 2:
                print("WA")
                exit()
    else:
        if not s[i].islower():
            print("WA")
            exit()
print('AC') if count==1 else print('WA')

Submission status: Wrong Answer

Solution code:
S=input()
hoge=S[2:-1]
result=False
if S[0]=="A":
    if "C" in hoge:
        before=S[1:S.find("C")]
        if before==before.lower():
            if S.find("C")<len(S)-1:
                after=S[S.find("C")+1:-1]
                if after==after.lower():
                    result=True
if result==True:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S=input()
hoge=S[2:-1]
result=False
if S[0]=="A":
    if "C" in hoge:
        before=S[1:S.find("C")]
        after=S[S.find("C")+1:-1]
        if before==before.lower() and after==after.lower():
            result=True
if result==True:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S=input()
hoge=S[2:-2]
result=False
if S[0]=="A":
    if "C" in hoge:
        before=S[1:S.find("C")]
        after=S[S.find("C")+1:-1]
        if before==before.lower() and after==after.lower():
            result=True
if result==True:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
f1 = s[0] == "A"
f2 = s[2:-2].count("C") == 1
index = s[2:-2].find("C") + 2
f3 = (s[1:index]+s[index+1:]).lower() == (s[1:index]+s[index+1:])
print("AC" if f1 and f2 and f3 else "WA")

Submission status: Wrong Answer

Solution code:
S = input()
result = "AC"

if S.startswith("A"):

    if not(S.count("C") == 1 and 2 <= S.find("C") <= (len(S)-2)):
        result = "1WA"

    if len(S) == 4:
        if not(S.count("C") == 1 and S.find("C") == 2):
            result = "2WA"

    if result == "AC":
        S = S.replace("A","").replace("C","")
        if not(S.islower()):
            result == "WA"

print(result)

Submission status: Wrong Answer

Solution code:
S = input()
result = "AC"

if S.count("A") == 1 and S.startswith("A"):
    if not(S.count("C") == 1 and 2 <= S.find("C") <= (len(S)-3)):
        result = "WA"

    elif not(S.count("C") == 1 and S.find("C") == 2):
        result = "WA"

    if result == "AC":
        S = S.replace("A","").replace("C","")
        if not(S.islower()):
            result == "WA"

print(result)

Submission status: Wrong Answer

Solution code:
S = input()
result = "WA"

if S.startswith("A"):
    if S.count("C") == 1 and 2 <= S.find("C") <= (len(S)-3):
        S = S.replace("A","").replace("C","")
        if S.islower():
            result = "AC"
    elif S.count("C") == 1 and S.find("C") == 2:
        S = S.replace("A","").replace("C","")
        if S.islower():
            result = "AC"
print(result)

Submission status: Wrong Answer

Solution code:
S = input()
result = "WA"

if S.startswith("A"):
    if S.count("C") == 1 and 2 <= S.find("C") <= (len(S)-3):
        S = S.replace("A","").replace("C","")
        if S.islower():
            result = "AC"
    elif S.find("C") == 2:
        S = S.replace("A","").replace("C","")
        if S.islower():
            result = "AC"
print(result)

Submission status: Wrong Answer

Solution code:
S = input()
result = "WA"

if S.startswith("A"):
    if S.count("C") == 1 and 2 <= S.find("C") <= (len(S)-3):
        S = S.replace("A","").replace("C","")
        if S.islower():
            result = "AC"

print(result)

Submission status: Wrong Answer

Solution code:
s = input()
slist = list(s)
if s[0] == 'A':
    slist[0] = 'a'
    flag = -1
    for i, c in enumerate(s[2:-2]):
        if flag == 1 or flag == -1:
            print("WA")
            exit(0)
        if c == 'C':
            flag += 1
            slist[i+2] = 'c'
    if "".join(slist).islower():
        print("AC")
        exit(0)
print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

if s[0]=="A":
    s_t = s[0:2]
    s_m = s[2:-1]
    s_e = s[-1]
    if s_m.count("C")==1:
        s_m = s_m.replace("C","")
        s = s_t + s_m + s_e
        if s.lower:
            print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import re
s = input()
if re.match(r'A[a-z]+C[a-z]+',s) != None:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import re
s = input()
if re.match(r'A[a-z]C[a-z]*',s) != None:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = list(str(input()))
count = 0
for i in range(len(s)):
    if s[i] == "C":
            count += 1

if s[0] == "A" and "C" in s[2:-1] and count == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = list(str(input()))
count = 0
for i in range(len(s)):
    if s[0] == "A" and "C" in s[2:-1] and s[i] == "C":
            count += 1

if count != 1:
    print("WA")
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = map(int,input().split())|	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = list(map(int,input().split()))	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import collections
def inpl(): return list(map(int, input().split()))

#### START
S = input()

flag = True
if S[0] != "A":
  flag = False
if S[2:-1].count("C") != 1:
  flag = False

if flag:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!="A":
  print("WA")
  exit()
s=s[1:]
count_C=0
for i in range(len(s)):
  if s[i]=="C":
    count_C+=1
if count_C!=1:
  print("WA")
  exit()
s=s.replace("C","")
if not s.islower():
  print("WA")
  exit()
print("AC")

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!="A":
  print("WA")
  exit()
s=s[1:]
count_C=0
for i in range(len(s)):
  if s[i]=="C":
    count_C+=1
if count_C!=1:
  print("WA")
  exit()
s.replace("C","")
if not s.islower():
  print("WA")
  exit()
print("AC")

Submission status: Wrong Answer

Solution code:
s = list(map(str,input()))
ans = 0
if s[0] == "A":
    ans += 1
S = (s[2:-1])
c = 0
cp = 0
for i in range(len(S)):
    if S[i] == "C":
        c += 1
        cp = i
if c == 1:
    ans += 1
isl = 0
for i in range(len(s)):
    if i == 0 or i == cp+2:
        pass
    else :
        if s[i].islower():
            isl += 1
if isl == len(s)-2:
    ans += 1
if ans == 3:
    print("AC")
else :
    print("WC")

Submission status: Wrong Answer

Solution code:
S=input()
if(S[0]=='A'):
  S_1=S[1:]
else:
  print('WA')
  exit()
if(S[2:(len(S)-1)].count('C')==1):
  S_2=S_1[0:len(S_1)-1].replace('C','')
else:
  print('WA')
  exit()
S_3=S_2+S[-1]
#print(S_3)
print('AC' if (S_3.islower) else 'WA')

Submission status: Wrong Answer

Solution code:
S=input()
if(S[0]=='A'):
  pass
else:
  print('WA')
  exit()
if(S[2:(len(S)-2)].count('C')==1):
  pass
else:
  print('WA')
  exit()
S_1=S.replace('A','')
S_2=S_1.replace('C','')
print('AC' if (S_2.islower) else 'WA')

Submission status: Wrong Answer

Solution code:
S=input()
if(S[0]=='A'):
  pass
else:
  print('WA')
  exit()
if(S[2:(len(S)-1)].count('C')==1):
  pass
else:
  print('WA')
  exit()
S_1=S.replace('A','')
S_2=S_1.replace('C','')
print('AC' if (S_2.islower) else 'WA')

Submission status: Wrong Answer

Solution code:
s=input()
if(s[0]=='A'):
    if(s.count('C',2)==1):
        s=s.replace('C','')
        if(s[1:].islower()):
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
ss=[]
if(s[0]=='A'):
    if('C' in s[2:-1]):
        s=s.replace('C','')
        if(s[1:].islower()):
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys

S = input()
if S[0] != 'A':
    print('WA')
    sys.exit(0)
re = len(list(filter( lambda x: x == 'C', S[2:-1])))
if re == 1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys

S = input()
re = len(list(filter( lambda x: x == 'C', S[2:-1])))
if re == 1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    if S[0] != 'A':
        print('WA')
        exit()
    if S[2:-1].count('C') != 1:
        print('WA')
        exit()
    s = S
    S[0].lower()
    S[S[2:-1].index('C')].lower()
    if s != S:
        print('WA')
        exit()
    print('AC')


main()

Submission status: Wrong Answer

Solution code:
""" AtCoder """

S = input()
count = 0

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        for c in S:
            if c.isupper():
                count += 1
        if count == 2:
            print("AC")
            exit()
print("WA")

print(S[2:-1])

Submission status: Wrong Answer

Solution code:
""" AtCoder """

import sys
input = sys.stdin.readline

S = input()
count = 0

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        for c in S:
            if c.isupper():
                count += 1
        if count == 2:
            print("AC")
            exit()
print("WA")

Submission status: Wrong Answer

Solution code:
""" AtCoder """

import sys
input = sys.stdin.readline

S = input()

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        a = S[1:-1].replace('C', 'c') + S[-1:]
        if a.islower():
            print("AC")
            exit()
print("WA")

Submission status: Wrong Answer

Solution code:
""" AtCoder """

import sys
input = sys.stdin.readline

S = input()

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        if S[1:].replace('C', 'c').islower():
            print("AC")
            exit()
print("WA")

Submission status: Wrong Answer

Solution code:
""" AtCoder """

import sys
input = sys.stdin.readline

S = input()

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        if S[1:-1].replace('C', 'c').islower():
            print("AC")
            exit()
print("WA")

Submission status: Wrong Answer

Solution code:
""" AtCoder """

import sys
input = sys.stdin.readline

S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1:
    if S[1:-1].replace('C', 'c').islower():
        print("AC")
        exit()
print("WA")

Submission status: Wrong Answer

Solution code:
""" AtCoder """

import sys
input = sys.stdin.readline

S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1:
    count = 0
    for c in S:
        if c.isupper():
            count += 1
    if count == 2:
        check = True
    else:
        check = False
else:
    check = False

if check:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
""" AtCoder """

import sys
input = sys.stdin.readline

S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1:
    S[0].replace('A', 'a')
    S[2:-1].replace('C', 'c')
    if S.islower:
        check = True
    else:
        check = False
else:
    check = False

if check:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
""" AtCoder """

import sys
input = sys.stdin.readline

S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1 and S.replace('A', 'a').replace('C', 'c').islower():
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
""" AtCoder """

import sys
input = sys.stdin.readline

S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1 and S.replace('A', '').replace('C', '').islower():
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
cnt = 0
if S[0] == "A":
  cnt += 1
  del S[0]
if  "C" in S[1:-2]:
  cnt += 1
  S.remove("C")
if  "C" in S[1:-2]:
  cnt -= 1
  S.remove("C")
if ("".join(S)).islower():
  cnt += 1
if cnt == 3:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
ans = "WA"
if s[0] == "A":
    if s[2:-1].count("C") == 1:
        a = s.index("C")
        if s[1:a].islower and s[a+1:].islower :
            ans = "AC"
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] == "A":
    if s[2:-1].count("C") == 1:
        a = s.index("C")
        if s[1:a].islower and s[a+1:].islower :
            print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import re
S = input()
if (S[0] == 'A'):
	if (S[2:-2].count('C') == 1):
		if (len(re.findall('[A-Z]', S)) == 2):
			print('AC')
			exit()
print('WA')

Submission status: Wrong Answer

Solution code:
a = input()
A = 0
if a[0] == "A" and a[1].isupper() == False:
    for i in range(2,len(a)-1):
        if a[i] == "C" and A == 0:
	        A = 1
        elif a[i].isupper() == True:
            A = 2
if A == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
a = input()
A = 0
if a[0] == "A":
  for i in range(2,len(a)-1):
    if a[i] == "C" and A == 0:
	    A = 1
    elif a[i].isupper() == True:
        A = 2
if A == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()
def LIR(n): return [LI() for i in range(n)]

#A
s = S()
if s[0] != "A":
    print("WA")
else:
    count = 0
    for i in range(2,len(s)-1):
        if s[i] == "C": count += 1
    if count != 1:
        print("WA")
    else:
        for i in range(len(s)):
            if s[i] not in "AC":
                if s[i] == s[i].upper():
                    print("WA")
                    break
        print("AC")
#B

#C

#D

#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Wrong Answer

Solution code:
s=input()
ans='WA'
if s[0]=='A':
  if s[2:-1].count('C')==1:
    c=s.index('C')
    if s[1:c].islower() and s[c+1:].islower:
      ans='AC'
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
ans='WA'
if s[0]=='A':
  if s[2:-1].count('C')==1:
    c=s.index('C')
    if s[1:c].islower() and s[c:].islower:
      ans='AC'
print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input().rstrip())

if S[0] == 'A':
	S[0] = 'a'
	cnt = 0
	flag = True
	for i, s in enumerate(S[2:-2]):
		if s == 'C':
			cnt += 1
			if flag:
				S[2+i] = 'c'
				flag = False
	if cnt == 1 and ''.join(S).islower():
		print('AC')
		exit(0)

print('WA')

Submission status: Wrong Answer

Solution code:
import re

s = input()
if s[0] != "A":
    print("WA")
elif s[2:-1].count("C") != 1:
    print("WA")
else:
    i = 2 + s[2:-1].index("C")
    print("WA" if re.match("[A-Z]", s[1] + s[2:i] + s[i+1:]) else "AC")