Buggy python submission (verdict: Runtime Error):
S=input()

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

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


Fixed submission:
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')

Buggy python submission (verdict: Runtime Error):
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')


Fixed submission:
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')

Buggy python submission (verdict: Runtime Error):
S=input()

cc=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:
    p1=True

if S[0]=='A' and S[0].islower()==False:
    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')


Fixed submission:
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')

Buggy python submission (verdict: Runtime Error):
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')

Fixed submission:
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')

Buggy python submission (verdict: Runtime Error):
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')

Fixed submission:
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')