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 = input()
if S[0] != 'A':
  print('WA')
  exit()
count = 0
if len(S) < 4:
  print('WA')
  exit()
for i in range(len(S) - 3):
  if S[i+2] == 'C':
    count += 1
  elif S[i+2].islower():
    continue
  else:
    print('WA')
    exit()
if count == 1:
  print('AC')
  exit()
print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

res = "AC"
if S[0] != "A" or S.count("C") != 1:
    res = "WA"

if "C" not in S[2:-2]:
    res = "WA"

if res == "AC":
    for s in S[1:]:
        if s != "C" and s != s.lower():
            res = "WA"
            break
print(res)

Submission status: Wrong Answer

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

S_m = S[2:len(S)-1]

# # print(S_m)

# S_p = [s for s in S_m if s != "C"]
# S_p = [s for s in S_p if s != "A"]

if S[0] == "A":
  if "C" in S_m and S.count("C") == 1:
    # S_p = [s for s in S_p if s != "C"]
    S_p = [s for s in S_m if s != "C"]
    S_p = [s for s in S_p if s != "A"]
    S_j = "".join(S_p)
    if S_j.islower() == True:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

S_m = S[2:len(S)-1]

# # print(S_m)

S_p = [s for s in S_m if s != "C"]
S_p = [s for s in S_p if s != "A"]

if S[0] == "A":
  if "C" in S_m and S.count("C") == 1:
    # S_p = [s for s in S_p if s != "C"]
    S_j = "".join(S_p)
    if S_j.islower() == True:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

S_m = S[2:len(S)-1]

S_p = [s for s in S_m if s != "C"]
S_p = [s for s in S_p if s != "A"]


if S[0] == "A":
  if "C" in S_m and S_m.count("C") == 1:
    S_p = [s for s in S_p if s != "C"]
    S_j = "".join(S_p)
    if S_j.islower() == True:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

S_m = S[2:len(S)-1]

#print(S_m)

# # print(S_m)


S_p = [s for s in S_m if s != "C"]
S_p = [s for s in S_m if s != "A"]


if S[0] == "A":
  if "C" in S_m and S_m.count("C") == 1:
    S_p = [s for s in S_p if s != "C"]
    S_j = "".join(S_p)
    if S_j.islower() == True:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

S_m = S[2:len(S)-1]

print(S_m)

# # print(S_m)


S_p = [s for s in S_m if s != "C"]
S_p = [s for s in S_m if s != "A"]


if S[0] == "A":
  if "C" in S_m and S_m.count("C") == 1:
    S_p = [s for s in S_p if s != "C"]
    S_j = "".join(S_p)
    if S_j.islower() == True:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

S_m = S[2:len(S)-1]

# print(S_m)


S_p = [s for s in S_m if s != "C"]

if S[0] == "A":
  if "C" in S_m and S_m.count("C") == 1:
    S_p = [s for s in S_p if s != "C"]
    S_j = "".join(S_p)
    if S_j.islower() == True:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

S_m = S[2:len(S)-1]

# print(S_m)


S_p = [s for s in S_m if s != "C"]

if S[0] == "A":
  if "C" in S_m and S_m[0] == "C" and S_m.count("C") == 1:
    S_p = [s for s in S_p if s != "C"]
    S_j = "".join(S_p)
    if S_j.islower() == True:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

S_m = S[2:len(S)-1]

print(S_m)


S_p = [s for s in S_m if s != "C"]

if S[0] == "A":
  if "C" in S_m and S_m[0] == "C" and S_m.count("C") == 1:
    S_p = [s for s in S_p if s != "C"]
    S_j = "".join(S_p)
    if S_j.islower() == True:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

S_m = S[1:len(S)-1]
# print(S_m)

# S_p = S_m.remove("A")

S_p = [s for s in S_m if s != "C"]

# print(S_p)


S_low =[]

if S[0] == "A":
  if "C" in S_m:
    S_p = [s for s in S_p if s != "C"]
    S_j = "".join(S_p)
    if S_j.islower() == True and S_m.count("C") == 1 and S[2] == "C":
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

S_m = S[1:len(S)-1]
# print(S_m)

# S_p = S_m.remove("A")

S_p = [s for s in S_m if s != "C"]

# print(S_p)


S_low =[]

if S[0] == "A":
  if "C" in S_m:
    S_p = [s for s in S_p if s != "C"]
    S_j = "".join(S_p)
    if S_j.islower() == True and S_m.count("C") == 1:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# ABC104b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

s = input()[:-1]
#print(s.count('C', 2, -1))
if (s[0] != 'A' and s.count('C', 2, -1) != 1):
    print('WA')
    # print('hi')
    exit()
cPos = s.find('C', 2, -1)
if (s[1:cPos].islower() and s[cPos + 1:].islower()):
    # print('hi')
    print('AC')
    exit()
print('WA')

Submission status: Wrong Answer

Solution code:
# ABC104b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

s = input()
if (s[0] != 'A' and s.count('C', 2, -1) != 1):
    print('WA')
    # print('hi')
    exit()
cPos = s.find('C', 2, -1)
if (s[1:cPos].islower() and s[cPos + 1:].islower()):
    # print('hi')
    print('AC')
    exit()
print('WA')

Submission status: Wrong Answer

Solution code:
# ABC104b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

s = input()
if (s[0] != 'A' and s.count('C', 2, -1) == 1):
    print('WA')
    # print('hi')
    exit()
cPos = s.find('C', 2, -1)
if (s[1:cPos].islower() and s[cPos + 1:].islower()):
    # print('hi')
    print('AC')
    exit()
print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A" and (S[2: -2].count("C") == 1):
  for c in S:
    if c != "A" and c != "C" and c.isupper():
      print("WA")
      exit(0)
print("AC")

Submission status: Wrong Answer

Solution code:
S=[i for i in input()]
if S[0]=='A' and S[1].islower and 'C' in S and S[-1].islower:
  S.remove('A')
  S.remove('C')
  S=''.join(S)
  if S.islower:
    print('AC')
  else:
    print('WA')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S=[i for i in input()]
if S[0]=='A' and S[1].islower and 'C' in S and S[-1].islower:
  S.remove('A')
  S.remove('C')
  S=''.join(S)
  if S.islower:
    print('WA')
  else:
    print('WA')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
import sys
def check_small(string):
    if string in 'abcdefghijklmnopqrstuvwxyz':
        return True
    else:
        return False

s = input()
if s[0] != 'A':
    print('WA')
    sys.exit()
if check_small(s[-1]) == False:
    print('WA')
    sys.exit()
count = 0
for si in s[3:]:
        if si == 'C':
            count += 1
        elif check_small(si) == False:
            print('WA')
            sys.exit()
print('AC' if count == 1 else 'WA')

Submission status: Wrong Answer

Solution code:
import sys
def check_small(string):
    if string in 'abcdefghijklmnopqrstuvwxyz':
        return True
    else:
        return False

s = input()
if s[0] != 'A':
    print('WA')
    sys.exit()
if check_small(s[-1]) == False:
    print('WA')
    sys.exit()
count = 0
for si in s[3:]:
        if si == 'C':
            count += 1
print('AC' if count == 1 else 'WA')

Submission status: Wrong Answer

Solution code:
import sys
def check_small(string):
    if string in 'abcdefghijklmnopqrstuvwxyz':
        return True
    else:
        return False

s = input()
if s[0] != 'A' or s[2] != 'C':
    print('WA')
    sys.exit()
else:
    for si in s[3:]:
        if check_small(si) == False:
            print('WA')
            sys.exit()
    else:
        print('AC')

Submission status: Wrong Answer

Solution code:
s = input().strip()

ok = s[0] == 'A' and s[2:-1].count('C') == 1
if ok:
    for i, c in enumerate(s):
        if i == 0:
            continue
        if 2 <= i < len(s) - 2 and c == 'C':
            continue
        if c != c.lower():
            ok = False

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

Submission status: Wrong Answer

Solution code:
s = input().strip()

ok = s[0] == 'A' and s[2:-2].count('C') == 1
for i, c in enumerate(s):
    if i == 0:
        continue
    if 2 <= i < len(s) - 2 and c == 'C':
        continue
    if c != c.lower():
        ok = False

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

Submission status: Wrong Answer

Solution code:
# B - AcCepted
S = str(input())
count = 0
if S[0] == 'A':
    for i in range(2,len(S)-2):
        if S[i] == 'C':
            count += 1
        else:
            pass

    if count == 1:
        S_1 = set(S)
        S_1.remove('A')
        S_1.remove('C')
        if str(S_1).islower() :
            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')
    exit()
elif S[2:-2:].count('C') != 1:
    print('WA')
    exit()
S2 = S.replace('A','',1).replace('C','',1)
if S2.islower():
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] != 'A':
    print('WA')
    exit()
elif S[2:-2:].count('C') != 1:
    print('WA')
    exit()
S2 = S.replace('A','').replace('C','',1)
if S2.islower():
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=list(input())
count=0
for i in s:
    if i.isupper():
        count +=1
if count!=2:print("WA");exit()
else:
    if s[0]=="A":
        if s[2:-1].count("C")==1:
            print("AC")
    else:print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(input())
count=0
if s[0]=="A":
    for i in range(2,len(s)-1):
        if s[i]=="C":count +=1
    if count==1:print("AC")
    else:print("WA")
else:print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
l = len(S)
if S[0]=="A" and "C" in S[3:l-1]:
  S.remove("A")
  S.remove("C")
  S = "".join(S)
  if S.isupper():
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
if s[0] == 'A':
  del s[0]
  if s[1:-1].count('C') == 1:
      s.remove('C')
      for i in range(len(s)):
          if s[i].isupper():
              break
      print('AC')
  else:
      print('WA')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())
ans ="AC"
if S[0]!="A":
    ans ="WA"
if S.count("C") !=1:
    ans ="WA"
if S[2:-1].count("C")!=1:
    ans ="WA"
if S[0]==("A"):
    del S[0]
if S.count("C")>0:
    S.remove("C")
for i in range(len(S)):
    if (S[i]).isupper:
        ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input())
ans ="AC"
if S[0]!="A":
    ans ="WA"
if S.count("C") !=1:
    ans ="WA"
if S[2:-1].count("C")!=1:
    ans ="WA"
if S[0]==("A"):
    del S[0]
if S.count("C")>0:
    S.remove("C")
for i in range(len(S)):
    if (S[i]).upper == S[i]:
        ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
count = 0

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

if count == 3:
    print("AC")
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
count = 0

if S[0] == 'A':
    count += 1
if 'C' in S[2:-1]:
    count += 1

S = S.replace("A", "")
S = S.replace("C", "")

if S.islower():
    count += 1

if count == 3:
    print("AC")
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
count = 0

if S[0] == 'A':
    count += 1
if 'C' in S[2:-1]:
    count += 1
print(S)
S = S.replace("A", "")
S = S.replace("C", "")

if S.islower():
    count += 1

if count == 3:
    print("AC")
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

index = 0
cnt = 0
for i in range(2,len(S)-1):
    if S[i] == "C":
        cnt += 1
        index = i
if cnt != 1:
    print("WA")
    exit()

for i in range(1,len(S)-1):
    if i == index:
        pass
    elif S[i].islower() != True:
        print("WA")
        exit()

print("AC")

Submission status: Wrong Answer

Solution code:
S = input()

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

index = 0
cnt = 0
for i in range(2,len(S)-2):
    if S[i] == "C":
        cnt += 1
        index = i
if cnt != 1:
    print("WA")
    exit()

for i in range(1,len(S)-1):
    if i == index:
        pass
    elif S[i].islower() != True:
        print("WA")
        exit()

print("AC")

Submission status: Wrong Answer

Solution code:
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

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

Submission status: Wrong Answer

Solution code:
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

S = IS()
if S[0] == "A" and S[2] == "C" and (S[1]).islower() ==True  and S[3:].islower()==True:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

S = IS()
dic = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",]
if S[0] == "A" and S[2] == "C" and S[1] in dic and S[3] in dic and S.count("C")==1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
print('AC' if s[1] == 'A' and 'C' in s[3:-1] and s[1:].replace('C','',1).islower() else 'WA')

Submission status: Wrong Answer

Solution code:
S = list(input())

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

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A" and not(S.find("C", 2, -2) < 0) and S[1:S.find("C", 2, -2)].islower() and S[S.find("C", 2, -2)+1:].islower():
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())

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

Submission status: Wrong Answer

Solution code:
S = list(input())

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

Submission status: Wrong Answer

Solution code:
S = list(input())

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

Submission status: Wrong Answer

Solution code:
S = list(input())

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

Submission status: Wrong Answer

Solution code:
S = input()
ans = 'AC'

if S[0] != 'A':
  ans = 'WA'
if S[2:len(S)-1].count('C') != 1:
  ans = 'WA'
  
S[0].replace('A', "")
S[2:len(S)-1].replace('C', "")
if S.islower == False:
  ans = 'WA'
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
ans = 'AC'

if S[0] != 'A':
  ans = 'WA'
if S[2:len(S)-1].count('C') != 1:
  ans = 'WA'
  
S.replace('A', "")
S[2:len(S)-1].replace('C', "")
if S.islower == False:
  ans = 'WA'
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
ans = 'AC'

if S[0] != 'A':
  ans = 'WA'
if S[2:len(S)-1].count('C') != 1:
  ans = 'WA'
  
S.replace('A', "")
S.replace('C', "")
if S.islower == False:
  ans = 'WA'
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())

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

Submission status: Wrong Answer

Solution code:
S = list(input())

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

Submission status: Wrong Answer

Solution code:
s=str(input())
if s[0]!='A':
    print('WA')
else:
    c=s.count('C',2,len(s)-2)
    if c!=1:
        print('WA')
    else:
       d=s.find('C',2,len(s)-1)
       s=s[1:d]+s[d+1:]
       ss=s.lower()
       #print(s,ss)
       print('AC' if s==ss else 'WA')

Submission status: Wrong Answer

Solution code:
s=str(input())
if s[0]!='A':
    print('WA')
else:
    c=s.count('C',2,len(s)-2)
    if c!=1:
        print('WA')
    else:
       d=s.find('C',2,len(s)-2)
       s=s[1:d]+s[d+1:]
       ss=s.lower()
       print('AC' if s==ss else 'WA')

Submission status: Wrong Answer

Solution code:
s = input()
flag = True
if s[0]!='A': flag=False
if s[2:-1].count('C')!=1: flag=False
if flag:
    l = list(s[2:-1])
    l.remove('C')
    s = s[1] + ''.join(l)
    if s!=s.lower(): flag=False
print("AC" if flag else "WA")

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

alpha2num = lambda c: ord(c) - ord('a') + 1

s = input()
ans = "WA"
if s[0] == "A" and s.count("C") == 1:
    if 2 <= s.index("C") <= len(s) - 2:
        for i in range(1, len(s)):
            if i != s.index("C") and 1 <= alpha2num(s[i]) <= 26:
                ans = "AC"
                continue
            else:
                ans = "WA"
                break
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

alpha2num = lambda c: ord(c) - ord('a') + 1

s = input()
ans = "WA"
if s[0] == "A" and s.count("C") == 1:
    if 2 <= s.index("C") <= len(s) - 2:
        for i in range(1, len(s)):
            if i != s.index("C") and 1 <= alpha2num(s[i]) <= 26:
                ans = "AC"
                continue
            else:
                ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

s = input()
if s[0] == 'A':
    if 'C' in s[2:-1]:
        index = s[2:-1].index('C')
        news = s[1:index] + s[index+1:]
        if news == news.lower():
            print('AC')
            sys.exit()
print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

flag = True
if S[0] != "A":flag = False
if S[2:-2].count("C") != 1:flag = False
if flag:
    ind = S[2:-2].index("C") + 2
    print("AC") if (S[1:ind] + S[ind+1:]).islower() else print("WA")
else:
    print("WA")

Submission status: Wrong Answer

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

S = input()

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

print('WA')

Submission status: Wrong Answer

Solution code:
s=input()

num=0
if s[0]=='A':
  if s[2:-1].count('C')!=1:
    print('WA')
    exit()
  for i in range(2,len(s[2:-1])+2):
    if s[i]=='C': 
      num=i
      break
  if num==0:
    print('WA')
    exit()
  
  for i in range(len(s)):
    if i==0 or i==num:
      continue
    if s[i].islower()==False:
      print('WA')
      exit()
print('AC')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans ='AC'
if s[0]!='A':
  ans = 'WA'

if s[2:-2].count('C')!=1 or s.count('C')>=2:
  ans = 'WA'
  
nc = []  
for c in s[1:]:
  if c!= 'C':
    nc.append(c)
if not ''.join(nc).islower():
  ans = 'WA'

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans ='AC'
if s[0]!='A':
  ans = 'WA'

if s[2:-2].count('C')!=1 or s.count('C')>=2:
  ans = 'WA'
  
nc = []  
for c in s:
  if c !='A' and c!= 'C':
    nc.append(c)
if not ''.join(nc).islower():
  ans = 'WA'

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] == 'A' and s[2:-1].count('C') == 1:
  for letter in s[1:]:
    if letter != letter.lower() and letter != 'C':
      print('WA')
      break
  else:
    print('AC')
else:
  print('AC')

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] == 'A' and s[2:-1].count('C') == 1:
  for letter in s[1:]:
    if letter != letter.lower() or letter != 'C':
      print('WA')
      break
  else:
    print('AC')
else:
  print('AC')

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] == 'A' and s[2:-1].count('C') == 1:
  for letter in s[1:]:
    if letter != letter.lower() or letter == 'C':
      print('WA')
      break
  else:
    print('AC')
else:
  print('AC')

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] == 'A' and s[2:-1].count('C') == 1:
  for letter in s[1:]:
    if letter != letter.lower():
      print('WA')
      break
  else:
    print('AC')
else:
  print('AC')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def test():
    s = input()
    a = []
    count = 0
    if s[0].isupper():
        for i in range(2,len(s)-1):
            if s[i] == "C":
                a.append(i)
                count += 1

    s2 = list(s)
    for i in a:
        s2.remove(s[i])

    s3 = "".join(s2[1:])

    if count == 1 and s3.islower():
        print("AC")
    else:
        print("WA")


if __name__ == "__main__":
    test()

Submission status: Wrong Answer

Solution code:
def test():
    s = input()
    count = 0
    if s[0].isupper():
        for i in range(2,len(s)-1):
            if s[i] == "C":
                count += 1

    print("AC" if count == 1 else "WA")    


if __name__ == "__main__":
    test()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
AC = input()
correct = AC[0] == 'A' and AC.count('A') == 1 and AC[-1] != 'C' and AC[:2].count('C') == 0 and AC[2:-1].count('C') and AC.replace('A', 'a').replace('C', 'c') == AC.lower()
print('AC' if correct else 'WA')

Submission status: Wrong Answer

Solution code:
s = input()
c = s[3:-1]

check = True
count = 0
countUpper = 0

if s[0] != "A":
    check = False
for i in c:
    if i == "C":
        count += 1
if count != 1:
    check =False
for i in s:
    if i.isupper():
        countUpper += 1
    if countUpper != 2:
        check = False

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

Submission status: Wrong Answer

Solution code:
s = input()
c = s[2:-1]

check = True
count = 0

if s[0] != "A":
    check = False
for i in c:
    if i == "C":
        count += 1
if count != 1:
    check =False
if check:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
S = list(S)
flag = True
if S[0] != "A":
    flag = False
flag1 = False
for i in range(3,len(S)-1):
    if S[i] == "C" and flag1:
        flag = False
        
        
    elif S[i] == "C" and not flag1:
        flag1 = True
        S[i] = "c"
if not flag1:
    flag = False
S[0] = "a"
for i in range(len(S)):
    if not S[i].islower():
        flag = False
        
if flag:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
S = list(S)
flag = True
if S[0] != "A":
    flag = False
flag1 = False
for i in range(3,len(S)-1):
    if S[i] == "C" and flag1:
        flag = False
        S[i] = 'c'
        
    elif S[i] == "C" and not flag1:
        flag1 = True
if not flag1:
    flag = False
S[0] = "a"
for i in range(len(S)):
    if not S[i].islower():
        flag = False
        
if flag:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()

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

cnt = 0
i = 0
for j, c in enumerate(s):
    if j <= 1 or j == len(s) - 1:
        continue
    print(c)
    if c == 'C':
        cnt += 1
        if cnt == 2:
            print('WA')
            exit(0)
        i = j
if cnt == 0:
    print('WA')
    exit(0)

for j, c in enumerate(s):
    if j == 0 or j == i:
        continue
    if str(c).isupper():
        print('WA')
        exit(0)

print('AC')

Submission status: Wrong Answer

Solution code:
s=list(input())

if s[0]=='A' and s[1].islower() and s[-1].islower():
    s=s[2:len(s)-1]
    if s.count('C')==1:
        s.remove('C')
        if ''.join(s).islower():
            print("AC")
            exit()    
print("WA")

Submission status: Wrong Answer

Solution code:
s=list(input())

if s[0]=='A' and s[1].islower() and s[-1].islower():
    s=s[2:len(s)-1]
    if s[:len(s)].count('C')==1:
        s.remove('C')
        if ''.join(s).islower():
            print("AC")
            exit()    
print("WA")