WA in CHRL2?

from collections import Counter
a=raw_input()
l=[]
for i in xrange(0,len(a)):
if(a[i]==‘F’):
l.append(i)
count=0
for i in xrange(0,len(l)):
x=a[:l[i]+1]
c=Counter(x)
a=a[l[i]+1:]
if(c[‘C’]>=1 and c[‘H’]>=1 and c[‘E’]>=1):
count+=1
print(count)
Can anyone please help me to find the test case in which this code fails? CHRL2:CHRL2 Problem - CodeChef

As I understand your code, after you remove some subsequence on prefix - you remove full prefix from string. It seems obviously not correct, because you can need some letters from this prefix in next operations, so maybe this test can help you:

CCHHEEFF

(Spoiler: answer is 2).

Thanks,I was misinterpreting the question.