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:
def check(s):
    t=True
    if s[0]!="A" :
        t=False
        #print("reached")
    a=s[:len(s)-1]
    count=0
    for i in range(len(a)):
        if a[i]=="C":
            count+=1
    if count!=1:
        t=False
    alph="BDEFGHIJKLMNOPQRSTUVWXYZ"
    for i in range(24):
        if alph[i] in s:
            t=False
            break
    if t:
        print("AC")
    else:
        print("WA")
s=input()
check(s)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def check(str):
	cnt = 0
	for s in str:
		if s.islower():
			cnt += 1
	return cnt == len(str) - 1 and str.find('C') != -1

S = input()

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

Submission status: Wrong Answer

Solution code:
def main():
    S = raw_input()

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

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i = input()

flag = 0

if i[0] is not "A":
    flag = 1

if i[2:-2].count("C") > 1 or i[2:-2].count("C") == 0:
    flag = 1

for j in range(65,26+65):
    if chr(j) == i[1]:
        flag = 1

i = i[1:].replace("C","")+i[-1]
for j in range(65,26+65):
    if chr(j) in i:
        flag = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

cA = S[0:1] == "A"
cC = False
if(S[2:-1].find("C") != -1 and S[2:-1].count("C") == 1):
    S = S[1:2] + S[2:-1].strip("C") + S[-1:]
    cC = S.islower()
if(cA and cC):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
smalls = "abcdefghijklmnopqrstuvwxyz"
def solve(s):
    count = 0
 
    if s[0] != "A":
        return False
 
    if s[1] not in smalls:
        return False
    for char in s[2:-1]:
        if char == "C":
            count += 1
            continue
 
        if char not in smalls:
            return False
    if count != 1:
        return False
    return True

if solve(s):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import sys

s = input()

hasC = False
for i in range(len(s)):
    if i == 0 and s[i] == 'A':
        continue
    if i >= 2 and i <= len(s)-2 and s[i] == 'C' and not hasC:
        hasC = True
        continue
    if s[i].islower(): continue

    print("WA")

    sys.exit()


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

Submission status: Wrong Answer

Solution code:
S = input()
SL = [x for x in S]

ok = S[0] == "A"
SL[0] = "a"

ok = S[2:-1].count("C") == 1
cpos = S[2:-1].find("C")

if cpos != -1:
    SL[2+cpos] = "c"

for c in SL:
    ok = ok and not c.isupper()

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

Submission status: Wrong Answer

Solution code:
s=input()

if s[0]=="A" and s[2]=="C":
    s2=s.lower()
    if s[1]==s2[1] and s[3:-1]==s2[3:-1]:
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
count = 0

for i in s:
    if ord("A") <= ord(i) <= ord("Z"):
        count += 1
else:
    if s.count("C") == 0:
        print("WA")
        exit()
    if s[0] == "A" and 2 <= s.index("C") <= len(s)-3 and count == 2:
        print("AC")
    else:
        print("WA")

Submission status: Wrong Answer

Solution code:
s = str(input())

s1 = s[0]

if len(s) <= 4:
    df = len(s)
else:
    df = len(s) - 1

for i in range(2, df):
    if s[i] == 'c' or s[i] == 'C':
        s1 += s[i]

    else:
        continue

if s1.isupper() and 'C' in s1:
    print('AC')

else:
    print('WA')

Submission status: Wrong Answer

Solution code:
a = list(input())
k = 0
for i in range(len(a)):
	if i == 0 and a[i] != "A":
		k = 1
		break
	elif i >= 2 and i <= len(a)-2:
		if a[i] == "C":
			k += 2
		elif a[i] <= "z" and a[i] >= "a":
			k = k
		else:
			k = 1
			break
	else:
		if a[i] <= "z" or a[i] >= "a":
			k = k
		else:
			k = 1
			break
if k == 2:
	print("AC")
else:
	print("WA")

Submission status: Wrong Answer

Solution code:
a = raw_input().split()
b = a[2:-1]
if a[0] == "A" and b.count("C") == 1:
  c = b.index("C")
  a.pop(0)
  a.pop(c+2)
  if a.islower() == True:
     print "AC"
else:
  print "WA"

Submission status: Wrong Answer

Solution code:
s = input()
    
if s[0] != 'A':
    print('WA')
elif 'C' not in s[2:-1] or s[2:-1].count('C') != 1:
    print('WA')
elif s[1].islower() and s[3:-2].islower() and s[-2:].islower():
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
d=['BDEFGHIJKLMNOPQRSTUVWXYZ']
if s[0]=='A' and s.count('A')==1 and s.count('C')==1 and s[2:-1].count('C')==1:
    for t in d:
        if t in s:
            break
    else:
        print('AC')
        exit()
print('WA')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

def main():
    s = input()
    flag = 1
    if s[0] == 'A':
        s = s.lstrip('A')
        flag *= 1
    else:
        flag *= 0
    if 'C' in s[1:-1] and s[1:-1].count('C') == 1:
        temp = s[1:-1].lstrip('C')
        s = s[0:1] + temp + s[-1]
        flag *= 1
    else:
        flag *= 0
    if s.islower() and flag == 1:
        print('AC')
    else:
        print('WA')
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()

a = S.count('A')
c = S.count('C')

i = S.find('C')
if S[0] == 'A' and a == 1 and c == 1:
    test = S[1:i]+S[i+1:]
    if 1<i and i < len(S)-1 and test.islower():
        print('AC')
    else:
        print('WC')
else:
    print('WC')

Submission status: Wrong Answer

Solution code:
import re
s = input()
pattern = re.compile(r"A[a-z]+C[a-z]+")
match = pattern.match(s)
if(match):
	print ("AC")
else:
	print("WA")

Submission status: Wrong Answer

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

if S[0] != "A":
  print("WA")
else:
  l = len(S)
  c = 0
  x = 0
  for i in range(2,l-2):
    if S[i] == "C":
      c += 1
      x = i
  if c !=1:
    print("WA")
  else:
    del S[x]
    del S[0]
    c = 0
    for i in S:
      if i.isupper():
        c += 1
    if c == 0:
      print("AC")
    else:
      print("WA")

Submission status: Wrong Answer

Solution code:
a=input()
flag=0
if a[0]=='A':
    i=1
    c=0
    while i<len(a):
        if i>=2 and i<=len(a)-2 and a[i]=='C' and c==0:
            i+=1
            c=1
        elif ord(a[i])>=98 and ord(a[i])<=122 and a[i]!='C' and a[i]!='c':
            i+=1
        else:
            flag=1
            break
    if flag==0:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

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

S = input()

wa = 0

if S[0] == "A":
    pass
else:
    wa = 1

if S[2] == "C":
    if S[-2] == "C":
        wa = 1
    else:
        pass
elif S[-2] == "C":
    if S[2] == "C":
        wa = 1
    else:
        pass
else:
    wa = 1

n = 0
for i in S:
    if i.isupper() == True:
        n = n + 1

if n == 2:
    pass
else:
    wa = 1        

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

Submission status: Wrong Answer

Solution code:
S = input()
lcnt = 0
for i in range(len(S)):
    if ord(S[i]) >= 65 and ord(S[i]) < 91:
        lcnt += 1
ccnt = 0
for i in range(2, len(S) - 2):
    if S[i] == "C":
        ccnt += 1
if S[0] != "A":
    print("WA")
elif ccnt != 1:
    print("WA")
elif lcnt > 2:
    print("WA")
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
ss = str(input())
if ss[0] == "A" and [ss[2], ss[-2] ].count("C") == 1 and ss.count("A") == 1 and ss.count("C") ==1 :
    s = list(ss)
    p = [ss[2], ss[-2]]
    p.remove("C")
    pp = p[0]
    if s.count("A") == 1 and s.count("C") == 1 and pp.islower():
        s[0] = "a"
        s[2] = "a"
        s[-2] = "a"
        a = ""
        for i in s:
            a = a + i
            #print(a)
        if a.islower() :
            print("AC")
        else:
            print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

cA = S[0:1] == "A"
cC = False
if(S[2:-1].find("C") != -1 and S[2:-1].count("C") == 1):
    S = S[1:2] + S[2:-1].strip("C")
    cC = S.islower()
if(cA and cC):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import re
s = input()
t = s[2:-1]
if(s[0] == "A" and len(re.findall('[a-z]', t))==len(t)-1 and "C" in t):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = list(input())

flag = True

if s[0] != 'A':
    flag = False

l = s[2:len(s)-1]

count = 0
c = 0
for i,x in enumerate(l):
    if x == 'C':
        count += 1
        c = i

if count != 1:
    flag = False

for x in s:
    if x not in list('abcdefghijklmnopqrstuvwxyz'):
        flag = False

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

Submission status: Wrong Answer

Solution code:

S = input()

result = 'WA'
if S[0] == 'A':
    if S[2:-2].count('C') == 1:
        if len([x for x in S if x.islower()]) == len(S) -2:
            result = 'AC'


print(result)

Submission status: Wrong Answer

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


s = str(input())

s1 = s[0]

for i in range(2, len(s) - 1):
    if s[i] == 'c' or s[i] == 'C':
        s1 += s[i]

    else:
        continue

if s1.isupper() and 'C' in s1:
    print('AC')

else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!='A':print('WA')
elif not(1==s[2:-2].count('C')==s.count('C')):print('WA')
else:
    t=s.find('C')
    s=s[1:t]+s[t+1:]
    print('AC'if s==s.lower()else'WA')

Submission status: Wrong Answer

Solution code:
S=input()
is_ans=0
if S[0]=='A':
    S1=S[2:len(S)-2]
    if S1.count('C')==1:
        S0=list(S)

        S0.remove('A')
        S0.remove('C')

        S3=''.join(S0)
        S3=S3.lower()
        S3=list(S3)
        if S3==S0:
            is_ans=1
print("AC" if is_ans else "WA")

Submission status: Wrong Answer

Solution code:
S = str(input())

if S[0] != "A":
    print("WA")
else:
    if len(S) == 4:
        if "C" not in S[2:]:
            print("WA")
        else:
            if S[1].islower() and ((S[2].islower() and S[3].isupper()) or
                                (S[2].isupper() and S[3].islower)):
                print("AC")
    else:
        s = S[2:-1]
        if "C" not in s:
            print("WA")
        else:
            counter = 0
            for i in S[1:]:
                if i.isupper():
                    counter += 1
            if counter == 1:
                print("AC")

Submission status: Wrong Answer

Solution code:
S=input()

endflag=0
count=0
for num,i in enumerate(S):
    if num==0:
        if S[0]!="A":
            print("WA")
            endflag=1
    elif i=="C":
        if num<2 or num>=(len(S)-1) or count>0:
            print("WA")
            endflag=1
        else:
            count+=1
    elif i.islower() == False:
        print("WA")
        endflag=1

    if endflag==1:
        break
if endflag==0:
    print("AC")

Submission status: Wrong Answer

Solution code:
s=input()
end_flag=0

if ((s[0]!="A")or(s.count("C")!=1)):
  end_flag=1
if(s[1]=="C")or(s[-1]=="C"):
  end_flag=1

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

Submission status: Wrong Answer

Solution code:
a = str(input())


if a[0]=="A":
    if "C" in a[2:len(a)-1]:
        ad = a[1:].replace("C","")
        if len(ad)==len(a)-2:
                if ad.islower():
                    print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()


if s[0] == 'A':
    if s[2:-2].count('C') == 1:
        index_c = s.index('C')
        if index_c > 0:
            lower_words = s[1:index_c-1] + s[index_c+1:]
            if lower_words == lower_words.lower():
                print('AC')
            else:
                print('WA')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!


S=input()
x=0
count=0

if S[0]!="A":
    print("WA")
    exit()
elif len(S)==4:
    if S[2]!="C":
        print("WA")
        exit()
    elif S[1].islower() and S[3].islower():
        print("AC")
        exit()
    else:
        print("WA")
        exit()
else:
    for i in range(2,len(S)-1):
        if S[i]=="C":
            count+=1
            x=i
    
    if count!=1:
        print("WA")
        exit()
    elif count==1:
        for i in range(2,len(S)-1):
            if x!=i:
                if S[i].isupper():
                    print("WA")
                    exit()
        print("AC")
        exit()

Submission status: Wrong Answer

Solution code:
import sys
import re

oomoji = re.compile(r"[A-Z]")
S = list(raw_input())
if S[0] != 'A':
  print 'WA'
  sys.exit(0)
C = 0
for i in range(2,len(S)-1):
  if S[i] == 'C':
    C += 1
  elif oomoji.match(S[i]):
    print 'WA'
    sys.exit(0)
if C != 1 or oomoji.match(S[len(S)-1]):
  print 'WA'
else :
  print 'AC'

Submission status: Wrong Answer

Solution code:
s = input()
    
if s[0] != 'A':
    print('WA')
elif 'C' not in s[2:-1] or s[2:-1].count('C') != 1:
    print('WA')
elif s[1].islower() and s[3:-2].islower() and s[-1].islower():
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == "A":
  if S[2:-1].count("C") == 1:
    s = [a for a in S]
    s.remove("A")
    s.remove("C")
    S = "".join(s)
    if S.islower():
      print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

def main():
    s = input()
    flag = 1
    if s[0] == 'A':
        s = s.lstrip('A')
        flag *= 1
    else:
        flag *= 0
    if 'C' in s[1:-1]:
        temp = s[1:-1].lstrip('C')
        s = s[0:1] + temp + s[-1]
        flag *= 1
    else:
        flag *= 0
    if s.islower() and flag == 1:
        print('AC')
    else:
        print('WA')
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()
ans = True
if S[0]!='A':
    ans = False
    print("WA")
else:
    S = S.replace('A', '')

if ans:
    tmp = False
    for c in S[1:-1]:
        if c=='C':
            if not tmp:
                tmp = True
            else:
                ans = False
                print("WA")
    if not tmp:
        ans = False
        print("WA")

if ans:
    S = S.replace('C', '')

if ans:
    tmp = True
    for c in S:
        if not (ord(c)>=97 and ord(c)<123):
            tmp = False
    if not tmp:
        print("WA")
        ans = False

if ans:
    print("AC")

Submission status: Wrong Answer

Solution code:
S = input()

a = S.count('A')
c = S.count('C')

i = S.find('C')
if S[0] == 'A' and a == 1 and c == 1:
    test = S[1:i]+S[i+1:]
    if test.islower():
        print('AC')
    else:
        print('WC')
else:
    print('WC')

Submission status: Wrong Answer

Solution code:
S = input()
SL = [x for x in S]

ok = S[0] == "A"
SL[0] = "a"

ok = S[2:-2].count("C") == 1
cpos = S[2:-2].find("C")

if cpos != -1:
    SL[2+cpos] = "c"

for c in SL:
    ok = ok and not c.isupper()

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/bin/python

s=input()

if s[0]=='A' and s[2:-1].count('C')==1:
    print('AC')
    exit()

print('WA')
exit()

Submission status: Wrong Answer

Solution code:
ss = str(input())
if ss[0] == "A" and [ss[2], ss[-2] ].count("C") == 1 :
    s = list(ss)
    p = [ss[2], ss[-2]]
    p.remove("C")
    pp = p[0]
    if s.count("A") == 1 and s.count("C") == 1 and pp.islower():
        s[0] = "a"
        s[2] = "a"
        s[-2] = "a"
        a = ""
        for i in s:
            a = a + i
            #print(a)
        if a.islower() :
            print("AC")
        else:
            print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
WhereC = S.find('C')
CountC = S[2:-2].count('C')

if S[0]=='A' and CountC == 1 and S[1:WhereC].islower()==True and S[WhereC+1:].islower()==True:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
def check(s):
    t=True
    if s[0]!="A" :
        t=False
        #print("reached")
    a=s[:len(s)-2]
    count=0
    for i in range(len(a)):
        if a[i]=="C":
            count+=1
    if count!=1:
        t=False
    alph="BDEFGHIJKLMNOPQRSTUVWXYZ"
    for i in range(24):
        if alph[i] in s:
            t=False
            break
    if t:
        print("AC")
    else:
        print("WA")
s=input()
check(s)

Submission status: Wrong Answer

Solution code:
S = input()

a = S[0] == 'A'
b = S[2:-2].count('C') == 1
S = list(S)
if 'A' in S:
    S.remove('A')
if 'C' in S:
    S.remove('C')
c = str(S).islower()

if a and b and c:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
#S = input()

S = 'Atcoder'

cond = False

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        cond = True
        for i, s in enumerate(S):
            if i == 0:
                continue
            if s.isupper():
                if s == 'C':
                    if i < 2 or len(S)-2 < i:
                        cond = False
                else:
                    cond = False

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

Submission status: Wrong Answer

Solution code:
s = input()
s1 = ''
s2 = ''
judge = False
if s[0] == 'A':
    for i in range(1,len(s)):
        s1 += s[i]
    for i in range(1, len(s1)-2):
        if s1[i] == 'C':
            for j in range(len(s1)):
                if j != i:
                    s2 += s1[j]
            judge = True
            break
    if judge:
        if s2.islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
a=input()
flag=0
if a[0]=='A':
    i=1
    c=0
    while i<len(a):
        if i>=2 and i<=len(a)-2 and a[i]=='C' and c==0:
            i+=1
            c=1
        elif ord(a[i])>=97 and ord(a[i])<=122 and a[i]!='C' and a[i]!='c':
            i+=1
        else:
            flag=1
            break
    if flag==0:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
S = input()
flag = False
if S[0] == "A" and S[2:len(S)-2].count("C") == 1:
    for i in range(1,len(S)):
        if S.index("C") == i:
            continue
        if S[i].islower() == False:
            flag = False
            break
        else:
            flag = True
if flag:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:


def main():
    S = input()

    l = len(S)

    if S[0] != "A":

        print("WA")
        return

    i = S.find("C")
    print(i)

    if 1<i and i<l-1:
        pass
    else:

        print("WA")
        return

    sl = list(S)
    sl.pop(i)
    sl.pop(0)

    s = "".join(sl)

    if s.islower():
        print("AC")
        return
    else:

        print("WA")
        return

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys

S = input()

cnt = 0
for i in range(len(S)):
	if i == 0 and S[i] != 'A':
		print('WA')
		sys.exit()
	elif i == 0:
		continue
	if i >= 2 and i <= len(S)-2 and S[i] == 'C':
		cnt += 1
	elif S[i].isupper():
		print('WA')
		sys.exit()
print('AC')

Submission status: Wrong Answer

Solution code:
S = input()

a = S.count('A')
c = S.count('C')

i = S.find('C')
if S[0] == 'A' and a == 1 and c == 1:
    test = S[1:i]+S[i+1:]
    if test.islower():
        print('AC')

        
print('WC')

Submission status: Wrong Answer

Solution code:
s = input()

txt = "abcdefghijklmnopqrstuvwxyz"

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

if((s[1] in txt) == False):
    print("WA")
    exit()

count = 0
for i in s[2:-1]:
    if(i == "C"): count += 1
    elif((i in txt) == False):
        print("WA")
        exit()
    if(count != 1):
        print("WA")
        exit()

if((s[-1] in txt) == False):
    print("WA")
    exit()

print("AC")

Submission status: Wrong Answer

Solution code:
#coding:utf-8
s=input()
count=True
dumy=0
if(s[0]=="A"):
  for i in range(2,len(s)-2):
    if(s[i]=="C"):
      dumy+=1
else:
  count=False
if(dumy!=1):
  count=False
dumy=0
for i in range(len(s)):
  if(s[i]>="A" and s[i]<="Z"):
    dumy+=1
if(dumy!=2):
  count=False
if(count==False):
  print("WA")
else:
  print("AC")

Submission status: Wrong Answer

Solution code:
s = input()
smalls = "abcdefghijklmnopqrstuvwxyz"
def solve(s):
    count = 0

    if s[0] != "A":
        return False

    if s[1] not in smalls:
        return False
    for char in s[2:]:
        if char == "C":
            count += 1
            continue

        if char not in smalls:
            return False
    if count != 1:
        return False
    return True

if solve(s):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

def judge(S:str) -> bool:
    if S[0] != "A":
        return False
    
    elif S[2:-1].count("C") != 1:
        return False
    
    else:
        s_list = list(S)
        s_list.remove("A")
        s_list.remove("C")
        for s in s_list:
            if ord(s)<ord("a") or ord(s)>ord("z"):
                return False
            else:
                return True
            
S = input()
if judge(S):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

l = list(S)

c = 0

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

if l[0] == 'A' and c == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
flag=0
if S[0]=="A":
    pass
else:
    flag=1
#print(S)
S=S[1:]
#print(S)
if S[1:-1].count("C")==1:
    pass
else:
    flag=1
#print(S[1:-1])
#print(A)
list1=[]
for i in range(len(S)):
    if S[i]=="C":
        pass
    else:
        list1.append(S[i])
if len(S)==len(list1)+1:
    pass
else:
    flag=1
    
if flag==0:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
count = 0

for i in s:
    if ord("A") <= ord(i) <= ord("Z"):
        count += 1
else:
    if s[0] == "A" and s[2] == "C" and count == 2:
        print("AC")
    else:
        print("WA")

Submission status: Wrong Answer

Solution code:
S = input()


b = (S[0]=='A')

i=0
for s in S[2:-1]:
	if s=='C': i+=1
b = b and (i==1)


i=0
for c in "ABDEFGHIJKLMNOPQRSTUVWXYZ":
	if (c in S[2:-1]): i+=1

b = b and (i==0)

ans='WA'
if b : ans = 'AC'

print(ans)

Submission status: Wrong Answer

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

S = input()

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

Submission status: Wrong Answer

Solution code:
inp = list(input())
flag = True
if inp.pop(0) != "A":
    flag = False
if inp[1:-2].count("C") != 1 and inp[1] != "C":
    flag = False
else:
    inp.remove("C")
if not "".join(inp).islower():
    flag = False
if flag:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
def i1():
 return int(input())
def i2():
 return [int(i) for i in input().split()]
s=input()
ss="AC"
if s[0]=="A" and s[2:-1].count("C")==1:
   for i in range(len(s)):
     if s[i]=="A" or s[i]=="C" or ord(s[i])>ord("A"):    
       continue
     ss="WA" 
else:
     ss="WA"
print(ss)

Submission status: Wrong Answer

Solution code:
i = input()

flag = 0

if i[0] is not "A":
    flag = 1

if i[2:-2].count("C") == 1:
    flag = 1

for j in range(65,26+65):
    if (chr(j) == "A" )or (chr(j)=="C"):
        continue
    if chr(j) in i:
        flag = 1

for j in range(65,26+65):
    if chr(j) in i[-1]+i[1]:
        flag = 1


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

Submission status: Wrong Answer

Solution code:
a = list(input())
k = 0
for i in range(len(a)):
	if i == 0 and a[i] != "A":
		k = 1
		break
	elif i >= 2 and i <= len(a)-2:
		if a[i] == "C":
			k += 2
		elif a[i] > z or a[i] < a:
			k = 1
			break
	else:
		if a[i] > "z" or a[i] < "a":
			k = 1
			break
if k == 2:
	print("AC")
else:
	print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = raw_input().split()
b = a[2:-1]
if a[0] == "A" and b.count("C") == 1:
  a.remove("A")
  a.remove("C")
  if a.islower() == True:
     print "AC"
else:
  print "WA"

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
S = input()
if S[0] != 'A':
  print('WA')
  exit()
S = S[1:]
S_mod = S[1:-1]
if S_mod.count('C') != 1:
  print('WA')
  exit()
S = S.replace('C', '')
if not S.islower():
  print('WA')
print('AC')

Submission status: Wrong Answer

Solution code:
import re
S = input()
flag = False
if len(re.findall('[A-Z]',S)) == 2:
    if S[0] == "A":
        if S[-1] != "C":
            if S[2:-2].count("C") == 1:
                flag = True

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

Submission status: Wrong Answer

Solution code:
S = input()
count = 0
tmp = ""
flag = False
if S[0] == 'A':
    for i in range(2, len(S)-1):
        if S[i] == "C":
            count += 1
        else:
            tmp = tmp + S[i]
    if count == 1:
        tmp = tmp + S[1]
        if tmp.islower() == True:
            print("AC")
            flag = True
if flag == False:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A":
    print(S)
    if S[2] in "C" or S[-2] == "C":
        if not S[2] in "C" and S[-2] == "C":
            S = S.replace("C", "")
            S = S.replace("A", "")
            if S.islower() == True:
                print("AC")
            else:
                print("WA")
                exit()
        else:
            print("WA")
            exit()
    else:
            print("WA")
            exit()
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
ss = str(input())
if ss[0] == "A" and [ss[2], ss[-2] ].count("C") == 1 :
    s = list(ss)
    if s.count("A") == 1 and s.count("C") == 1:
        s[0] = "a"
        s[2] = "a"
        s[-2] = "a"
        a = ""
        for i in s:
            a = a + i
            #print(a)
        if a.islower() :
            print("AC")
        else:
            print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
flag = False
if S[0]=="A" and S[2:-1].count("C")==1:
    S.remove("A")
    tmp = S[1:-1]
    tmp.remove("C")
    S = S[0:1] + tmp
    if "".join(S).islower():
        flag = True
print("AC" if flag else "WA")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


s = str(input())

s1 = s[0] + s[2] + s[-2]
s2 = ''

for i in range(len(s)):
    if i == 0 or i == 2 or i == (len(s) - 2):
        continue
    else:
        s2 += s[i]

if s1.isupper() and s2.islower():
    print('AC')

else:
    print('WA')

Submission status: Wrong Answer

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

if S[0] != 'A':
    print('WA')
elif 'C' not in S[2:-1]:
    print('WA')
else:
    i = S[2:-1].find('C')
    S = S[1:i] + S[i + 1:]
    if not S.islower():
        print('WA')
    else:
        print('AC')