Problem:


Score : 200 points

Problem Statement

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

The initial character of S is an uppercase A.

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

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

Constraints

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

Each character of S is uppercase or lowercase English letter.

Input

Input is given from Standard Input in the following format:

S

Output

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

Sample Input 1

AtCoder

Sample Output 1

AC

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

Sample Input 2

ACoder

Sample Output 2

WA

The second letter should not be C.

Sample Input 3

AcycliC

Sample Output 3

WA

The last letter should not be C, either.

Sample Input 4

AtCoCo

Sample Output 4

WA

There should not be two or more occurrences of C.

Sample Input 5

Atcoder

Sample Output 5

WA

The number of C should not be zero, either.



Sample input:
AtCoder


Sample output:
AC

Submission status: Wrong Answer

Solution code:
S = list(input())
flagx = 0
flagy = 0
if S[0] == "A":
  S.pop(0)
else:
  flagx = 1
  
for i in range(1,len(S)-2):
  if S[i] == "C":
    S.pop(i)
    flagy = 0
    break
  else:
    flagy = 1
    
if str(S).islower() and flagx == 0 and flagy == 0:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
input_line = input()

if input_line[0] != 'A' or input_line[0].islower():
    print("WA")
    exit()
if input_line[2:-2].count('C') != 1:
    print("WA")
    exit()

if input_line.count('A') == 1 and input_line.count('C') == 1:
    must_lower = input_line.replace('A', '').replace('C', '')
    if must_lower.islower():
        print("AC")
        exit()

print("WA")
exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()
a = 0
if S[0] == "A":
    a = 1
b = 0
if S[1].islower() == True :
    b = 1
T = S[2:-2]
#print(T)
c = 0
if T.count("C") == 1 :
    c = 1
d = 0
if S[-2].islower() == True and S[-1].islower() == True :
    d = 1
e = 0
U = list(T)
checker = 0
for i in range(len(U)) :
    if U[i].isupper() == True :
        checker += 1
if checker == 1 :
    e = 1

if a == 1 and b == 1 and c == 1 and d == 1 and e == 1 :
    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)
  d = ""
  for i in range(len(a)):
     d += a[i] 
  if d.islower():
     print "AC"
  else:
     print "WA"
else:
  print "WA"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
string = input()
answer = True

if(string.count('C') == 0 or string.count('C') == 2):
    answer = 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)-1):
            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 = str(input())
if S[0] == "A":
    S = "a" + S[1:]
    print(S)
    if "C" in S[2:-1]:
        cs = False
        for i,s in enumerate(S[2:-1]):
            if not(cs) and s == "C":
                S = S[:i+2] + "c" + S[i+3:]
                print(S)
                cs = True
        if S.islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
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
    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(s1) >= 1:
    flag = True
else:
    flag = False

if flag and s[0] == 'A':
    print('AC')
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-1):
        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:
word = input('')

ans = 'WA'


if  (word[0] == 'A'):
    tmp = word[2:-1]
    number_c = 0
    for i in range(len(tmp)):
        if  tmp[i] == 'C':
            number_c += 1
            serial_c = i+2        
    if  number_c == 1:
        word_del = word[0:serial_c-1] + word[serial_c:]
        word_del = word_del[1:]
        
        if  word_del.islower:
            ans = 'AC'
print(ans)

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)
  d = ""
  for i in range(len(a)):
     d += a[i] 
  if d.islower:
     print "AC"
  else:
     print "WA"
else:
  print "WA"

Submission status: Wrong Answer

Solution code:
str = input()
len = len(str)
i = 0
c_cnt = 0

for s in str:
    if s == 'A':
        if i != 0:
            break
    elif s == 'C':
        if i < 2 or i == len-1:
            break
        elif c_cnt == 1:
            break
        else:
            c_cnt += 1
    elif 'A' <= s <= 'Z':
        break
    i += 1

if i == len and c_cnt == 1:
    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]*[a-z]'
    ans = re.match(regex, S[3:len(S)])
    if(ans != None):
        if(ans.span() == (0, len(S[3:len(S)]))):
            print('AC')
        else:
            print('WA')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] == "A":
  S.pop(0)
  
for i in range(1,len(S)-2):
  if S[i] == "C":
    S.pop(i)
    break
    
if str(S).islower():
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s_list = list(input())
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
    if count != 1:
        print("WA")
    else:
        del s_list[isC]
        Str = "".join(s_list)
        if Str.islower():
            print("AC")
        else:
            print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
from sys import stdin                                                                                                                                                                                       
s = stdin.readline().rstrip()                                                                                                                                                                               
a = s[2:-2]                                                                                                                                                                                                 
cnt = a.count("C")                                                                                                                                                                                          
index = s.find("C")                                                                                                                                                                                         
b = s[1:index]                                                                                                                                                                                              
c = s[index + 1:]                                                                                                                                                                                           
                                                                                                                                                                                                            
if s[0] == "A" and cnt == 1 and (b.islower() and c.islower()):                                                                                                                                              
    print("AC")                                                                                                                                                                                             
else:                                                                                                                                                                                                       
    print("WA")

Submission status: Wrong Answer

Solution code:
import string
write = input()
lis = list(write)
judge = 0
if write[-1] in string.ascii_uppercase:
    print("WA")
elif write[0] == "A" and write[2:-1].count("C") == 1:
    lis.pop(lis.index("A"))
    lis.pop(lis.index("C"))
    for i in lis:
        if i in string.ascii_lowercase:
            judge += 1    
    if judge == len(lis):
        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 "C" in S[2:-2]:
            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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def check_string(s):
  if(a_exist(s)):
    c_index = c_find(s)
    if(c_index != False):
      if(is_lower(s,c_index)):
        return 'AC'
  return 'WA'

def a_exist(s):
  if(s[0] == 'A'):
    return True
  else:
    return False

def c_find(s):
  c = len(s) - 3
  c_cnt = 0
  for i in range(c):
    if(i < 2):
      continue
    if(s[i] == 'C'):
      c_cnt += 1
      index = i
  if(c_cnt == 1):
    return index
  else:
    return False

def is_lower(s,index):
  for i in range(len(s)):
    if(i == 0):
      continue
    if(i == index):
      continue
    if(s[i].lower == False):
      return False
  return True

if __name__ == '__main__':
  s = input()
  print(check_string(s))

Submission status: Wrong Answer

Solution code:
s = 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


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

Submission status: Wrong Answer

Solution code:
i = input()

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

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

import re

print(i[2:-1])
print(re.findall("A[a-z][a-z,C]{"+str(len(i)-3)+"}[a-z]",i),flag)

if re.findall("A[a-z][a-z,C]{"+str(len(i)-3)+"}[a-z]",i) and (flag == 1):
    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)
  d = ""
  for i in range(len(a)):
     d += a[i] 
  if d.islower() == True:
     print "AC"
  else:
     print "WA"
else:
  print "WA"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
letters = input()
C = letters[2:-2]
D = letters.replace("A","a").replace("C","c")


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

Submission status: Wrong Answer

Solution code:
import re

s = input()

if s[0] == "A" and s[2:-1].count("C") == 1 and re.search(r'[A-Z]',s[1:]).group() == "C":
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = str(input())
i = len(s)

sc = s.lstrip("A")
sb = sc.replace("C", "")

if s[0] == "A" and s[2:i - 1].count("C") == 1 and sb.islower() is True:
    print("AC")

else:
    print("WA")

print(sb)

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-3):
        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()
a = 0
if S[0] == "A":
    if S[2:-2].count("C") == 1:
        if "C" in S[2:-2]:
            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:
letters = input()
C = letters[2:-2]
D = letters.replace("A","a").replace("C","c")

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

Submission status: Wrong Answer

Solution code:
S=list(input())
flag=0
Ccount=0
Lcount=0
Cnumber=-1
if S[0]=="A":
  flag+=1
  del S[0]
N=len(S)
if flag==1:
  for i in range(1,N):
    if S[i]=="C":
      Ccount+=1
      Cnumber=i
  if Ccount==1:
    flag+=1
    del S[Cnumber]
if flag==2:
  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: 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(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


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

Submission status: Wrong Answer

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 and 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: Wrong Answer

Solution code:
import string
write = input()
lis = list(write)
judge = 0
if write[0] == "A" and write[2:-1].count("C") == 1 and write[-1] != "C":
    lis.pop(lis.index("A"))
    lis.pop(lis.index("C"))
    for i in lis:
        if i in string.ascii_lowercase:
            judge += 1    
    if judge == len(lis):
        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[1:-1].count("C") == 1:
        s = s[1:-1].replace("C","")
        if s.islower() == True:
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

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

if s[0] == "A" and s.count("A") == 1 and s[2:-1].count("C") == 1 and s.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()

l=len(s)
c=0

for i, j in enumerate(s):
        if 2<=i and i<=l-1 and j=="C":
                c+=1

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

Submission status: Wrong Answer

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

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(1, df):
        if s[i] == 'C':
            flag = True
        else:
            s1 += s[i]
else:
    flag = False

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


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

Submission status: Wrong Answer

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

if s[0] == "A" and s.count("A") == 1 and s[2:-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:
letters = input()
C = letters[2:-3]
D = letters.replace("A","a").replace("C","c")


if letters[0] == "A" and C.count("C") == 1 and D.islower() == True  :
  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 and \
    len([c for c in s if c.isupper()]) == 2:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
a = 0
if S[0] == "A":
    if S[2:-2].count("C") == 1:
        if "C" in S[2:-2]:
            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: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
s = input()
flag = True
c = 0
if s[0] != "A":
    flag = False
else:
    s = list(s)
    s[0] = "A"
    s = "".join(s)
    for i in range(2, len(s)-1):
        if s[i] == "C":
            s = list(s)
            s[i] = "c"
            s = "".join(s)
            c += 1
    if c != 1:
        flag = False
    else:
        t = s.lower()
        if t == s:
            flag = False



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

Submission status: Wrong Answer

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


def main():
    S = list(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
    S = "".join(S)
    if S.islower() == False:
        judge = False
    if judge:
        print("AC")
    else:
        print("WA")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S=list(input())
flag=0
Ccount=0
Lcount=0
Cnumber=-1
if S[0]=="A":
  flag+=1
  del S[0]
N=len(S)
for i in range(1,N):
  if S[i]=="C":
    Ccount+=1
    Cnumber=i
if Ccount==1:
  flag+=1
  del S[Cnumber]
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: 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:-1].count('C') == 1)):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

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

i = S[2:-1].find('C')
i = i + 2
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('WA')
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.count(r'[A-Z]') == 2:
            print("AC")
            quit()
print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

kai(s)

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(1, df):
        if s[i] == 'C':
            flag = True
        else:
            s1 += s[i]

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


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

Submission status: Wrong Answer

Solution code:
import string
write = input()
lis = list(write)
judge = 0
if write[0] == "A" and write[2:-1].count("C") == 1:
    lis.pop(lis.index("A"))
    lis.pop(lis.index("C"))
    for i in lis:
        if i in string.ascii_lowercase:
            judge += 1    
    if judge == len(lis):
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

if s[0] == "A" and s[2:-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()

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 == 1):
    for i in range(1, len(S)):
        if(i == c_idx[0]):
            continue
        if(S[i].isupper is True):
            ans = 'WA'

print(ans)

Submission status: Wrong Answer

Solution code:
print('AC')

Submission status: Wrong Answer

Solution code:
N = input()

A = N[0:2]
C = N[2:-1]
M = N[-1]


if A[0] == "A":
    if A[1].islower():
        if "C" in C and (C.lstrip("C")).islower():
            if M.islower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")       
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import re

S = str(input())

ans = "AC"

uppercount = len(re.findall('[A-Z]', S))
if not uppercount == 2:
    ans = "WA"

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

cfind = S[2:-1].find("C")
if cfind < 0 and uppercount == 1:
    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 = input()

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

Submission status: Wrong Answer

Solution code:
s=input()

if s[0]=="A":
    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:
import re

S = input()

if(S[0] == 'A'):
    regex = r'[a-z]*C[a-z]*[a-z]'
    ans = re.match(regex, S[2:len(S)])
    if(ans != None):
        if(ans.span() == (0, len(S[2:len(S)]))):
            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[2:-1].find('C')
i = i + 2
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:
N = input()

A = N[0:2]
C = N[2:-1]
M = N[-1]


if A[0] == "A":
    if A[1].islower():
        if "C" in C and (C.lstrip("C")).islower():
            if M.islower():
                print("AC")
        else:
            print("WA")
    else:
        print("WA")       
else:
    print("WA")

Submission status: Wrong Answer

Solution code:

import re

s = input()

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

Submission status: Wrong Answer

Solution code:
import re
s = input()
print('AC' if s[0].isupper() and 'C' in s[2:-2] and len(re.findall('[a-z]', s)) == len(s) - 2 else '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)-1 or appearLargeC == True):
            answer = False
            break;
        else:
            appearLargeC = True
    elif(string[i].islower() == False):
        answer = False
        break;

if answer and appearLargeC:
    print("AC")
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:
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:2] + 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()
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)-1 :
        if s[i].islower():
            print("AC")
            exit()
    else:
        break
print("WA")

Submission status: Wrong Answer

Solution code:
S=list(input())
length = len(S)
z1 = 0
z2 = 0
z3 = 0
if S[0] == "A":
    z1 = 1

for i in range(1,length-1):
    if S[i] == "C":
        z2 = z2 + 1

for i in range(length):
    if S[i].islower()==False:
        z3 = z3 + 1       

if [z1,z2,z3] == [1,1,2]:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a=int(0)
c=int(0)
x=int(0)

if s[0]=='A':
    s='a'+s[1:len(s)]
    a=1

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

t=s.lower()

if a==1:
    if c==1:
        if t==s:
            print('AC')
            x=1
if x==0:
    print('WA')

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)
    print(S)
    print(S[-1])
    S_1 = S[2:-2]
    S_1.remove('C')
    S = S[0:2] + S_1 + S[-2:]
    del S[0]
    print(S)
    c = str(S).islower()

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

Submission status: Wrong Answer

Solution code:
def m():
    s = str(input())
    if s[0] != "A":
        return "WA"
    if s.count("C") != 1:
        return "WA"
    if s[2] != "C" or s[-2] != "C":
        return "WA"
    for c in s[1:]:
        if c == "C":
            continue
        if c.isupper():
            return "WA"
    return "AC"


print(m())

Submission status: Wrong Answer

Solution code:
import re

S = str(input())

ans = "AC"

uppercount = len(re.findall('[a-z]', S))
if not uppercount == 2:
    ans = "WA"

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

cfind = S[2:-1].find("C")
if cfind < 0 and uppercount == 1:
    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=input()
#l=[]
#for ss in s:
#    l.append(ss)
q=0
if s[0]=="A":
    w=0
    for ss in s[2:-2]:
        if ss=="C":
            w+=1
#            l.remove(ss)

    if w==1:
        for ss in s[1:]:
            if ss=="C":
                continue
            elif ss==ss.lower() :
                continue
            else:
                q=1
                break
    else:
        q=1
else:
    q=1

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