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:
strings=str(input())
if(strings.find('A')==0):
    strings=strings.replace('A','')
    if(strings.find('C')==0):
        print('WA')
    else:
        strings = strings[1:]
        if(strings[-1:]=='C'):
            print('WA')
        elif(strings.count('C')==1):
            print('AC')
        else:
            print('WA')

    pass
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s_list = list(input())

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
import sys

S = input()
C_count = 0

if(S[0] == 'A'):
  for i in range(2, len(S)-1):
    if(S[i] == 'C'):
      C_count += 1
      C_i = i
  if(C_count == 1):
    for i in range(1, len(S)):
      if(i != C_i):
        if(S[i].isupper()):
          break
    print("AC")
    sys.exit()

print("WA")

Submission status: Wrong Answer

Solution code:
import re

s = input()
reg = re.match('[A][a-z]+[C][a-z]+', s)
if reg:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import re

S = input()
matchObj = re.match("^A[a-z]C{1}[^C]*[a-z]$", S)
if matchObj:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s=input()

if s[0]=="A" and s[2]=="C":
    l=len(s)
    c=0
    for i, j in enumerate(s):
        if 2<=i and i<=l-1:
            if j=="C":
                c+=1
    if c==1:
        s2=s.lower()
        if s[1]==s2[1] and s[3:]==s2[3:]:
            print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
import re

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

Submission status: Wrong Answer

Solution code:
import re

S = input()

if(S[0] == 'A'):
    regex = r'[a-z]*C[a-z]*'
    ans = re.match(regex, S[2:len(S)-1])
    if(ans != None):
        if(ans.span() == (0, len(S[2:len(S)-1]))):
            print('AC')
        else:
            print('WA')
    else:
        print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

line = list(input())
mid = [ line[i] for i in range(2,len(line)-1)]
mid2 = [ line[i] for i in range(2,len(line)-1)]
if "C" in mid2:
    mid2.remove("C")

#print(line)
#print(mid)

if line[0] == "A" and mid.count("C") == 1 and ''.join(mid2).islower() :
    print("AC")
else:
    print("WA")



#S の先頭の文字は大文字の A である。
#S の先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1 個含まれる。
#以上の A, C を除く S のすべての文字は小文字である。

Submission status: Wrong Answer

Solution code:
n=input()
l=list(n)
num=len(l)-2
if l[0]!='A':
    print('WA')
elif 'C' not in l:
    print('WA')
elif l[0]=='C' or l[1]=='C' or l[-1]=='C':
    print('WA')
else:
    l.remove("A")
    l.remove('C')
    str=''
    for x in l:
        s=str+x
    if s.islower()=='False':
        print('WA')
    else:
        print('AC')

Submission status: Wrong Answer

Solution code:
s=input()

if s[0]=="A" and s[2]=="C":
    l=len(s)
    c=0
    for i, j in enumerate(s):
        if 2<=i and i<=l-1:
            if j=="C":
                c+=1
    print(c)
    if c==1:
        s2=s.lower()
        if s[1]==s2[1] and s[3:]==s2[3:]:
            print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import re

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

Submission status: Wrong Answer

Solution code:
letters = input()
C = letters[2:-3]

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

Submission status: Wrong Answer

Solution code:
import copy

def main():
    string = input()
    if string[0] == "A":
        cnt = 0
        index = 0
        for i in range(2, len(string)-1):
            if string[i] == "C":
                cnt += 1
                index = i
        if cnt == 1:
            cp_str = copy.copy(string)
            string = "a" + string[1:index-1] + "c" + string[index+1:]
            if string == cp_str.lower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input()

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

if a and b and c:
    print('AC')
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] == "C":
            S = str(S.replace("A", ""))
            S = str(S.replace("C", ""))
            A = S.islower()
            if A == True:
                a = 1
if a == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = str(input())
s1 = ''
if len(s) <= 4:
    df = len(s)
else:
    df = len(s) - 1

flag = False

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

if s1.islower():
    flag = True
else:
    flag = False
    

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

Submission status: Wrong Answer

Solution code:
import copy

def main():
    string = input()
    if string[0] == "A":
        cnt = 0
        index = 0
        for i in range(2, len(string)-1):
            if string[i] == "C":
                cnt += 1
                index = i
        if cnt == 1:
            cp_str = copy.copy(string)
            string = "a" + string[1:index-1] + "c" + string[index+1:]
            print(string)
            print(cp_str)
            if string == cp_str.lower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
string = input()
answer = True
appearLargeC = False
for i in range(len(string)):
    if(string[i] == 'A'):
        if(i != 0):
            answer = False
            break;
    elif(string[i]== 'C'):
        if(i<2 or i > len(string) - 2 or appearLargeC == True):
            answer = False
            break;
        else:
            appearLargeC = True
    elif(string[i].islower() == False):
        answer = False
        break;

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

Submission status: Wrong Answer

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

if len(S) ==4:
    if S[0]=='A' and S[2] == 'C' and S[1].islower()==True and S[3].islower()==True:
        print('AC')
    else:
        print('WA')
else:
    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:
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:] + 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:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def check(str):
	print(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]) and S[1].islower() and S[len(S) - 1].islower():
	print('AC')
else:
	print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s_list = list(input())

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 = Str.replace("C", "")
        if Str.islower():
            print("AC")
        else:
            print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

a = S.count('A')
c = S[2:-1].count('C')

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


s = str(input())

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

flag = False

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

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

Submission status: Wrong Answer

Solution code:
s = input()


def lower_checker(ss):

    for k in ss:
        if k != 'A' and k != 'C' and k.islower() is False:
            return False
    return True

flag = True
if s[0] != 'A':
    flag = False
if flag is False or 'C' not in s[2:-1]:
    flag = False
if flag is False or not lower_checker(s):
    flag = False

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

Submission status: Wrong Answer

Solution code:
letters = input()
C = letters[2:-3]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re

point1 = 0
count1 = 0
point2 = 0
point3 = 0
	
S = input()
l = len(S)
if S[0]=='A':
	point1+=1
for n in range(2,l-2):
	if S[n]=='C':
		count1+=1
if count1==1:
	point2+=1
	
SS = re.sub("A","",S)
SS = re.sub("C","",SS)
if SS.islower():
	point3+=1
	
xx = point1+point2+point3

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

Submission status: Wrong Answer

Solution code:
S = input()

ans = 'AC'
c_cnt = 0
c_idx = []
for i in range(2, len(S)-1):
    if(S[i] == 'C'):
        c_cnt += 1
        c_idx.append(i)

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

if(c_cnt != 1):
    ans = 'WA'

if(c_cnt > 0):
    for i in range(1, len(S)):
        if(i == c_idx[0]):
            continue
        if(S[i].isupper == True):
            ans = 'WA'

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] == 'A':
    if s[2:-1].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()
S_len = len(S)
import re

S_check = []
if S[0] == 'A':
    for i in range(2,S_len-2):
        if S[i] == 'C':
            S_check.append(1)
    if len(S_check) == 1:
        a = re.findall('A', S)
        b = re.findall('C', S)
        if len(a) == 1 and len(b) == 1 :
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
L = len(S)
Flag = True
if not S[0] == 'A':
    Flag = False
cnt = 0
a = str(S[1])
for i in range(2,L-1):
    if S[i] == 'C':
        cnt += 1
    else:
        a += S[i]

if a.lower() and cnt == 1:
    pass
else:
    Flag = False
if Flag:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = list(input())

flag = True

if s[2]=="C":
    s[2] = "c"
elif s[-2]=="C":
    s[-2] = "c"
else:
    flag = False

if s[0]=="A":
    s[0] = "a"
else:
    flag = False

if not "".join(s).islower():
    flag = False

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

Submission status: Wrong Answer

Solution code:
s = input()
    
if s[0] != 'A':
    print('WA')
elif 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:
import re

s = input()
reg = re.match('[A][a-z]+[C][a-z]{2}', s)
if reg:
    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:
S = input()

n = len(S)

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

Submission status: Wrong Answer

Solution code:
S = str(input())

ans = "AC"

if not S[0] == "A":
    ans = "WA"

cfind = S[2:-1].find("C")
if cfind < 0:
    ans = "WA"

if not S[1:cfind+2].islower and S[cfind+3:].islower():
    ans = "WA"

print(ans)

Submission status: Wrong Answer

Solution code:
s_list = list(input())

if s_list[0] == "A":
    del s_list[:2], s_list[-1]
    print(s_list)
    Str = "".join(s_list)
    if Str.count("C") != 1:
        print("WA")
    else:
        Str = Str.replace("C", "")
        if Str.islower():
            print("AC")
        else:
            print("WA")
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 == 0:
		k = k
	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:
#coding:utf-8
s=input()
count=True
dumy=0
for i in range(len(s)):
  if(s[i]>="A" and s[i]<="Z"):
    dumy+=1
if(dumy!=2):
  count=False
dumy=0
if(s[0]=="A"):
  for i in range(len(s)):
    if(s[i]=="C"):
      dumy+=1
else:
  count=False
if(dumy!=1):
  count=False
if(count==False):
  print("WA")
else:
  print("AC")

Submission status: Wrong Answer

Solution code:
class Solution:

    def check(self):
        s = input()
        if s[0] != "A":
            return 'WA'
        if s[2].count("C") + s[-2].count("C") !=1:
            return "WA"
        ncount = 0
        for i in s:
            if "A"<=i<="Z":
                ncount +=1
        if ncount>2:
            return "WA"
        return "AC"
print(Solution().check())

Submission status: Wrong Answer

Solution code:
import re
S = input()

flag = 0
if S[0] == "A":
    for i in S[2:-1]:
        if i == "C":
            flag += 1
    if flag == 1:
        if S.replace("A","").replace("C","") not in r'[A-Z]':
            print("AC")
            quit()
print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

s_list=list(s)

C_num=-1

if (s_list[0]!="A"):
  print("WA")
else:
  nagasa=len(s_list)

  num=0
  for i in range(2,nagasa-2):
    if s_list[i]=="C":
      num += 1
      C_num=i

  if num!=1:
    print("WA")
  else:
    del s_list[0]
    del s_list[C_num-1]
    mojiretu = ''.join(s_list)
    if(mojiretu.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[2:len(s)-1]
    print(a)
    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()
S1 = list(S)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
L = len(S)
Flag = True
if not S[0] == 'A':
    Flag = False
cnt = 0
a = ''
for i in range(1,L-1):
    if S[i] == 'C':
        cnt += 1
    else:
        a += S[i]

if a.lower() and cnt == 1:
    pass
else:
    Flag = False
if Flag:
    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+1)
  if a.islower() == True:
     print "AC"
  else:
     print "WA"
else:
  print "WA"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
ss = str(input())
if ss[0] == "A" and ss.count("A") == 1 and ss.count("C") ==1  :
    check = []
    for i in range(2,len(ss)-2):
        check.append(ss[i])
    flag = 0
    if check.count("C") == 1:
        flag = 1
    s = list(ss)
    s.remove("A")
    s.remove("C")
    pp = ""
    for i in s :
        pp = pp + i
    if s.count("A") == 0 and s.count("C") == 0 and pp.islower():

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import string
write = input()
judge = 0
s = write[2:-1]
if s.count("C") == 1 and write[0] == "A":
    write = write.replace("A","a")
    write = write.replace("C","c")
    for i in write:
        if i in string.ascii_lowercase:
            judge += 1
    if judge == len(write):
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
flag = True

if s[2]=="C":
    s[2] = "c"
elif s[-2]=="C":
    s[2] = "c"
else:
    flag = False

if s[0]=="A":
    s[0] = "a"
else:
    flag = False

if not "".join(s).islower():
    flag = False

if flag:
    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)):
            if x!=i:
                if S[i].isupper():
                    print("WA")
                    exit()
        print("AC")
        exit()

Submission status: Wrong Answer

Solution code:
s = input()
    
if s[0] != 'A':
    print('WA')
elif 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()
if S[0]=="A" and S[1:-2].count("C")==1:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
if S[0]!="A":
  print("WA")
elif len([i for i in S[3:-2] if i == "C"]) != 1:
  print("WA")
elif len([i for i in S if i.islower()]) != len(S)-2:
  print("WA")
else:
  print("AC")

Submission status: Wrong Answer

Solution code:
def check(s):
    t=True
    if s[0]!="A" :
        t=False
        #print("reached")
    a=s[3: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:
S = input()

a = S.count('A')
c = S[2:-1].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:
S = input()
S1 = list(S)

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

Submission status: Wrong Answer

Solution code:
S = input()
s = S[2:-2]
if S[0] != 'A':
    print('WA')
    exit()
flag = 0
for i in s:
    if i == 'C':
        flag += 1
if flag != 1:
    print('WA')
    exit()
l = list(S[1:])
l.remove('C')
l = ''.join(l)
if l != l.lower():
    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:
  c = b.index("C")
  a.pop(0)
  a.pop(c+1)
  if a.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[3: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("ACoder")

Submission status: Wrong Answer

Solution code:
S = list(input())
N = 0
num = 0
answer = False

if S[0] == 'A':
    del S[0]
    for i in range(1, len(S)-1):
        if S[i] == 'C':
            num += 1
            N = i
    if num == 1:
        del S[N]
        SS = ''.join(S)
        answer = True
        
if answer == True:
    print('AC')
elif answer == False:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
s_2 = s[2:-1]
s_3 = s[:2] + s_2.replace("C", "") + s[-1]
s_3 = s_3.replace("A", "", 1)
print(s_3)
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:
import re

S = input()
matchObj = re.match("^A[a-z]C[ABa-z]+[a-z]*", S)
if matchObj:
  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:]==s2[3:]:
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
flag = 'WA'
if S[0] == 'A':
    ss = S[1]
    s = S[2:]
    cnt_c = 0
    for i in range(len(s)-2):
        m = s[i]
        if m == 'C':
            cnt_c += 1
            #print(s[i])
            m = 'c'
        ss += m
    ss += s[-2:]
    #print(ss)
    if cnt_c == 1 and ss.islower():
        flag = 'AC'

print(flag)

Submission status: Wrong Answer

Solution code:
# vim: set fileencoding=utf-8 :
s = str(raw_input())

if s[0] == "A" and s[2:].count("C") == 1 and s[::-1][1:].count("C") == 1:
    s = s.replace("A", "a")
    s = s.replace("C", "c")
    if s.islower():
        print("AC")
else:
    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[1] == '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 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()


def lower_checker(ss):
    flag = True
    for k in ss:
        if k != 'A' or k != 'C':
            flag = flag and k.islower()
    return flag

flag = True
if s[0] != 'A':
    flag = False
if flag is False or 'C' not in s[3:-2]:
    flag = False
if flag is False or not lower_checker(s):
    flag = False

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

Submission status: Wrong Answer

Solution code:
import re
S = input()

flag = 0
if S[0] == "A":
    for i in S[2:-1]:
        if i == "C":
            flag += 1
    if flag == 1:
        if S.replace("A","").replace("B","") not in r'[A-Z]':
            print("AC")
            quit()
print("WA")

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  :
    check = []
    for i in range(2,len(ss)-2):
        check.append(ss[i])
    flag = 0
    if check.count("C") == 1:
        flag = 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() and flag == 1 :
            print("AC")
        else:
            print("WA")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
counter = 0
Ccounter = 0
while len(s)-4 >= counter:
    if s[counter+2] == "C" or s[counter+2].islower() == False:
        Ccounter += 1
    counter += 1
if s[0]=="A" and Ccounter == 1:
    print("AC")
else:
    print("WA")