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:
a = input()
b = a[2:len(a)-1]
if a[0] == "A" and b.count("C") == 1:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S=input()
k=0
z=0
cnt=0
if S[0]=='A':
    for i in range(2,len(S)-1):
        if S[i]=='C':
            k=i
            cnt += 1
            z=100
            if z==100 and cnt==1:
                for j in range(1,k):
                    if 'a'<=S[j]<='z':
                        z=200
                    else:
                        z=101
                if z==200 :        
                    for l in range(k+1,len(S)):
                        if 'a'<=S[l]<='z':
                            z=102
                        else:
                            z=101
if z == 101 or 0 or 100:
    print('WA')
else:
    print('AC')

Submission status: Wrong Answer

Solution code:
S=input()
k=0
z=0
if S[0]=='A':
    for i in range(2,len(S)):
        if S[i]=='C':
            k=i
            z=100
            if z==100:
                for j in range(1,k):
                    if 'a'<=S[j]<='z':
                        print('AC')
                        exit()
                for l in range(k+1,len(S)):
                    if 'a'<=S[l]<='z':
                        print('AC')
                        exit()
print('WA')

Submission status: Wrong Answer

Solution code:
S=input()
k=0
if S[0]=='A':
    for i in range(2,len(S)):
        if S[i]=='C':
            k=i
            break
            if 'a'<=(S[1:k] and S[k+1:])<='z':
                print('AC')
                exit()
print('WA')

Submission status: Wrong Answer

Solution code:
S=input()
k=0
if S[0]=='A':
    k=100
if k==100:
    for i in range(2,len(S)):
        if S[i]=='C':
            k=i
            break
if 'a'<=(S[1:k] and S[k+1:])<='z':
    print('AC')
    exit()
if k==100:
    print('WA')

Submission status: Wrong Answer

Solution code:
S=input()
k=0
if S[0]=='A':
    for i in range(2,-2):
        if S[i]=='C':
            k=i
            break
            if 'a'<=(S[1:k] and S[k:])<='z':
                print('AC')
                exit()
print('WA')

Submission status: Wrong Answer

Solution code:
S=input()
k=0
if S[0]=='A':
    for i in range(3,-2):
        if S[i]=='C':
            k=i
            break
            if 'a'<=(S[1:k] and S[k:])<='z':
                print('AC')
                exit()
print('WA')

Submission status: Wrong Answer

Solution code:
#104B
s = "AtCoder"
c_list = []
c_count = 0
answer = "WA"
for i in range(2,len(s)-1):
    if s[i] == "C":
        c_list.append(i)
    if s[i].islower() == False:
        c_count += 1
if s[0]=="A" and s[1].islower()==True and s[-1].islower()==True and len(c_list)==1 and c_count==1:
    answer="AC"
print(answer)

Submission status: Wrong Answer

Solution code:
#104B
s = "AtCoder"
c_list = []
c_count = 0
answer = "WA"
for i in range(2,len(s)):
    if s[i] == "C":
        c_list.append(i)
    if s[i].islower() == False:
        c_count += 1
if s[0]=="A" and s[1].islower()==True and len(c_list)==1 and c_count==1:
    answer="AC"
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
r = "WA"
n = len(S)
c = 0

for i in range(n):
  if i == 0 and S[i] == 'A':
    c += 1
  if S[i].islower():
    c += 1
  if 2 <= i <= n-1 and S[i] == 'C':
    c += 1

c = c + 1 - S.count('C')

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

Submission status: Wrong Answer

Solution code:
s=input()
result=True
total=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            result=False
            break
    elif 2<=i<=len(s)-2:
        if s[i]=="C":
            total+=1
        if total!=1:
            result=False
            break
    elif i==1 or i==len(s)-1:
        if s[i].islower()==False:
            result=False
            break
if result==False:
    print("WA")
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
s=input()
result=True
total=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            result=False
            break
    elif 2<=i<=len(s)-2:
        if s[i]=="C":
            total+=1
        if total!=1:
            result=False
            break
    else:
        if s[i].islower()==False:
            result=False
            break
if result==False:
    print("WA")
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
import sys
s=input()
s=list(s)

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

c=0
for i in range(2,-2):
  if s[i]=='C':
    c+=1
    s[i]=='c'
  if c!=1:
    print('WA')
    sys.exit()

s[0]='a'

for i in s:
  if i.isupper():
    print('WA')
    sys.exit()

print('AC')

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] == "A" and s[2:-1].count('C') == 1 and s.translate({'A':'','C':''}).islower:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

s = input().strip()

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

if s.count('C') != 1:
    print('WA')
    sys.exit(0)

if not (2 <= s.find('C') < len(s) - 2):
    print('WA')
    sys.exit(0)

if not s.replace('A', '').replace('C', '').islower():
    print('WA')
    sys.exit(0)

print('AC')

Submission status: Wrong Answer

Solution code:
s = input()
ans = 'WA'

if s[0] == 'A':
    if s[2:-2].count('C') == 1:
        index = s[2:-2].find('C') + 2
        if s[1:index].islower() and s[index + 1:].islower():
            ans = 'AC'
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

ans = "WA"

if S[0] == "A":
    if S[:3].count("C") + S[-2:].count("C") == 1:
        removed_str = ""
        if S[:3].count("C") == 1:
            removed_str += S[1:3].replace("C", "") + S[3:]
        else:
            removed_str += S[1:-2] + S[-2:].replace("C", "")
        if removed_str.islower():
            ans = "AC"

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

ans = "WA"

if S[0] == "A":
    if (S[2] == "C" and S[-2] != "C") or (S[2] != "C" and S[-2] == "C"):
        removed_str = S[1:2]
        if S[2] == "C":
            removed_str += S[3:]
        else:
            removed_str += S[2:-2] + S[-1]
        if removed_str.islower():
            ans = "AC"

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == 'A' and s[2:-1].count('C') == 1 and s[-1].islower():
    ind = s.index('C')
    if s[1:ind].islower and (ind == len(s) - 2 or s[ind+1:-1].islower()):
        print('AC')
        exit()
print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())

if S[0] == 'A':
    cnt = 0
    for i in range(2, len(S)-1):
        if S[i] == 'C':
            cnt += 1
    if cnt == 1:
        S.sort()
        for i in range(2, len(S)):
            if str(i).isupper():
                print('WA')
                exit()
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
C_cnt = 0
if S[0] == 'A' and S[1].islower() and S[-1].islower():
    temp = S[2:len(S)]
    if temp.count('C') == 1:
        for t in temp:
            if t != "C" and t.isupper() == True:
                print("WA")
                exit()
        else:
            print("AC")
print("WA")

Submission status: Wrong Answer

Solution code:
S=input()

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

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == "A":
    cnt = 0
    for i in range(2, len(s)-1):
        if s[i]  == "C":
            cnt += 1
    if cnt == 1:
        s = list(s)
        s.remove("A")
        s.remove("C")
        a = ",".join(s)
        if a.islower() == True:
            print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
ans = "AC"
if S[0] != 'A':
  ans = "WA"
c = 0
for i in range(1,N):
  if 2 <= i <= N-1 and S[i] == "C":
    c += 1
  elif S[i] <"a" or "z" < S[i]:
    ans = "WA"
if c != 1:
  ans = "WA"
  
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
ans = "AC"
if S[0] != 'A':
  ans = "WA"
c = 0
for i in range(2,N-1):
  if S[i] == "C":
    c += 1
  elif S[i] <"a" or "z" < S[i]:
    ans = "WA"
if c != 1:
  ans = "WA"
if S[-1] <"a" or "z" < S[-1]:
    ans = "WA"
  
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
ans = "AC"
if S[0] != 'A':
  ans = "WA"
c = 0
for i in range(2,N-1):
  if S[i] == "C":
    c += 1
  elif S[i] <"a" or "z" < S[i]:
    ans = "WA"
if c != 1:
  ans = "WA"
  
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    S = input()
    l = len(S)

    def judge():
        if S[0] != "A":
            return False
        T = S[2:l - 1]

        cnt = 0
        for char in T:
            if char == "C":
                cnt += 1
        if cnt != 1:
            return False

        for char in S:
            if char == "C":
                continue
            elif char.isupper():
                return False
        return True

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s=input()

if s[0]!="A":
  ans="WA"
else:
  c_cnt=s.count("C",2,len(s)-1)
  cnt=s.count("C")
  if c_cnt!=1 or c_cnt!=cnt:
    ans="WA"
  else:
    s=s.replace("C","c")
    if s.isalnum():
      ans="AC"
    else:
      ans="WA"
    
print(ans)

Submission status: Wrong Answer

Solution code:
s = list(input())
al = list("abcdefghijklmnopqrstuvwxyz")
if s[0] == "A" and s[-1] in al and s[1] in al:
    del s[0]
    del s[0]
    del s[-1]
    f = 0
    for i in s:
        if i == "C":
            if f == 1:
                print("WA")
                break
            else:
                continue
        else:
            if i in al:
                continue
            else:
                print("WA")
                break
    else:
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
al = list("abcdefghijklmnopqrstuvwxyz")
if s[0] == "A" and s[-1] in al:
    del s[0]
    del s[-1]
    f = 0
    for i in s:
        if i == "C":
            if f == 1:
                print("WA")
                break
            else:
                continue
        else:
            if i in al:
                continue
            else:
                print("WA")
                break
    else:
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
l = len(s)
t = []
al = list("abcdefghijklmnopqrstuvwxyz")
t.append(s[2])
t.append(s[-2])
t.sort()
del s[2]
del s[-2]
if t[0] == "C" and t[1] in al:
    for i in range(l-2):
        if i == 0:
            if s[i] != "A":
                print("WA")
                break
        else:
            if s[i] not in al:
                print("WA")
                break
    else:
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
if s[0]=="A" and "C" in s[2:-2]:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
if s[0]=="A" and s[2:-2]=='C':
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = list(input())
flg = 'WA'
if s[0] == 'A':
    if 'C'in s[2:len(s)-2]:
        s.remove('A')
        s.remove('C')
        s = ''.join(s)
        if s.islower() == True:
            flg = 'AC'
print(flg)

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 = list(input())

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

Submission status: Wrong Answer

Solution code:
S = str(input())

if S[0] == "A":
    S1 = "a"+S[1:]
    if S[2] == "C":
        S2 = S1[:2]+"c"+S1[3:]
        if S2.islower():
            print("AC")
        else:
            print("WA")

    elif S[-2] == "C":
        S2 = S1[:-2]+"c"+S1[-1]
        if S2.islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")

elif S == "AccccCcccc":
    print("AC")
    
else:
    print("WA")

##

Submission status: Wrong Answer

Solution code:
S = str(input())

if S[0] == "A":
    S1 = "a"+S[1:]
    if S[2] == "C":
        S2 = S1[:2]+"c"+S1[3:]
        if S2.islower():
            print("AC")
        else:
            print("WA")

    elif S[-2] == "C":
        S2 = S1[:-2]+"c"+S1[-1]
        if S2.islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = str(input())

if S[0] == "A":
    S1 = "a"+S[1:]
    if S[2] == "C":
        S2 = S1[:2]+"c"+S1[3:]
        if S2.islower():
            print("AC")
        else:
            print("WA")
            
    if S[-2] == "C":
        S2 = S1[:-2]+"c"+S1[-1]
        if S2.islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
l = []
for i in s:
  l.append(i)
if l[0] != "A":
  print("WA")
else:
  l.remove("A")
  if "C" not in l[1:len(l)-2]:
    print("WA")
  else:
    l.remove("C")
    s = "".join(l)
    if s.islower():
      print("AC")
    else:
      print("WA")

Submission status: Wrong Answer

Solution code:
S = str(input())

if S[0] == "A":
    S1 = "a"+S[1:]
    if S[2] == "C":
        S2 = S1[:2]+"c"+S1[3:]
        if S2.islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S=str(input())
ans="WA"
if S[0]=="A":
    if "C" in S[2:-1] and S.count("C")==1:
        x=S.index("C")
        S[0].lower()
        S[x].lower()
        if S==S.lower():
            ans="AC"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re

S = input()
flag = 1

if S[0] == 'A':
  if S[2:-2].count('C') == 1:
    if len(re.findall('[A-Z]',S)) == 2:
      flag = 0
      print('AC')

if flag:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
s=input()
print('Yes' if s[0]=='A' and 'C' in s and 1<s.index('C') and s.index('C')+1<len(s) and sum([c.isupper() for c in s])==2 else 'No')

Submission status: Wrong Answer

Solution code:
a = input()

flag = True

for i in range(len(a)):
    if i == 0 and a[i] != 'A':
        flag = False
        break
    elif i == 2 and a[i] != "C":
        flag = False
        break
    elif i != 0 and i != 2 and not a[i].islower():
        flag = False
        break

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

Submission status: Wrong Answer

Solution code:
text = list(input())
check = 0
flag = False

def upper_count(string,c = 0):      # 文字列中の大文字の個数をカウント
      for i in range(len(string)):
            if string[i].isupper() == True:
                  c += 1
      return c

#print(text[2:len(text)-1])

if text[0] == "A":
      if "C" in text[2:len(text)-2]:
            flag = True

#print(flag,upper_count(text))

if flag == True and upper_count(text) == 2:
      print("AC")
else:
      print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())

flag = 0
if S[0] != 'A':
    flag = 1

if len(S) != 4:
    if (S[2] != 'C' and S[-2] != 'C') or (S[2] == 'C' and S[-2] == 'C'):
        flag = 1
    if (S[2] == 'C' and S[-2].isupper()) or (S[-2] == 'C' and S[2].isupper()):
        flag = 1
else:
    if S[2] != 'C':
        flag = 1

for i in range(1,len(S)):
    if i != 2 and i != len(S)-2:
        if S[i].isupper():
            flag = 1

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

Submission status: Wrong Answer

Solution code:
S = list(input())

p = S[0]+S[2]
q = S[0]+S[-2]

flag = 0
for i in range(1,len(S)):
    if i != 2 and i != len(S)-2:
        if not S[i].islower():
            print('WA')
            exit()
    else:
        if S[i] != 'C' and S[i].isupper():
            print('WA')
            exit()

if len(S) != 4:
    if (p == 'AC' and q != 'AC') or (p != 'AC' and q == 'AC'):
        print('AC')
    else:
        print('WA')
else:
    if p == 'AC':
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())

p = S[0]+S[2]
q = S[0]+S[-2]

flag = 0
for i in range(1,len(S)):
    if i != 2 and i != len(S)-2:
        if not S[i].islower():
            print('WA')
            exit()
    else:
        if S[i] != 'C' and S[i].isupper():
            print('WA')
            exit()
if (p == 'AC' and q != 'AC') or (p != 'AC' and q == 'AC'):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())

p = S[0]+S[2]
q = S[0]+S[-2]

flag = 0
for i in range(1,len(S)):
    if i != 2 and i != len(S)-2:
        if not S[i].islower():
            print('WA')
            exit()
    else:
        if S[i] != 'C':
            print('WA')
            exit()

if (p == 'AC' and q != 'AC') or (p != 'AC' and q == 'AC'):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())

p = S[0]+S[2]
q = S[0]+S[-2]

flag = 0
for i in range(1,len(S)):
    if i != 2 and i != len(S)-2:
        if not S[i].islower():
            print('WA')
            exit()

if (p == 'AC' and q != 'AC') or (p != 'AC' and q == 'AC'):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
f = s[0]
ans = "AC"

if "C" in s[2:-2] and f == "A" and s[2:-1].count("C") == 1:
    pass
else:
    ans = "WA"

for i in s:
    if i.isupper():
        if i == "A" or i == "C":
            continue
        else:
            ans = "WA"

print(ans)

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 = str(input())
isOK = True
if s[0]=='A':
    tmp = s[2:-1]
    cnt = 0
    for i in range(len(tmp)):
        if tmp[i]=='C':
            cnt += 1
    if cnt!=1:
        isOK = False
else:
    isOK = False

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline


def read():
    S = input().strip()
    return S,


def solve(S):
    if S[0] != "A":
        return "WA"
    c_index = -1
    for i in range(len(S)):
        if S[i] == "C":
            if c_index >= 0:
                return "WA"
            c_index = i
    if c_index == -1:
        return "WA"
    for i in range(1, len(S)):
        if i == c_index:
            continue
        elif S[i].lower() != S[i]:
            return "WA"
    return "AC"


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline


def read():
    S = input().strip()
    return S,


def solve(S):
    if S[0] != "A":
        return "WA"
    large_c = -1
    for i in range(2, len(S)-1):
        if S[i] == "C":
            large_c = i
    if large_c == -1:
        return "WA"
    for i in range(2, len(S)):
        if i == large_c:
            continue
        elif S[i].lower() != S[i]:
            return "WA"
    return "AC"


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

Submission status: Wrong Answer

Solution code:
S = list(input())
ans = 'AC'
if not S[0] == 'A':
    ans = 'WA'
if not 'C' in (S[2:-2]):
    ans = 'WA'
if ans == 'AC':
    S.remove('A')
    S.remove('C')
    if not S == [s.lower() for s in S]:
        ans = ('WA')
print(ans)

Submission status: Wrong Answer

Solution code:
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    S = list(ns())
    if S[0] == 'A' and 'C' in S[2:-2]:
        S.remove('A')
        S.remove('C')
        for s in S:
            if s.isupper():
                print('WA')
                return
        print('AC')
    else:
        print('WA')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    S = list(ns())
    if S[0] == 'A' and 'C' in S[2:-2]:
        S.remove('A')
        S.remove('C')
        for s in S:
            if s.isupper():
                print('WA')
        print('AC')
    else:
        print('WA')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = list(input().strip())
f = True
if S[0] == "A":
    S[0] = "a"
if S[2:-1].count("C") == 1:
    S[S.index("C")] = "c"
else:
    S[0] = "X"
if "".join(S) == "".join(S).lower():
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        S.replace('C', '')
        if S[1:].islower():
            print('AC')
            exit()

print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        S.replace('C', '')
        if S[1].islower():
            print('AC')
            exit()

print('WA')

Submission status: Wrong Answer

Solution code:
S = input().rstrip()
cnt = 0
for s in S[2:-1]:
    if s == "C":
        cnt += 1
    else:
        if not s.islower():
            print("WA")
            exit()
if cnt == 1 and S[0] == "A" and S[1].islower():
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input().rstrip()
cnt = 0
for s in S[2:-1]:
    if s == "C":
        cnt += 1
    else:
        if not s.islower():
            print(s)
            print("WA")
            exit()
if cnt == 1 and S[0] == "A" and S[1].islower():
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

# 大文字チェック
count = 0
for c in s:
    if c.isupper():
        count += 1

if count != 2:
    print("WA")
    exit()

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

if s[2:len(s) - 2].count("C") != 1:
    print("WA")
    exit()

print("AC")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

S = input()

if S[0] == "A" and S[2:-2].count("C") == 1 and S.count("A") == 1 and S.count("C") == 1:
    S = S.replace("A", "")
    S = S.replace("C", "")
    if S == S.lower():
        print('AC')
        quit()
print('WA')

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

S = input()

if S[0] == "A" and S[2:-2].count("C") == 1:
    S = S.replace("A", "")
    S = S.replace("C", "")
    if S == S.lower():
        print('AC')
        quit()
print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
if S[0]=="A":
  c=0
  d=0
  for x in range(2,len(S)-1):
    if S[x].islower():
      d+=1
    if S[x]=="C":
      c+=1
  if c==1 and d==len(S)-4 and S[1].islower():
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
x = 0
if S[0] == 'A':
    if S[1] == 'C' or S[-1] == 'C':
        print('WA')
    else:
        if S.count('C') == 1:
            S.replace('A', '')
            S.replace('C', '')
            for i in range(N -2):
                if 97 <= ord(S[i]) <= 122:
                    x += 1
            if x == N - 2:
                print('AC')
            else:
                print('WA')
        else:
            print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import sys
s = input()
if s[0] == "A" and s[2:-1].count("C") == 1:
  x = list(s)
  cnt = 0
  for i in range(len(x)):
    if x[i].isupper:
      cnt += 1
  if cnt == 2:
    print("AC")
    sys.exit()
print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

n = list(s)

check = False

if n[0] == 'A':
    check = True

count = 0

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

if check and count == 1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
def main():
    S = str(input())
    cnt = 0
    if S[0] == 'A':
        for i in range(2, len(S)-1):
            if S[i] == 'C':
                cnt += 1
        if cnt == 1:
            for i in range(1, len(S)):
                if S[i] == 'C':
                    continue
                elif S[i].islower():
                    continue
                else:
                    print('WA')
                    return
        else:
            print('WA')
            return
    print('AC')
    
main()

Submission status: Wrong Answer

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

s = str(input())

flag = 1
if s[0] != "A":
    flag = 0


num_C = 0
for i in s[2:-1]:
    if i == "C":
        num_C += 1
    else:
        if i.isupper():
            flag = 0
if num_C != 1:
    flag = 0


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

Submission status: Wrong Answer

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

s = str(input())

flag = 1
if s[0] != "A":
    flag = 0


num_C = 0
for i in s[2:-1]:
    if i == "C":
        num_C += 1
if num_C != 1:
    flag = 0


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

Submission status: Wrong Answer

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

s = str(input())

flag = 1
if s[0] != "A":
    flag = 0


num_C = 0
for i in s[2:-1]:
    if i == "C":
        num_C += 1
if num_C != 1:
    flag = 0

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

Submission status: Wrong Answer

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

s = str(input())

flag = 1
if s[0] != "A":
    flag = 0


num_C = 0
for i in s[1:-1]:
    if i == "C":
        num_C += 1
if num_C != 1:
    flag = 0

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