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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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()="True":
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
s=list(input())

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()="True":
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
def checker():
    s = input()
    if s[0] != "A":
        return 0
    if s[2:-1].count("C") != 1:
        return 0
    s.pop(0)
    s.pop(s.index("C"))
    if s != s.lower():
        return 0
    return 1

l = ["WA", "AC"]

print(l[checker()])

Submission status: Runtime Error

Solution code:
def checker():
    s = input()
    if s[0] != "A":
        return 0
    if "C" in s[2:-1]:
        s[2:-1].pop(s[2:-1].index("C"))
        if "C" in s[2:-1]:
            return 0
        else:
            return 1
    return 1

l = ["WA", "AC"]

print(l[checker()])

Submission status: Runtime Error

Solution code:
x = list(input())
#print(len(x))

if x[0]=="A" :
	for i in range(2,len(x)-1):
		if x[i]=="C" :
#			print(x)
			del	x[i]
			del x[0]
			y="".join(x)
			#print(y)
			if y.islower():
				print("AC")
				break
			else:
					print("WA")
else:
	print("WA")

#print(x)

Submission status: Runtime Error

Solution code:
s = str(input())

ans = 'AC'
cnt = 0

if s[0] != 'A':
    ans = 'WA'

for i in range(1, len(s) + 1):
    if s[i].isupper():
        if i == 1 or i == len(s) - 1 or s[i] != 'C':
            ans = 'WA'
else:
    cnt += 1

if cnt != 1:
    ans = 'WA'

print(ans)

Submission status: Runtime Error

Solution code:
import re
s = input()
ci = s.index("C")
if s.index("A") == 0 and 2 <= ci < len(s) - 2:
  tmp = list(s)
  del tmp[0]
  del tmp[ci - 1]
  if re.match("^[a-z]*$", "".join(tmp)):
    print("AC")
    exit()
print("WA")

Submission status: Runtime Error

Solution code:
import re
s = input()
ci = s.index("C")
if s.index("A") == 0 and 2 <= ci < len(s) - 2:
  tmp = list(s)
  del tmp[0]
  del tmp[ci]
  if re.match("^[a-z]*$", "".join(tmp)):
    print("AC")
    exit()
print("WA")

Submission status: Runtime Error

Solution code:
import sys
S = list(input())
# S = "Atcoder"
# S = list(S)

if S[0] != "A":
    print("WA")
    sys.exit()
elif S[1].isupper():
    print("WA")
    sys.exit()
elif S[-1].isupper():
    print("WA")
    sys.exit()
elif "C" in S[2:-1]:
    S.remove("C")
    S.remove(0)
    S = str(S)
    if S.islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
import sys
S = input()

if S[0] != "A":
    print("WA")
    sys.exit()

SS = S[2:-2]
if "C" in SS:
    SS.pop("C")
    if SS.islower():
        print("AC")
    else:
        print("WA")

else:
    print("WA")

Submission status: Runtime Error

Solution code:
S = input()

if S[0] == "A":
    A = True
else:
    A = False

small = "abcdefghijklmnopqrstuvwxyz"
countC = 0
for i in range(2,len(S)-1):
    if S[i] == "C":
        countC += 1
        place = i
        
if countC == 1:
    C = True
else:
    C = False

s = True
for i in range(1,len(S)):
    if i != place and S[i] not in small:
        s = False



if (A and C and s):
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
S = input()

if S[0] == "A":
    A = True
else:
    A = False

small = "abcdefghijklmnopqrstuvwxyz"
countC = 0
for i in range(2,len(S)-1):
    if S[i] == "C":
        countC += 1
        place = i
if countC == 1:
    C = True
else:
    C = False

s = True
for i in range(1,len(S)):
    if i != place:
        if S[i] not in small:
            s = False



if (A and C and s):
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
s = input()
l = len(s)
if s[0] !="A":
    print("WA")
    break
else:
    s = s.replace(s[0],"a")
    index1 = s.find("C")
    index2 = s.find("C", 2)
    if index2 != -1 or (index1 < 2 or index1 > l-3):
        print("WA")
    else:
        s = s.replace("A","a")
        s_lower = s.lower()
        if s != s_lower:
            print("WA")
        else:
            print("AC")

Submission status: Runtime Error

Solution code:
str=list(input())

count1=0
count2=0
if str[0]=="A":
  for i in range(len(str)-3):
    if str[i+2]=="C":
      count1 += 1
  for i in range(len(str)):
    if str[i]==str[i].capitalize():
      count2 += 1
  if count1 == 1 && count2 !=0 :
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
S = list(input())
if S[0] != 'A':
	print("WC")
	exit()
c_count = 0
upper_count = 0
for i in range(len(S)):
	if S[i] == 'C':
		if (i < 2) | (i > (len(S)-1)):
			print("WC")
			exit()
		else:
			if c_count == 0:
				c_count += 1
			else:
				print("WA")
				exit()
	if S[i].isupper():
		upper_count++

if (c_count == 1) & (upper_count == 2):
	print("AC")

Submission status: Runtime Error

Solution code:
def check1(str):
    if srt.startswith('A')
        return True
    return False

def check2(str):
    if str.count('C')==1:
        if 1<str.index("C")<len(str)-2
            return True
    return False

def check3(str):
    a=0
    for letter in str:
        if 'A'<=letter<='Z':
            a+=1
    if a==2:
        return True
    return False
str=input()

if check1(str) and check2(str) and check3(str):
    print("AC")
print("WA")

Submission status: Runtime Error

Solution code:
def main19():
    strbuf = input('');
    num = strbuf.length;
    boo = False;
    for i in range(num-3):
        if strbuf[2+i] == 'C':
            if boo == False:
                boo = True;
            else:
                boo = False;
                break;
    if strbuf[0] == 'A' and boo:
        print("AC");
    else:
        print("WA");




if __name__ == '__main__':
    main19()

Submission status: Runtime Error

Solution code:
S=list(input())
flag=0
Ccount=0
Lcount=0
Cnumber=-1
if S[0]=="A":
  flag+=1
  del S[0]
if S.count("C")==1:
  flag+=1
  del S[Cnumber]
N=len(S)
if S[0:].islower():
  flag+=1
if flag==3:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
S = input()

if S.find("A") != 0:
    print("WA")
elif "C" not in S[2:]:
    print("WA")
elif "C" not in S[:-2]:
    print("WA")
elif S[-1] == "C":
    print("WA")

elif S[1:S.find("C")] != S[1:S.find("C")].lowwer():
    print("WA")
elif S[S.find("C")+1:] != S[S.find("C")+1:].lowwer():
    print("WA")
elif S.rfind("C") == S.find("C"):
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

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

if ((S1[0] == 'C')or(S1[1] == 'C') or (S1[-1] == 'C')):
    print('WA')
elif ((S1[0] == 'A') and (S1.count('A') == 1) and (S1[2:-1].count('C') == 1)):
    S1.remove('A')
    S1.remove('C')
    print(S1)
    print(len(S1))
    while i <= len(S1):
        if S1[i].isupper():
            print('WA')
            break
            else:
                i += 1
    else:
        print('AC')
else:
    print('WA')

Submission status: Runtime Error

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

if ((S1[0] == 'C')or(S1[1] == 'C') or (S1[-1] == 'C')):
    print('WA')
elif ((S1[0] == 'A') and (S1.count('A') == 1) and (S1[2:-1].count('C') == 1)):
    S1.remove('A')
    S1.remove('C')
    print(S1)
    print(len(S1))
    while i <= len(S1):
        if S1[i].isupper():
            print('WA')
            break
        else:
            i += 1
    else:
        print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
S=raw_input();l=len(S);f=S.find('C');A=0
if S[:1]='A':
	A+1
	S="a"+S[1:]
if S[2:l-1].count('C')=1:
	A+1
	S=S[:f]+'c'+S[f+1:]
if S.islower():
	A+1
print('AC'if A=3 else'WA')

Submission status: Runtime Error

Solution code:
B = input()
S = B
a = 0
if S[0] == "A":
    if S[2:-2].count("C") == 1:
        if "C" in S[2:-2]:
            t = 2 + S[2:-2].index("C")
            S = str(S.lstrip("A"))
            S = str(S[0] + S[1:t-1] + S[t:])
            if S.islower():
                a = 1
if a == 1:
    print("AC")
else:
    print("WA")
    print("A" > 1)

Submission status: Runtime Error

Solution code:
str = input()
s=list(str)
l=len(s)
f1=False
f2=False
f3=True

if(len<=10 and len>=4):
    for i in range(l):
        if(s[i].isalpha()):
            if(i==0 and s[i]=='A'):
                f1=True
            elif((i==2 or i==(l-1)) and s[i]=='C'):
                f2=True
            elif((i!=0 and i!=2 and i!=(l-1)) and s[i].isupper()):
                f3=False

if(f1==True and f2==True and f3==True):
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

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

if ((S1[0] == 'C')or(S1[1] == 'C') or (S1[-1] == 'C')):
    print('WA')
elif ((S1[0] == 'A') and (S1.count('A') == 1) and (S1[2:-1].count('C') == 1)):
    S1.remove('A')
    S1.remove('C')
    while i <= len(S1):
        if S1[i].isupper():
            print('WA')
            i += 100
        else:
            i += 1
    else:
        print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
B = input()
A = B
a = 0
if S[0] == "A":
    if S[2:-2].count("C") == 1:
        if "C" in S[2:-2]:
            t = 2 + S[2:-2].index("C")
            S = str(S.lstrip("A"))
            S = str(S[0] + S[1:t-1] + S[t:])
            if S.islower():
                a = 1
if a == 1:
    print("AC")
else:
    print("WA")
    S = S.replace("A", "")
    if S.islower():
        pass

Submission status: Runtime Error

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

if ((S1[0] == 'C')or(S1[1] == 'C') or (S1[-1] == 'C')):
    print('WA')
elif ((S1[0] == 'A') and (S1.count('A') == 1) and (S1[2:-1].count('C') == 1)):
    S1.remove('A')
    S1.remove('C')
    while i <= len(S1):
        if S1[i].isupper():
            print('WA')
            break
        else:
            i += 1
    else:
        print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
S = input()

if S[2:-2].count('C') != 1:
  print('WA')

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

S[0] == 'a'
S[S[2:-2].index('C')] == 'c'

if S.islower():
  print('AC')
else:
  print('WA')

Submission status: Runtime Error

Solution code:
s = input()
if s[0] == "A":
    if s[2] == "C":
        if s[3] == "C":
            print(WA)
        else:
            if s[4] == "C":
                print(WA)
            else:
                if s[5] == "C":
                    print(WA)
                else:
                    if s[6] == "C":
                        print(WA)
                    else:
                        if s[7] == "C":
                            print(WA)
                        else:
                            if s[8] == "C":
                                print(WA)
                            else:
                                print(AC)
    else:
        if s[3] == "C":
            if s[4] == "C":
                print(WA)
            else:
                if s[5] == "C":
                    print(WA)
                else:
                    if s[6] == "C":
if "s".islower():

Submission status: Runtime Error

Solution code:
s = input()
    
if s[0] != 'A' or s[1].islower() == False or s[-1].islower() == False:
    print('WA')
elif s[2:-1].count('C') != 1:
    print('WA')
else:
    for i in range(3, len(s)-1):
        if s[i].islower() or s[i] == 'C':
            flag = 'AC'
        else:
            flag = 'WA'
            break
    print(flag)

Submission status: Runtime Error

Solution code:
s = input()
    
if s[0] != 'A' or s[1].islower() == False or s[-1].islower() == False:
    print('WA')
elif s[2:-1].count('C') != 1:
    print('WA')
else:
    #and s[3:-2].islower() and
    for i in range(3, len(s)-2):
        if s[i].islower():
            flag = 'AC'
        else:
            flag = 'WA'
            break
    print(flag)

Submission status: Runtime Error

Solution code:
S=input()

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

if cc==1:
    p1=True

if S[0]=='A':
    p2=True

bc=0
for i in range(len(S)):
    if i==0 or i==nc:
        pass
    else:
        if S[i].islower()==False:
            bc+=1

if p1==True and p2==True and bc==0:
    print('AC')

else:
    print('WA')

Submission status: Runtime Error

Solution code:
S=input()

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

if cc==1:
    p1=True

if S[0]=='A':
    p2=True

bc=0
for i in range(len(S)):
    if i==0 or i==nc:
        pass
    else:
        if S[i].islower()==False:
            bc+=1

if p1==True and p2==True and bc==0:
    print('AC')

else:
    print('WA')

Submission status: Runtime Error

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(s)):
  if s[i:i+1]!='C' and s[i:i+1].isupper():
    print('WA')
    exit()
print('AC')

















for i in range(100*d):
  for j in range(d):
    if i+1==p[j]:
      tugi=max(tugi,j+1+c[j])
    elif i+1<p[j]:
      tugi=max(tugi,j+1)
  ten+=tugi
  tugi=0
  print(ten)
  if ten>=g:
    print(i+1)
    exit()

Submission status: Runtime Error

Solution code:
s_list = list(input())
s_list1 = s_list
count = 0

if s_list[0] == "A":
    del s_list[:2], s_list[-1]
    for i in range(len(s_list)):
        if s_list[i] == "C":
            count += 1
            isC = i + 2
    if count != 1:
        print("WA")
    else:
        del s_list1[isC]
        Str = "".join(s_list1)
        if Str.islower():
            print("AC")
        else:
            print("WA")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
 = str(input())
s1 = ''

if len(s) == 4:
    df = len(s)
else:
    df = len(s) - 1
    s1 += s[df:]

flag = False

if s.count('C') == 1:
    for i in range(1, df):
        if s[i] == 'C' and i <= 2:
            flag = True
        else:
            s1 += s[i]
else:
    flag = False

if s1.islower() and len(s) >= 1:
    flag = True
else:
    flag = False

print(s1)

if flag and s[0] == 'A':
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
S=input()

cc=0
for i in range(2,len(S)-1):
    if S[i]=='C' and S[i].islower()==False:
        cc+=1
        nc=i

if cc==1:
    p1=True

if S[0]=='A' and S[0].islower()==False:
    p2=True

bc=0
for i in range(len(S)):
    if i==0 or i==nc:
        pass
    else:
        if S[i].islower()==False:
            bc+=1

if p1==True and p2==True and bc==0:
    print('AC')

else:
    print('WA')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = str(input())
flag = False
 
if S.startswith("A"):
  if (S[2]) == "C":
    flag1 = True
    index = 2
  if S[-2] == "C":
    flag2 == True
    index = -2
  if flag1 ^ flag2:
    if (S[1:index] + S[index+1:]).islower():
      flag = True
      
if flag == True:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
s_list = list(input())
s_list1 = s_list

if s_list[0] == "A":
    del s_list[:2], s_list[-1]
    Str = "".join(s_list)
    if Str.count("C") != 1:
        print("WA")
    else:
        Str = "".join(s_list1)
        Str = Str.replace("C", "")
        if Str1.islower():
            print("AC")
        else:
            print("WA")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
s = list(input())
l = len(s)
if s[0] == 'A':
    c_cnt = 0
    cn_l = []
    for i, m in enumerate(s):
        if 1<i<l-1 & m=='C':
            cn_l.append(i)
            c_cnt += 1
    if c_cnt == 1:
        cn = cn_l[0]
        tmp = s
        tmp.pop(0)
        tmp.pop(cn)
        tmp_s = ''.join(tmp)
        if tmp_s == tmp_s.lower():
            print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
S = str(input())
flag = False
 
if S.startswith("A"):
  if ((S[2]) == "C") ^ (S[-2]=="C"):
    index = S.find("C")
    del(S[0])
    del(S[index])
    if S.islower():
      flag = True
      
if flag == True:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
S = str(input())
flag = False
 
if S.startswith("A"):
  if ((S[2]) == "C") ^ (S["-2"]=="C"):
    index = S.find("C")
    del(S[0])
    del(S[index])
    if S.islower():
      flag = True
      
if flag == True:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
S = str(input())
flag = False
 
if S.startswith("A"):
  if ((S[2]) == "C") ^ (S["-2"]=="C"):
  	index = S.find("C")
    del(S[0])
    del(S[index])
    if S.islower():
      flag = True
      
if flag == True:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
result=""
count=0
l=len(s)
for i in range(l):
  if i==0 and s[i]="A":
    result="WA"
    break
  elif i==1 and ord(s[1])<97 
    result="WA"
    break
  elif i==l-1 and ord(s[l-1])<97:
    result="WA"
    break
  else:
    if ord(i)<97:
      count+=1
    if count>1:
      result="WA"
      break
if result!="WA"
  result="AC"
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

a = S.find('A')

s1 = S[2:-1]
s_count = s1.count('C')

if a != 0:
  return False

if s_count != 1:
  return False

c = s1.find('C')

y = S[1:c-1]
z = S[c+1:]


if y.islower() and z.islower:
  print('AC')
else:
  print('WA')

Submission status: Runtime Error

Solution code:
def main():
    S = input()
    judge = True
    if S[0] == "A":
        S[0] = S[0].lower()
    else:
        judge = False
    if S[1] == "C":
        judge = False
    if S[2:-2].count("C") == 1:
        for n, i in enumerate(S):
            if 2 <= n <= len(S) - 1:
                if i == "C":
                    S[n] = S[n].lower()
    else:
        judge = False
    if S[-1] == "C":
        judge = False
    if S.islower() == False:
        judge = False
    if judge:
        print("AC")
    else:
        print("WA")


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
S=list(input())
flag=0
Ccount=0
Lcount=0
if S[0]=="A":
  flag+=1
  del S[0]
if flag!=1:
  flag=-100
N=len(S)
for i in range(1,N-1):
  if S[i]=="C":
    Ccount+=1
    del S[i]
if Ccount==1:
  flag+=1
if flag!=2:
  flag=-100
N=len(S)
for i in range(N):
  if S[i].islower():
    Lcount+=1
if Lcount==N:
  flag+=1
if flag==3:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
S=input()
if S[0]=='A' and S[0].islower():
    p1=True

countc=0
for i in range(2,len(S)-2):
    if S[i]=='C' and S[i].islower():
        countc+=1
        nc=i
        
if countc==1:
    p2=True

if p1==True and p2==True:
    b=0
    for i in range(len(S)):
        if i==0 or i==nc:
            pass
        else:
            if S[i].islower()==False:
                b+=1

if p1==True and p2==True and b==0:
    print('AC')        
else:
    print('WA')

Submission status: Runtime Error

Solution code:
S = list(input())
if S[0] != 'A':
    print('WA')
    exit

S_aida = S[2:-1]
if S_aida.count("C") != 1:
    print('WA')
    exit

S.pop(0)
S.pop(S.index('C'))

for string in S:
    if not string.islower():
        print('WA')
        exit

print('AC')

Submission status: Runtime Error

Solution code:
S=list(input())
flag=0
Ccount=0
Lcount=0
if S[0]=="A":
  flag+=1
  del S[0]
N=len(S)
for i in range(1,N-1):
  if S[i]=="C":
    Ccount+=1
    del S[i]
if Ccount==1:
  flag+=1
M=len(S)
for i in range(M):
  if S[i].islower():
    Lcount+=1
if Lcount==M:
  flag+=1
if flag==3:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
s = input()

a = s[0] == "A"
b = s[2:-1].count("C") == 1
s_list = list(s)

s_list.pop(0)
s_list.remove("C")
d = "".join(s_list)
e = d.islower()

if a and b and e:
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
def solve(s):
    if s[0]!='A':
        return 'WA'
    if s[3:len(s)-1].count('C')!=1:
        return 'WA'
    s=s.split('A').split('C')
    if not s.islower():
        return 'WA'
    return 'AC'
  
s=input()
print(solve(s))

Submission status: Runtime Error

Solution code:
S = input()
flag = False
 
if S == "":
  print("WA")
  return
  
if S.startswith("A"):
  if ((S[2]) == "C") ^ (S["-2"]=="C"):
  	index = S.find("C")
    for i, s in enumerate(S):
      if (i == 0) or (i == index):
        continue
      if s.islower():
        continue
        if i == len(s):
          flag == True
 
if flag == True:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
S=input()
if S[0]=='A' and S[0].islower():
    p1=True

countc=0
for i in range(2,len(S)-1):
    if S[i]=='C' and S[i].islower():
        countc+=1
        nc=i
        
if countc==1:
    p2=True

if p1==True and p2==True:
    b=0
    for i in range(len(S)):
        if i==0 or i==nc:
            pass
        else:
            if S[i].islower()==False:
                b+=1

if b==0:
    print('AC')        
else:
    print('WA')

Submission status: Runtime Error

Solution code:
s = list(input())
l = len(s)
if s[0] == 'A':
    c_cnt = 0
    for i, m in enumerate(s):
        if 1<i<l-1 & m=='C':
            cn = i
            c_cnt += 1
    if c_cnt == 1:
        tmp = s
        tmp.pop(0)
        tmp.pop(cn)
        tmp_s = ''.join(tmp)
        if tmp_s == tmp_s.lower():
            print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3


def main():
    S = input()
    judge = 0
    t = S
    if S[0] == "A":
        judge += 1
        S[0] = S[0].lower()
    else:
        print("WA")
        exit()
    if S[1] == "C":
        print("WA")
        exit()
    if S[2:-2].count("C") == 1:
        judge += 1
        for n, i in enumerate(S[2:-2]):
            n += 3
            if i == "C":
                S[n] = S[n].lower()
    else:
        print("WA")
        exit()
    if S[-1] == "C":
        print("WA")
        exit()
    if S.islower():
        judge += 1
    else:
        print("WA")
        exit()
    if judge == 3:
        print("AC")
    else:
        print("WA")
        exit()


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
S = input()
flag = False

if S.startswith("A"):
  if ((S[2]) == "C") ^ (S["-2"]=="C"):
  	index = S.find("C")
    for i, s in enumerate(S):
      if (i == 0) or (i == index):
        continue
      if s.islower():
        continue
        if i == len(s):
          flag == True

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

Submission status: Runtime Error

Solution code:
def solve(s):
    if s[0]!='A':
        return 'WA'
    if s[3:len(s)-1].count('C')!=1:
        return'WA'
    s=s.split('A').split('C')
    if not s.islower():
        return'WA'
    return'AC'
  
s=input()
print(solve(s))

Submission status: Runtime Error

Solution code:
S=list(input())
flag=0
Ccount=0
Lcount=0
if S[0]=="A":
  flag+=1
  del S[0]
N=len(S)
for i in range(1,N-1):
  if S[i]=="C":
    Ccount+=1
    del S[i]
if Ccount==1:
  flag+=1
M=len(S)
for i in range(M):
  if S[i].islower():
    Lcount+=1
if Lcount==M:
  flag+=1
if flag==3:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
from collections import Counter
import sys

s = input()
counter = Counter(s[2:-1])

if s[0] == 'A':
    s = s.lstrip('A')
else:
    print('WA')
    sys.exit(1)

if counter['C'] == 1:
    s = s.replace('C', '')
else:
    print('WA')
    sys.exit(1)

if s.islower():
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
s = str(input())
s_list = list(s)
ans_1 = 'no'
ans_2 = 'no'
s_list_len = len(s_list)
if s_list[0] == 'A':
    ans_1 = 'ok'
count = 0
for i,j in enumerate(s_list[2:s_list_len-1]):
    if j == 'C':
        s_list.pop(2+i)
        count += 1
if count == 1:
    ans_2 = 'ok'
ans_3 = 'ok'
for i in s_list[1:]:
    if not i.islower():
        ans_3 = 'no'
if (ans_1 == 'ok') and (ans_2 == 'ok') and (ans_3 == 'ok'):
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
S = input()
flag = False

if S.startswith("A"):
  if ((S[2]) == "C") ^ (S["-2"]=="C"):
  	index = S.find("C")
    for i, s in enumerate(S):
      if (i == 0) or (i == index):
        continue
      if s.islower():
        print(AC)
else:
  print(WA)

Submission status: Runtime Error

Solution code:
a = str(input())

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

Submission status: Runtime Error

Solution code:
S = input()
m = re.match('^A[a-z]+C[a-z]+$', S)
if m == None:
    print('WA')
else:
    print('AC')

Submission status: Runtime Error

Solution code:
s = input()
t = s[2:-1]
count = 0
q = [t[1]]
for i in range(len(t)):
    if t[i] == "C":
        count += 1
    else:
        q.append(t[i])
q.append(t[-1])
q = ''.join(q)
if s[0] == "A" and count == 1 and str(q).lower ==q:
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

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 2 <= s.index("C") <= len(s)-3 and count == 2:
        print("AC")
    else:
        print("WA")

Submission status: Runtime Error

Solution code:
s=list(input())
c = 0
if s[0] == 'A':
    c += 1
if s[2:len(s)-1:].count('C') == 1:
    c += 1
    s.remove('A')
    s.remove('C')
a = 'a'
for i in range(len(s)):
    a += s[i]
if a.islower():
    c += 1

if c == 3:
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
def solve(s):
	if s[0]!='A':
    	return 'WA'
    if s[3:len(s)-1].count('C')!=1:
    	return 'WA'
    s=s.split('A').split('C')
    if not s.islower():
    	return 'WA'
    return 'AC'
  
s=input()
print(solve())

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()

if a[0]=="A":
  if a[2:-1].count("C")==1:
    b,c = a[2:-2].split("C")
    q = b=="" or b.islower()
    r = c=="" or c.islower()
    if a[1].islower() and q and r:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
S = input()

if S[0] == "A":
    A = True
else:
    A = False

small = "abcdefghijklmnopqrstuvwxyz"
countC = 0
for i in range(2,len(S)-3+1):
    if S[i] == "C":
        countC += 1
        place = i
if countC == 1:
    C = True
else:
    C = False

s = True
for i in range(1,len(S)):
    if i != place:
        if S[i] not in small:
            s = False



if (A and C and s):
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=input()
flag=True
if S[0]=="A":
    if S[2:-1].count("C")==1:
        S=S.replace('A','').replace('C','')
        if S==S.lower():
            flag=True
        else:
            flag=False
    else:
        flag=false
else:
    flag=False
if flag:
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
smalls = "abcdefghijklmnopqrstuvwxyz".split()
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	not in smalls:
            return False
	if char	== "C":
            count += 1
    if count !=	1:
	return False
    return True

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