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:
#文字列を入力
s = input()
sub_s = s[2:len(s)-1]
#先頭がA
res = s[0] == "A"
#先頭から3文字目～最後から2文字目間にC
res = sub_s.count("C") == 1
if res:
    index = sub_s.index("C") + 2
    #A,C以外小文字
    res = s[1:index].islower() and s[index+1:] .islower()
#出力
print("AC" if res else "WA")

Submission status: Wrong Answer

Solution code:
#文字列を入力
s = input()
sub_s = s[2:len(s)-1]

#先頭がA
res = s[0] == "A"
#先頭から3文字目～最後から2文字目間にC
res = sub_s.count("C") == 1
if res:
    index = s.index("C")
    #A,C以外小文字
    res = s[1:index].islower() and s[index+1:] .islower()

#出力
print("AC" if res else "WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
c=0
if s[0]!='A' or s[0].isupper()==False:
  print("WA")
else:
  for i in range(3,len(s)-1):
    if s[i]=='C' and s[i].isupper()==True:
      c+=1
  if c==1:
    print("AC")
  else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
c=0
if s[0]!='A':
  print("WA")
else:
  for i in range(3,len(s)-1):
    if s[i]=='C':
      c+=1
  if c==1:
    print("AC")
  else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main() -> None:
    s = next_str()
    print(("WA", "AC")[judge(s)])


def judge(s: str) -> bool:
    flg = False
    n = len(s)

    for i in range(n):
        if i == 0 and s[i] != 'A':
            return False
        elif 2 <= i < n - 1 and s[i] == 'C' and not flg:
            flg = True
        elif s[i] != s[i].lower():
            return False

    if not flg:
        return False
    return True


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = list(input())

def conditionA(s_list):
    return s[0] == "A"

def conditionC(s_list):
    return "C" in s_list[2:-2]

def conditionLower(s_list):
    return sum([e.isupper() for e in s_list]) == 2

if conditionA(s) and conditionC(s) and conditionLower(s):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=input()
c=0
if a[0]=="A":
    for x in a[2:-1]:
        if (x == "C"):
            c += 1
    if c == 1:
        a= a.replace("C","")
        a= a.replace("A","")
        if a.islower():
            print("AC")
    else :
        print("WA")
else :
    print ("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] == 'A':
 S.pop(0)
 length = len(S)
 tmp = S
 if len(tmp) != 1:
  a = tmp[length-1]
  b = tmp[0]
  del tmp[length-1]
  del tmp[0]
 if tmp.count('C') == 1:
  tmp.remove('C')
  if str(tmp).islower() == True:
   if len(tmp) != 1:
    if str(a).islower() == True and b.islower() == True:
     print('AC')
  else:
   print('WA')
 else:
  print('WA')
else:
 print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] == 'A':
 S.pop(0)
 length = len(S)
 tmp = S
 a = tmp[length-1]
 b = tmp[0]
 del tmp[length-1]
 if len(tmp) != 1:
  del tmp[0]
 if tmp.count('C') == 1:
  tmp.remove('C')
  if str(tmp).islower() == True and str(a).islower() == True and b.islower() == True:
   print('AC')
  else:
   print('WA')
 else:
  print('WA')
else:
 print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] == 'A':
 S.pop(0)
 length = len(S)
 tmp = S
 a = tmp[length-1]
 b = tmp[0]
 del tmp[length-1]
 del tmp[0]
 if tmp.count('C') == 1:
  tmp.remove('C')
  if str(tmp).islower() == True and str(a).islower() == True and b.islower() == True:
   print('AC')
  else:
   print('WA')
 else:
  print('WA')
else:
 print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] == 'A':
 S.pop(0)
 length = len(S)
 tmp = S
 a = tmp[length-1:length]
 b = tmp[0]
 del tmp[length-1:length]
 del tmp[0]
 if tmp.count('C') == 1:
  tmp.remove('C')
  if str(tmp).islower() == True and str(a).islower() == True and b.islower() == True:
   print('AC')
  else:
   print('WA')
 else:
  print('WA')
else:
 print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] == 'A':
 S.pop(0)
 length = len(S)
 tmp = S
 del tmp[length-1:length]
 del tmp[0]
 if tmp.count('C') == 1:
  tmp.remove('C')
  if str(tmp).islower() == True and str(S[length-1:length]).islower() == True and S[0].islower == True:
   print('AC')
  else:
   print('WA')
 else:
  print('WA')
else:
 print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] == 'A':
 S.pop(0)
 length = len(S)
 tmp = S
 del tmp[length-1:length]
 del tmp[0]
 if tmp.count('C') == 1:
  S.remove('C')
  if str(S).islower() == True:
   print('AC')
  else:
   print('WA')
 else:
  print('WA')
else:
 print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] == 'A':
 S.pop(0)
 length = len(S)
 if S[1] == 'C' and S[length-1] == 'C':
  S.pop(length-1)
  S.pop(0)
  if S.islower() == True:
   print('AC')
  else:
   print('WA')
 else:
  print('WA')
else:
 print('WA')

Submission status: Wrong Answer

Solution code:
import string

def accepted(s):
    if s[0] != 'A':
        return "WA"
    if s[1] == 'C':
        return "WA"
    if s[-1] == 'C':
        return "WA"
    c = 0
    for ss in s[2:-1]:
        if ss == 'C':
            c += 1
        elif ss not in string.ascii_lowercase:
            return "WA"
    if c != 1:
        return "WA"
    return "AC"

s = input()
print(accepted(s))

Submission status: Wrong Answer

Solution code:
S = input()
if S.startswith('A'):
    if S[2:-1].count('C') == 1:
        str = S[1] + S[2:-1].replace('C','c') + S[-1]
        if str.islower():
            print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
Supper = [s for s in S if s.isupper()]
len = len(S)
if 'C' in S[2:len-1]:
    if S[0] == 'A':
        if Supper == ['A','C']:
            print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
Supper = [s for s in S if s.isupper()]
if 'C' in S[2:-1]:
    if S[0] == 'A':
        if Supper == ['A','C']:
            print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
if 'C' in S[2:-1]:
    indC = S[2:-1].index('C')
else:
    indC = -1

if((S[0]=='A') and (indC !=-1)):
    del S[indC]
    del S[0]
    if [s for s in S if s.isupper()] == []:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
if 'C' in S[2:-1]:
    C = S[2:-1].index('C')
else:
    C = -1
if(S[0]=='A' and C!=-1):
    S.pop(0)
    S.pop(C+1)
    print(S)
    if [s for s in S if s.isupper()] == []:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
for i in range(2, len(S) - 2):
    if S[0] == 'A' and S[i] == 'C' and (S[1:i] + S[i + 1:len(S) - 1]).islower():
        print('AC')
        exit()
print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
for i in range(2, len(S) - 2):
    if S[0] == 'A' and S[i] == 'C' and (S[1:i - 1] + S[i + 1:len(S) - 1]).islower():
        print('AC')
        exit()
print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
if (S[0] + S[2]).isupper() and (S[1] + S[3:]).islower():
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
k = 0
if S[0] == 'A' and S[2:-1].count('C') == 1:
    for i in range(len(S)):
        if S[i].isupper():
            if k == 2:
                print('WA')
                break
            k += 1
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
if s[0] == 'A':
    ans += 1
cnum = 0
for i in range(2,len(s)):
    if s[i] == 'C':
        cnum += 1
if cnum == 1:
    ans += 1
hantei = 0
for i in range(len(s)):
    if s[i].islower():
        pass
    else:
        hantei += 1
if hantei == 2:
    ans += 1
if ans == 3:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == 'A' and s[2:].count('C') == 1:
    i = s.index('C') # Cの0オリジンで探してその場所を代入
    #print(i)
    ss = s[1:i] + s[i+1:] #全体の2文字目（1オリジン）からi番目までと、iのあとの末尾までの文字判定
    if ss.islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

for i in range(len(s)):
    if i == 0:
        if s[i] == 'A':
            continue
        else:
            print("WA")
            break
    elif i == 2:
        if s[i] == 'C':
            continue
        else:
            print("WA")
            break
    elif i == len(s)-1:
        if s[i] != 'C':
            continue
        else:
            print("WA")
            break
    else:
        if s[i].islower():
            continue
        else:
            print("WA")
            break
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
S = input()
print(S[2:-1])
if S[0] == "A":
    if "C" in S[2:-1] and S[2:-1].find("C") == S[2:-1].rfind("C"):
        S = S.replace("A","a",1)
        S = S.replace("C","c",1)
        if S == S.lower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
from collections import Counter
S = list(input())

if S[0] == 'A':
    #if int(S[:3].count('C')) + int(S[-2:].count('C'))  == 1:
    if S[2:-1].count('C') == 1:
        del S[-2]
        del S[2]
        del S[0]
        s = ''.join(S)
        if s.islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
from collections import Counter
S = list(input())

if S[0] == 'A':
    print(S[1:-1])
    #if int(S[:3].count('C')) + int(S[-2:].count('C'))  == 1:
    if S[1:-1].count('C') == 1:
        del S[-2]
        del S[2]
        del S[0]
        s = ''.join(S)
        if s.islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
from collections import Counter
S = list(input())

if S[0] == 'A':
    if int(S[:3].count('C')) + int(S[-2:].count('C'))  == 1:
        del S[-2]
        del S[2]
        del S[0]
        s = ''.join(S)
        if s.islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
from collections import Counter
S = list(input())

if S[0] == 'A':
    if [S[2:-2]].count('C') == 1:
        del S[-2]
        del S[2]
        del S[0]
        s = ''.join(S)
        if s.islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
from collections import Counter
S = list(input())

if S[0] == 'A':
    if [S[2],S[-2]].count('C') == 1:
        del S[-2]
        del S[2]
        del S[0]
        s = ''.join(S)
        if s.islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == "A" and s[2:-1] in "C":
  i = s.index("C")
  ss = s[1:i] + s[i+i:]
  if ss.islower() == True:
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == "A" and s[2:-1] in "C":
  i = s.index("C")
  ss = s[1:i] + s[i+i:]
  if ss.islower():
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
sa = s.find("A")
sc = s.find("C")
scr = s.rfind("C")
if sa == 0 and sc == scr and 2 <= sc <= len(s) -3:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S=input()
t= [str(c) for c in S]
flag=0
#S の先頭の文字は大文字の A である。
if t[0]!="A":
    flag=1
b=0
i=0
#S の先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1 個含まれる。
for i in range(2,len(t)-2):
    if t[i]=="C":
        b += 1
if b!=1:
    flag=1
#以上の A, C を除く S のすべての文字は小文字である。
i=0
for i in range(len(t)):
    if t[i]=="A" or t[i]=="C" :
        continue
    elif ord(t[i])>90:
        continue
    else:
        flag=1
        break

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

Submission status: Wrong Answer

Solution code:
S=input()
t= [str(c) for c in S]
print(t)
flag=0
#S の先頭の文字は大文字の A である。
if t[0]!="A":
    flag=1
b=0
i=0
#S の先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1 個含まれる。
for i in range(2,len(t)-2):
    if t[i]=="C":
        b += 1
if b!=1:
    flag=1
#以上の A, C を除く S のすべての文字は小文字である。
i=0
for i in range(len(t)):
    if t[i]=="A" or t[i]=="C" :
        continue
    elif ord(t[i])>90:
        continue
    else:
        flag=1
        break

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

Submission status: Wrong Answer

Solution code:
word = input()
result="AC"
ccount = 0
for i, c in enumerate(word):
    if c.islower():
        continue
    if c == 'A' and i == 0:
        continue
    if c == 'C' and i > 1 and i < len(word) - 1 and ccount == 0:
        ccount = 1
        continue
    result = "WA"
    break
if ccount == 0:
    result = "WA"
print(result)

Submission status: Wrong Answer

Solution code:
word = input()
result="AC"
ccount = 0
for i, c in enumerate(word):
    if c.islower():
        continue
    if c == 'A' and i == 0:
        continue
    if c == 'C' and i > 1 and i < len(word) - 3 and ccount == 0:
        ccount = 1
        continue
    result = "WA"
    break
if ccount == 0:
    result = "WA"
print(result)

Submission status: Wrong Answer

Solution code:
word = input()
result="AC"
ccount = 0
for i, c in enumerate(word):
    if c.islower():
        continue
    if c == 'A' and i == 0:
        continue
    if c == 'C' and i > 2 and i < len(word) - 3 and ccount == 0:
        ccount = 1
        continue
    result = "WA"
    break
if ccount == 0:
    result = "WA"
print(result)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

fulfill = True

if S[0] != "A":
    fulfill = False
elif ("C" not in S) or (S[len(S)-1] == "C") or (S[len(S)-1] == S[len(S)-1].upper):
    fulfill = False
else:
    allsmall = True
    countC = 0
    if S[1] == "C" or S[1] == S[1].upper:
        fulfill = False
    else:
        for i in range(2,len(S)):
            if S[i] == "C":
                countC += 1
            elif S[i] == S[i].upper:
                allsmall = False
                #print(S[i])
            else:
                continue
        if countC == 1 and allsmall:
            fulfill = True
            #print("cvfs")
        else:
            fulfill = False
            #print("jio")


#print("countC:",countC)
#print(allsmall)

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

Submission status: Wrong Answer

Solution code:
S = input()

fulfill = True

if S[0] != "A":
    fulfill = False
elif ("C" not in S) or (S[len(S)-1] == "C"):
    fulfill = False
else:
    allsmall = True
    countC = 0
    if S[1] == "C" or S[1] == S[1].upper:
        fulfill = False
    else:
        for i in range(2,len(S)):
            if S[i] == "C":
                countC += 1
            elif S[i] == S[i].upper:
                allsmall = False
                #print(S[i])
            else:
                continue
        if countC == 1 and allsmall:
            fulfill = True
            #print("cvfs")
        else:
            fulfill = False
            #print("jio")


#print("countC:",countC)
#print(allsmall)

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

Submission status: Wrong Answer

Solution code:
S = input()

fulfill = True

if S[0] != "A":
    fulfill = False
elif ("C" not in S) or (S[len(S)-1] == "C"):
    fulfill = False
else:
    allsmall = True
    countC = 0
    if S[1] == "C" or S[1] == S[1].upper:
        fulfill = False
    else:
        for i in range(1,len(S)):
            if S[i] == "C":
                countC += 1
            elif S[i] == S[i].upper:
                allsmall = False
                #print(S[i])
            else:
                continue
        if countC == 1 and allsmall:
            fulfill = True
            #print("cvfs")
        else:
            fulfill = False
            #print("jio")


#print("countC:",countC)
#print(allsmall)

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

Submission status: Wrong Answer

Solution code:
S = input()

fulfill = True

if S[0] != "A":
    fulfill = False
elif ("C" not in S) or (S[len(S)-1] == "C"):
    fulfill = False
else:
    allsmall = True
    countC = 0
    for i in range(1,len(S)):
        if S[i] == "C":
            countC += 1
        elif S[i] == S[i].upper:
            allsmall = False
            #print(S[i])
        else:
            continue
    if countC == 1 and allsmall:
        fulfill = True
        #print("cvfs")
    else:
        fulfill = False
        #print("jio")


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

Submission status: Wrong Answer

Solution code:
s = list(input())
if s[0] == "A":
  C = []
  for i in range(2, len(s)-2):
    if s[i] == "C":
      C.append(i)
  if len(C) != 1:
    print("WA")
  else:
    up = False
    for j in range(1,len(s)):
      if j == C[0]:
        continue
      elif not s[j].islower():
        up = True
    if up:
      print("WA")
    else:
      print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
if s[0] == "A":
  C = []
  for i in range(2, len(s)-2):
    if s[i] == "C":
      C.append(i)
  if len(C) != 1:
    print("WA")
  else:
    up = False
    for j in range(1,len(s)):
      if j == C[0]:
        continue
      elif s[j].isupper():
        up = True
    if up:
      print("WA")
    else:
      print("AC")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re
print('YES') if re.match(r'A[a-z]+C[a-z]+', input()) else print('NO')

Submission status: Wrong Answer

Solution code:
S = input()
s = S[2:-1]
r = S.replace('A', '')
r = r.replace('C', '')

if S[0] != 'A' or s.count('C') != 1 or r.lower():
    print('WA')
else:
    print('AC')

Submission status: Wrong Answer

Solution code:
s = list(input())

flag = True
if s[0] != "A":
    flag = False

ss = s[2:-1]
# print(ss)
if ss.count("C") != 1:
    flag = False
for si in s:
    if si != "A" or si != "C":
        if si.islower() != True: 
            flag = False
print("AC" if flag else "WA")

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
if s[0]!='A':print('WA')
else:
  c=0
  for i in range(2,n-1):
    if s[i]=='C':c+=1
  if c!=1:print('WA')
  else:
    t=list(s)
    t.remove('A')
    t.remove('C')
    u=s
    s.lower()
    if s==u:print('AC')
    else:print('WA')

Submission status: Wrong Answer

Solution code:
#coding:utf-8
s = input()

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

cnt = 0
print (s[2:-1])
for char in s[2:-1]:
    if char=='C':
        cnt += 1
if cnt!=1:
    print ('WA')
    exit()

cnt_upper = 0
for char in s:
    cnt_upper += char.isupper()
if cnt_upper != 2:
    print ('WA')
    exit()

print ('AC')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
B - AcCepted
https://beta.atcoder.jp/contests/abc104/tasks/abc104_b

"""
import sys
from sys import stdin
input = stdin.readline


def solve(S):
    result = 'AC'
    if S[0] != 'A':
        result = 'WA'
    if S[2:-2].count('C') != 1:
        result = 'WA'
    S = S[1:2] + S[2:-2].replace('C', 'c') + S[-2:]
    if not S.islower():
        result = 'WA'
    return result


def main(args):
    S = input().strip()
    ans = solve(S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Wrong Answer

Solution code:
s = input()
part_of_s = s[2:-2]
sub_s = s.replace('A','')
sub_s = sub_s.replace('C','')

if s[0] != 'A' or part_of_s.count('C') != 1 or sub_s != sub_s.lower():
    print('WA')
    exit()

print('AC')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
cnt = 0
s = input()
if s[0]=="A" and "C" in s[2:-1] and s[-1] != "c":
    for i in s:
        if "A" <= i <= "Z":
            cnt +=1
    if cnt == 2:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
ACFlag = True

def isOnlyC(str):
    if str.count('C') == 1 : return False
    elif str.find('C') < 2 : return False
    elif str.find('C') == len(str) - 1 : return False
    else: return True

def isLowerAC(str):
    str.replace('A', 'a')
    str.replace('C', 'c')
    return str.islower()

if S[0] != 'A': ACFlag = False
elif isOnlyC(S) : ACFlag = False
elif isLowerAC(S) : ACFlag = False

if ACFlag : print('AC')
else : print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!='A':
    print('WA')
elif s[1].isupper():
    print('WA')
elif s[-1].isupper():
    print('WA')
else:
    C=0
    s=s[2:-1]
    for c in s:
        if c=='C':
            C+=1
            if not C>1:
                print('WA')
                break
    if C==1:
        print('AC')
    elif C==0:
        print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!='A':
    print('WA')
elif s[1].isupper():
    print('WA')
elif s[-1].isupper():
    print('WA')
else:
    C=0
    s=s[2:-1]
    for c in s:
        if c=='C':
            C+=1
            if not C>1:
                print('WA')
                break
    if C==1:
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S=input()
if S.find('A')==0 and len(S)-2>=S.find('C')>=2:
	S=S.replace('A','a',1)
	S=S.replace('C','c',1)
	if S.islower():
		print('Yes')
	else:
		print('No')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
S=input()
if S.find('A')==0 and S.find('C')>=2:
	S.strip('A')
	S.strip('C')
	if S.islower:
		print('Yes')
	else:
		print('No')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
S=input()
if S.find('A')==0 and S.find('C')>=2:
  S.strip('A')
  S.strip('C')
  if S.islower:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!='A':
    print('WA')
elif s[1].isupper():
    print('WA')
elif s[-1].isupper():
    print('WA')
else:
    C=0
    s=s[2:-1]
    for c in s:
        if c=='C':
            C+=1
            if C>1:
                print('WA')
                break
    if C==1:
        print('AC')

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!='A':
    print('WA')
elif s[1].isupper():
    print('WA')
else:
    C=0
    s=s[2:]
    for c in s:
        if c=='C':
            C+=1
            if C>1:
                print('WA')
                break
        elif c.isupper():
            print('WA')
            break
    if C==1:
        print('AC')

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == 'A':
    S = 'a' + S[1:]
    print(S)
    if S[2:-1].count('C') == 1:
        S = S[:S.index('C')] + 'c' + S[S.index('C')+1:]
        print(S)
        if S.islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
ans = 'WA'
if S[0]=='A':
    if S[2:-1].count('C')==1:
        S = S.replace('A','')
        S = S[:2]+S[2:-1].replace('C','')
        for c in S:
            if c<'a' or 'z'<c:
                ans = 'WA'
            else:
                ans = 'AC'
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == "A" and s[2] == "C":
    s = s[1]+s[3:]
    if s == s.lower():
        print("AC")
        quit()
print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
if "A" != s[0]:
    print("WA")
    exit()
s_extracted = s[2:-1]
if s_extracted.count("C") != 1:
    print("WA")
    exit()
else:
    # Get Upper characters without "C"
    s_upper = [
        chara for chara in s
        if chara != "C" and chara != "C" and chara.isupper()
    ]
    if len(s_upper) > 0:
        print("WA")
        exit()
print("AC")

Submission status: Wrong Answer

Solution code:
s = list(input()) 
if "A" != s[0]:
    print("WA")
    exit()
s_extracted = s[2:-1]
if s_extracted.count("C") != 1:
    print("WA")
    exit()
else:
    # Get Upper characters without "C"
    s_extracted_upper = [
        chara for chara in s_extracted if chara != "C" and chara.isupper()
    ]
    if len(s_extracted_upper) > 0:
        print("WA")
        exit()
print("AC")

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
t=list(input())

if t[0]=="A" and not t[1]=="C" and not t[-1]=="C":
    rs=1
else:
    rs=0

if t[1].isupper()==True or t[-1].isupper()==True:
    rs -=1

del t[:2]
del t[-1]

if not t.count("C")==1:
    rs -=1

if rs==1:
    t.remove("C")

for i in t:
    if i.isupper()==True:
        rs -=1

if rs==1:
    print("AC")
else:
    print("WA")

print(rs)

Submission status: Wrong Answer

Solution code:
t=list(input())

if t[0]=="A" and not t[1]=="C" and not t[-1]=="C":
    rs=1
else:
    rs=0

if t[1].isupper==True or t[-1].isupper==True:
    rs -=1

del t[:2]
del t[-1]

if not t.count("C")==1:
    rs -=1

if rs==1:
    t.remove("C")

for i in t:
    if i.isupper()==True:
        rs -=1

if rs==1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
t=list(input())

if t[0]=="A" and not t[1]=="C" and not t[-1]=="C":
    rs=1
else:
    rs=0

del t[:2]
del t[-1]

if not t.count("C")==1:
    rs -=1

if rs==1:
    t.remove("C")

for i in t:
    if i.isupper()==True:
        rs -=1

if rs==1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import re

s = input()
test = re.match(r"^A[a-z]{2,}C[a-z]+$", s)
if test:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import re

s = input()
test = re.match(r"^A[a-z]C[a-z]*$", s)
if test:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import re

s = input()
test = re.match(r"A[a-z]C[a-z]*", s)
if test:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
	
def isSmall(c):
	return ord(c)>= ord('a') and ord(c)<=ord('z')

# 文字列の入力
s = raw_input()
sl=list(s)

if sl[0]=='A' and sl[2:-2].count('C')==1 and len([c for c in sl if not isSmall(c)] )==2:
	print 'AC'
else:
	print 'WA'

Submission status: Wrong Answer

Solution code:
S=input()
s=list(S)

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

Submission status: Wrong Answer

Solution code:
S=input()
s=list(S)

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

Submission status: Wrong Answer

Solution code:
S=input()
s=list(S)

if s[0]=="A" and s[2:len(s)-3].count("C")==1:
    if S.isupper():
        print("WA")
    else:
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S=input()
s=list(S)

if s[0]=="A" and s[2]=="C" and s[len(s)-3]=="C":
    s[0]="a"
    s[2]="a"
    s[len(s)-3]="a"
    if S.islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S=input()
s=list(S)

if s[0]==" A" and s[2]=="C" and s[len(s)-3]=="C":
    s[0]="a"
    s[2]="a"
    s[len(s)-3]="a"
    if S.islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")