TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
s = input()
l = len(s)

if s[0] == 'A':
  if s[3:l - 2].count('C') == 1:
    idx = s[3:l - 2].index('C') + 3
    if s[1:idx].islower() and s[idx + 1:].islower():
      print('AC')
      quit()
print('WA')

s = input()
l = len(s)

if s[0] == 'A':
  if s[3:l - 1].count('C') == 1:
    idx = s[2:l - 1].index('C') + 2
    if s[1:idx].islower() and s[idx + 1:].islower():
      print('AC')
      quit()
print('WA')

s = input()
l = len(s)

if s[0] == 'A':
  if s[:3].count('C') == 1 ^ s[l-2:].count('C') == 1:
    try:
      idx = s[:3].index('C')
    except:
      pass
    try:
      idx = s[l-2:] + l-2
    except:
      pass
    if s[1:idx].islower() and s[idx+1:].islower():
      print('Yes')
      quit()
print('WA')

s = input()
l = len(s)

if s[0] == 'A':
  if s[2:l - 1].count('C') == 1:
    idx = s[2:l - 1].index('C') + 2
    if s[1:idx].islower() and s[idx + 1:].islower():
      print('AC')
      quit()
print('WA')

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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')

s=input()
print('AC' 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 'WA')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
ss=s.replace("A","a")
ss=ss.replace("C","c")
print(s[2:len(s)-2])
if s[0]=="A" and s[2:len(s)-1].count("C")==1 and ss.islower():
    print("AC")
else :
    print("WA")

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()

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

if s[3:-1] not in "C":
    print("WA")
    exit()

if s[1:].replace("C", "").lower() == s[1:].replace("C", ""):
    print("AC")
else:
    print("WA")


s = input()

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

if s[3:-1] not in "C" or s[:2] in "C" or s[-1] in "C":
    print("WA")
    exit()

if s[1:].replace("C", "").lower() == s[1:].replace("C", ""):
    print("AC")
else:
    print("WA")


s = input()

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

if s[2:-1] not in "C":
    print("WA")
    exit()

if s[1:].replace("C", "").lower() == s[1:].replace("C", ""):
    print("AC")
else:
    print("WA")


s = input()

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

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

if s[1:].replace("C", "").lower() == s[1:].replace("C", ""):
    print("AC")
else:
    print("WA")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)


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")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = list(input())

if s[0] != "A":
    print("WA")
    exit()
if not s[2:-2].count("c" == 1):
    print("WA")
    exit()
for t in s:
    if t.isupper() and t != "A" and t != "C":
        print("WA")
        exit()

print("AC")


s = list(input())

if s[0] != "A":
    print("WA")
    exit()
if not s[2:-2].count("C" == 1):
    print("WA")
    exit()
for t in s:
    if t.isupper() and t != "A" and t != "C":
        print("WA")
        exit()

print("AC")



s = list(input())

if s[0] != "A":
    print("WA")
    exit()
if s[2:-1].count("C") != 1:
    print("WA")
    exit()
for t in s:
    if t.isupper() and t != "A" and t != "C":
        print("WA")
        exit()

print("AC")


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
ans="AC"
if s[0]!="A":
    ans="WA"
c=0
idx=0
for i in range(2,len(s)-2):
    if s[i]=="C":
        c+=1
        idx=i
if c!=1:
    ans="WA"
small={"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"}
for i in range(1,len(s)+1):
    if i!=idx:
        if s[i] not in small:
            ans="WA"
            break
print(ans)


s=input()
ans="AC"
if s[0]!="A":
    ans="WA"
c=0
idx=0
for i in range(2,len(s)-1):
    if s[i]=="C":
        c+=1
        idx=i
if c!=1:
    ans="WA"
small={"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"}
for i in range(1,len(s)):
    if i!=idx:
        if s[i] not in small:
            ans="WA"
            break
print(ans)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s_list=list(input())

def out_wa():
  print('WA')

if s_list[0]!='A':
  out_wa()
else:
  count=0
  for i in range(2,len(s_list)-2):
    if s_list[i] == 'C':
      count+=1

  if count != 1:
    out_wa()
  else:
    s = ''.join(s_list)
    l_s=s.lower()
    print(s)
    print(l_s)
    if l_s !=s:
      out_wa()
    else:
      print('AC')

s_list=list(input())

def out_wa():
  print('WA')

if s_list[0]!='A':
  out_wa()
else:
  count=0
  for i in range(2,len(s_list)-1):
    if s_list[i] == 'C':
      count+=1

  if count != 1:
    out_wa()
  else:
    s = ''.join(s_list)
    l_s=s.lower()
    print(s)
    print(l_s)
    if l_s !=s:
      out_wa()
    else:
      print('AC')

s_list=list(input())

def out_wa():
  print('WA')

if s_list[0]!='A':
  out_wa()
else:
  count=0
  for i in range(2,len(s_list)-1):
    if s_list[i] == 'C':
      count+=1

  if count != 1:
    out_wa()
  else:
    s = ''.join(s_list)
    s=s.replace('A','')
    s=s.replace('C','')
    l_s=s.lower()
    if l_s !=s:
      out_wa()
    else:
      print('AC')
   

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
s = input()
judge = 1
if s[0] != "A":
    judge = 0

if not s[1] != "C" and s[len(s) -1] != "C" and s.count("C") == 1:
    judge = 0

s.replace("A","a").replace("C","c")

if s.islower() and judge == 1:
    print("AC")
else:
    print("WA")

import sys
s = input()
judge = 0
if s[0] == "A":
    judge += 1

if s[1] != "C" and s[len(s) -1] != "C" and s.count("C") == 1:
    judge += 1

s = s.replace("A","a").replace("C","c")
#print(s,judge)
if s.islower() and judge == 2:
    print("AC")
else:
    print("WA")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
ans = 'WA'
if S[0] == 'A':
	if S[2:-2].count('C') == 1:
		p = 0
		for i in range(2, len(S) - 1):
			if S[i] == 'C':
				p = i
		if S[1:p].islower() and S[p+1:].islower():
			print(S[1:p])
			print(S[p+1:])
			ans = 'AC'
print(ans)

S = input()
ans = 'WA'
if S[0] == 'A':
	if S[2:-1].count('C') == 1:
		p = 0
		for i in range(2, len(S)-1):
			if S[i] == 'C':
				p = i
		if S[1:p].islower() and S[p+1:].islower():
			ans = 'AC'
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = str(input())
flag = 0
flag2 = 0
if s[0] == 'A':
    for i in range(2,len(s)-2):
        if s[i] == 'C':
            flag += 1
    for i in range(1,len(s)):
        if s[i] == s[i].upper():
            flag2 += 1
print(flag,flag2)
if flag == 1 and flag2 == 1:
    print("AC")
else:
    print("WA")

s = str(input())
flag = 0
flag2 = 0
if s[0] == 'A':
    for i in range(2,len(s)-1):
        if s[i] == 'C':
            flag += 1
    for i in range(1,len(s)):
        if s[i] == s[i].upper():
            flag2 += 1
#print(flag,flag2)
if flag == 1 and flag2 == 1:
    print("AC")
else:
    print("WA")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()

ls_flag = [0, 1, 1]

for i in range(len(s)):
    if s[i].isupper is True:
        if (s[i] != "A") or (s[i] != "C"):
            ls_flag[0] = 1
            break

if s[0] == "A" and ("A" not in s[1:] is True):
    ls_flag[1] = 0

if s[2:-1].count("C") == 1 and s.count("C") == 1:
    ls_flag[2] = 0
    
if sum(ls_flag) == 0:
    print("AC")
else:
    print("WA")

s = input()

ls_flag = [0, 1, 1]

for i in range(len(s)):
    if (s[i] != "A") or (s[i] != "C"):
        if s[i].isupper is True:
            ls_flag[0] = 1
            break

if s[0] == "A" and ("A" not in s[1:] is True):
    ls_flag[1] = 0

if s[2:-1].count("C") == 1 and s.count("C") == 1:
    ls_flag[2] = 0
    
if sum(ls_flag) == 0:
    print("AC")
else:
    print("WA")

s = input()

flag = [0] * 3

if s[0] == 'A':
	flag[0] += 1
	s = 'a' + s[1:]

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

if Ccnt == 1:
	flag[1] = 1

if s.islower() is True:
	flag[2] = 1


if sum(flag) == 3:
	print('AC')
else:
	print('WA')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
if S[0] != 'A':
  print("WA")
else:
  if 'C' not in S[2:] or S[2:].count('C') > 1:
    print("WA")
  else:
    S[0:1].lower()
    i = S.find('C')
    S[i:i+1].lower()
    if S.islower():
      print("AC")
    else:
      print("WA")

S = input()
if S[0] != 'A':
  print("WA")
else:
  if 'C' not in S[2:-1] or S[2:-1].count('C') > 1:
    print("WA")
  else:
    S[0:1].lower()
    i = S.find('C')
    S[i:i+1].lower()
    if S.islower():
      print("AC")
    else:
      print("WA")

S = input()
if S[0] != 'A':
  print("WA")
else:
  if 'C' not in S[2:-1] or S[2:-1].count('C') > 1:
    print("WA")
  else:
    i = S.find('C')
    S = S[0:1].lower() + S[1:i] + S[i:i+1].lower() + S[i+1:]
    if S.islower():
      print("AC")
    else:
      print("WA")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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')


S = input()

c = 0
for i in S:
    if i.isupper():
        c += 1

if S[0] != 'A' or S[-1].isupper() or c != 2 or 'C' not in S[2:-1]:
    print('WA')
else:
    print('AC')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
if s[0] != 'A':
  print('WA')
  exit()
sho = ord('a')
ok = 0
for i in s[2: len(s) - 1]:
  if ord(i) < sho:
    if ord(i) == ord("C"):
      ok += 1
    else:
      print("WA")
      exit()
if ord(s[0]) < sho or ord(s[1]) < sho or ord(s[len(s) - 1]) < sho:
  print("WA")
  exit()
if ok == 1:
  print("AC")
else:
  print("WA")

s = input()
if s[0] != 'A':
  print('WA')
  exit()
sho = ord('a')
ok = 0
for i in s[2: len(s) - 1]:
  if ord(i) < sho:
    if ord(i) == ord("C"):
      ok += 1
    else:
      print("WA")
      exit()
if ord(s[1]) < sho or ord(s[len(s) - 1]) < sho:
  print("WA")
  exit()
if ok == 1:
  print("AC")
else:
  print("WA")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
print("AC" if s[1]=="A" and s[2:-1].count("C")==1 and s[1:].replace("C","").islower() else "WA")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s =list(input())
ans =0
for i in range(len(s)):
  if s[0] =='A':
    a = s.pop(0)
    if s[1] =='C':
      a = s.pop(1)
  else:
    ans =1
s = ''.join(s)  

print('AC' if s.islower() and ans ==0  else 'WA')

s =list(input())
ans =0
for i in range(len(s)):
  if s[0] =='A':
    a = s.pop(0)
    if s[2:-1].count('C') ==1:
      a = s.pop(1)
s = ''.join(s)      
print('AC' if s.islower() else 'WA')

s = input()
if s[0] =='A':
  if s[2:-1].count('C') ==1:
    if len([i for i in s if i.islower()]) == (len(s)-2):
      print('AC')
      exit()
print('WA')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
if s[0] == 'A':
  if s[2:-1].count('C') == 1:
    for i in range(1, len(s)):
      if 97 <= ord(s[i]) <= 122:
        print("AC")
      else:
        print("WA")
  else:
    print("WA")
else:
  print("WA")


s = input()
count_c = 0

if s[0] == 'A':
  if s[2:-1].count('C') == 1:
    for i in range(1, len(s)):
      if 97 <= ord(s[i]) <= 122:
        continue
      else:
        count_c += 1
      if count_c > 1:
        print("WA")
  else:
    print("WA")
else:
  print("WA")

if count_c == 1:
  print("AC")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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")


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 len(re.findall(r'[A-Z]',S)) == 2:
            print("AC")
            quit()
print("WA")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
s = list(input())

if s[0] != 'A':
    print('WA')
    sys.exit(0)
for i in range(2, len(s) - 1):
    if [i] == 'C':
        s.pop(i)
        break
else:
    print('WA')
    sys.exit(0)

if ''.join(s[1:]) == ''.join(s[1:]).lower():
    print('AC')
else:
    print('WA')

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

for i in range(2, len(s) - 1):
    if s[i] == 'C':
        s.pop(i)
        break
else:
    print('WA')
    sys.exit(0)
 
if ''.join(s[1:]) == ''.join(s[1:]).lower():
    print('AC')
else:
    print('WA')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
if s[0] == 'A' and 'C' in s[2:-2]:
  c = s.index('C')
  if s[1:c] + s[c+1:] == (s[1:c] + s[c+1:]).lower:
    print('AC')
    exit()
print('WA')

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
ans = True

if s[0] != 'A':
    ans = False
# print(s.count('C'))
index = -1
if s[2:-2].count('C') == 1:
    index = s.index('C')
    # print(index)
else:
    ans = False

    
for i in range(len(s)):
    if i == 0:
        continue
    if i == index:
        continue
    if not s[i].isupper():
        ans = False


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

s = input()
ans = True

if s[0] != 'A':
    ans = False
    # print(f's[0]:{s[0]}')

index = -1
between_bigin_3_and_end_2 = s[2:-1]
count = between_bigin_3_and_end_2.count('C')
if count == 1:
    index = s.index('C')
    # print(index)
else:
    ans = False
    # print(f'between_bigin_3_and_end_2:{between_bigin_3_and_end_2}')
    # print(f'count:{count}')

    
for i in range(len(s)):
    if i == 0:
        continue
    if i == index:
        continue
    if not s[i].islower():
        ans = False


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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()

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

s = input()

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
n = len(s)
ans = 1
if s[0] != "A":
    ans *= 0
check = 0
for i in range(n):
    if s[i] == "C" and check == 0:
        check = 1
    elif s[i] == "C":
        check = 0
    else:
        if 97 <= ord(s[i]) <= 122:
            ans *= 1
        else:
            ans *= 0
print(["WA", "AC"][ans * check])


print("a", ord("a"))
print("z", ord("z"))

s = input()
n = len(s)
ans = 1
if s[0] != "A":
    ans *= 0
check = 0
for i in range(1, n):
    if s[i] == "C" and check == 0:
        check = 1
    elif s[i] == "C":
        check = 0
    else:
        if 97 <= ord(s[i]) <= 122:
            ans *= 1
        else:
            ans *= 0
print(["WA", "AC"][ans * check])


print("a", ord("a"))
print("z", ord("z"))

s = input()
n = len(s)
ans = 1
if s[0] != "A":
    ans *= 0
check = 0
for i in range(1, n):
    if s[i] == "C" and check == 0:
        check = 1
    elif s[i] == "C":
        check = 0
    else:
        if 97 <= ord(s[i]) <= 122:
            ans *= 1
        else:
            ans *= 0
if s[-1] == "C" or s[1] == "C":
    ans *= 0
print(["WA", "AC"][ans * check])


rint("a", ord("a"))
print("z", ord("z"))

s = input()
n = len(s)
ans = 1
if s[0] != "A":
    ans *= 0
if not (97 <= ord(s[1]) <= 122):
    ans *= 0
if not (97 <= ord(s[-1]) <= 122):
    ans *= 0

check = 0
for i in range(1, n - 1):
    if s[i] == "C":
        check += 1
print(["WA", "AC"][ans & (check == 1)])

s = input()
n = len(s)
ans = 1
if s[0] != "A":
    ans *= 0
if not (97 <= ord(s[1]) <= 122):
    ans *= 0
if not (97 <= ord(s[-1]) <= 122):
    ans *= 0

check = 0
for i in range(1, n - 1):
    if s[i] == "C":
        check += 1
print(["WA", "AC"][ans & (check == 1)])


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def count_apper(str) :
    n = 0
    for c in str :
        if c.isuppper() :
            n = n+1
    return n

str = input()
if (str[0] == "A") && (str.count("C") == 1) && (2 < str.find("C") < len(str)-1) && (count_apper(str) == 2) :
                print("AC")
                exit()
print("WA")
    

def count_apper(str) :
    n = 0
    for c in str :
        if c.isupper() :
            n = n+1
    return n

str = input()
if (str[0] == "A") and (str.count("C") == 1) and (1 < str.find("C") < len(str)-1) and (count_apper(str) == 2) :
                print("AC")
                exit()
print("WA")
    

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def check(s):
    t=True
    if s[0]!="A" :
        t=False
        #print("reached")
    a=s[3:len(s)-1]
    count=0
    for i in range(len(a)):
        if a[i]=="C":
            count+=1
    if count!=1:
        t=False
    alph="BDEFGHIJKLMNOPQRSTUVWXYZ"
    for i in range(24):
        if alph[i] in s:
            t=False
            break
    if t:
        print("AC")
    else:
        print("WA")
s=input()
check(s) 

def check(s):
    t=True
    if s[0]!="A" :
        t=False
        #print("reached")
    a=s[2:len(s)-1]
    print(a)
    count=0
    for i in range(len(a)):
        if a[i]=="C":
            count+=1
    if count!=1:
        t=False
    alph="BDEFGHIJKLMNOPQRSTUVWXYZ"
    for i in range(24):
        if alph[i] in s:
            t=False
            break
    if t:
        print("AC")
    else:
        print("WA")
s=input()
check(s) 

def check(s):
    t=True
    if s[0]!="A" :
        t=False
        #print("reached")
    a=s[3:len(s)-1]
    count=0
    for i in range(len(a)):
        if a[i]=="C":
            count+=1
    if count!=1:
        t=False
    alph="BDEFGHIJKLMNOPQRSTUVWXYZ"
    for i in range(24):
        if alph[i] in s:
            t=False
            break
    if t:
        print("AC")
    else:
        print("WA")
s=input()
check("ACoder") 

def check(s):
    t=True
    if s[0]!="A" :
        t=False
        #print("reached")
    a=s[2:len(s)-1]
    #print(a)
    count=0
    for i in range(len(a)):
        if a[i]=="C":
            count+=1
    if count!=1:
        t=False
    alph="BDEFGHIJKLMNOPQRSTUVWXYZ"
    for i in range(24):
        if alph[i] in s:
            t=False
            break
    if t:
        print("AC")
    else:
        print("WA")
s=input()
check(s)  

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)

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=S[0].lower()+S[1:x]+S[x].lower()+S[x+1:]
        if S==S.lower():
            ans="AC"
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from collections import Counter
l=input()
s=list()
k=0
if s[0]=='A':
    for i in range(2,len(s)-1):
        if s[i]=='C':
            k+=1
    if k==1:
        if l.replace('A', 'a').replace('C', 'c') == l.lower():print('AC')
        else:print('WA')
    else:print('WA')
else:print('WA')

from collections import Counter
s=list(input())
k=0
if s[0]=='A':
    for i in range(2,len(s)-1):
        if s[i]=='C':
            k+=1
    if k==1:
        if s.replace('A', 'a').replace('C', 'c') == s.lower():print('AC')
        else:print('WA')
    else:print('WA')
else:print('WA')

from collections import Counter
l=input()
s=list(l)
k=0
if s[0]=='A':
    for i in range(2,len(s)-1):
        if s[i]=='C':
            k+=1
    if k==1:
        if l.replace('A', 'a').replace('C', 'c') == l.lower():print('AC')
        else:print('WA')
    else:print('WA')
else:print('WA')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S=input()

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

if cc==1:
    p1=True

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

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

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

else:
    print('WA')


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

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

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

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

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

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

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

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

S=input()

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

if cc==1 and not nc==0:
    p1=True
else:
    p1=False

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

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

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

else:
    print('WA')


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S=input()
if(S[0]=="A" and S[2,-1].count("C")==1):
    cnt=0
    for i in S:
        if(97<=ord(i) and ord(i)<=122):
            cnt+=1
    if(cnt==2):
            print("AC")
    else :
            print("WA")
else :
    print("WA")

S = input()
if(S[0]=='A' and S[2:-1].count('C') == 1):
  cnt = 0
  for i in S:
    if(not (97<=ord(i) and ord(i)<=122)):
      cnt+=1
  if(cnt==2):
    print('AC')
  else:
    print('WA')
else:
  print('WA')


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
count1 = 0
count2 = 0
answer = "WA"

if S[0] == 'A':
    exception = [0]
    for i in range(2,len(S)-1):
        print(i)
        if S[i] == 'C':
            count1 += 1

if count1 == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) > 1:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)


S = input()
count = 0
exception = [0]
answer = "WA"

if S[0] == 'A' and S[2:-1].count('C') == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            count += 1

if count == len(S)-2:
    answer = "AC"

print(answer)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
print('WA')

S = input()

if S[2:-2].count('C') != 1:
  print('WA')
else:
    if S[0] != 'A':
      print('WA')
    else:
        S[0] == 'a'
        S[S[2:-2].index('C')] == 'c'

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


S = input()

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

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

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

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

S = input()

if S[2:-1].count('C') != 1:
  print('WA')
else:
    if S[0] != 'A':
      print('WA')
    else:
        S = list(map(lambda x: x, S))
        S[0] = 'a'
        S[S[2:-1].index('C')+2] = 'c'
        if ''.join(S).islower():
          print('AC')
        else:
          print('WA')


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
if s[0] != 'A':
    print("WA")
    exit()
cnt = 0
for i in range(2, len(s) - 1):
    if s[i] == 'C':
        cnt += 1
s.replace('A', '', 1)
s.replace('C', '', 1)
if not s.islower():
    print("WA")
    exit()
if cnt != 1:
    print("WA")
else:
    print("AC")


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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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")


S = str(input())

if S == "AccccCcccc":
    print('AC')
    
elif 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")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = input()

result = "AC"
if n[0] != "A":
        result = "WA"
        print(result)
        quit()

carea = n[2:-1]
ccount = 0
for i in carea:
        if i == "C":
                ccount += 1
if ccount >= 2 or ccount == 0:
        result = "WA"
        print(result)
        quit()

for i in carea:
        if i == "A":
                result = "WA"
                print(result)
                quit()

if n[-1] == "C" or n[-1] == "A":
        result = "WA"
        print(result)
        quit()

if n[1] == "C" or n[1] == "A":
        result = "WA"
        print(result)
        quit()


for i in n:
        if i.isupper() == True:
                if i != "A" or i != "C":
                        result = "WA"
                        print(result)
                        quit()
                if i == "T":
                        result = "WA"
                        print(result)
                        quit()
print(result)


n = input()

result = "AC"
if n[0] != "A":
        result = "WA"
        print(result)
        quit()

carea = n[2:-1]
ccount = 0
for i in carea:
        if i == "C":
                ccount += 1
if ccount >= 2 or ccount == 0:
        result = "WA"
        print(result)
        quit()

for i in carea:
        if i == "A":
                result = "WA"
                print(result)
                quit()

if n[-1] == "C" or n[-1] == "A":
        result = "WA"
        print(result)
        quit()

if n[1] == "C" or n[1] == "A":
        result = "WA"
        print(result)
        quit()


for i in n:
        if i.isupper() == True:
                if i not in "AC":
                        result = "WA"
                        print(result)
                        quit()
print(result)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()

a = S.find('A')

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

if a != 0:
  return False

if s_count != 1:
  return False

c = s1.find('C')

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


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


S = input()
     
a = S.find('A')
c = S.find('C')
     
s1 = S[2:-1]
s_count = s1.count('C')
   
y = S[1:c-1]
z = S[c+1:]

if c == 2:
	y = S[1]   

if a != 0:
	print('WA')

elif s_count != 1:
	print('WA')
     
else:
	if y.islower() and z.islower():
			print('AC')
	else:
		print('WA')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
print(S[2:-1])
if S[0] == "A":
    if "C" in S[2:-1] and S[2:-1].find("C") == S[2:-1].rfind("C"):
        S = S.replace("A","a",1)
        S = S.replace("C","c",1)
        if S == S.lower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

S = input()
if S[0] == "A":
    if "C" in S[2:-1] and S[2:-1].find("C") == S[2:-1].rfind("C"):
        S = S.replace("A","a",1)
        S = S.replace("C","c",1)
        if S == S.lower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
#S = input()

S = 'Atcoder'

cond = False

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        cond = True
        for i, s in enumerate(S):
            if i == 0:
                continue
            if s.isupper():
                if s == 'C':
                    if i < 2 or len(S)-2 < i:
                        cond = False
                else:
                    cond = False

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


S = input()

cond = True

if not S[0] == 'A':
    cond = False

if not S[2:-1].count('C') == 1:
    cond = False

for i, s in enumerate(S):
    if i == 0:
        continue

    if s.isupper():
        if s == 'C':
            if i < 2 or len(S)-2 < i:
                cond = False
        else:
            cond = False

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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")


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")
            exit()
print("WA")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
Ccnt = 0
cnt = 0
a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
b = s[2:-1]
print(b)
for i in range(len(b)):
    if b[i] == 'C':
        Ccnt += 1
for i in range(len(s)):
    if s[i] in a:
        cnt += 1
if s[0] == 'A' and Ccnt == 1 and cnt == 2:
    print('AC')
else:
    print('WA')

s = input()
Ccnt = 0
cnt = 0
a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
b = s[2:-1]
for i in range(len(b)):
    if b[i] == 'C':
        Ccnt += 1
for i in range(len(s)):
    if s[i] in a:
        cnt += 1
if s[0] == 'A' and Ccnt == 1 and cnt == 2:
    print('AC')
else:
    print('WA')

Verdicts: Wrong Answer

Accepted