Buggy python submission (verdict: Time Limit Exceeded):
N,K,C=map(int,input().split())
S=input()

l=[]
la=[]
i=0
c=0
while True:
    if S[i]=="o":
        l.append(i)
        i+=C
        c+=1
    i+=1
    if i>=N:
        break

if c>K:
    exit()

i=N-1
c=0

while True:
    if S[i]=="o":
        la.append(i)
        i-=C
        c+=1
    i-=1
    if c==K:
        break
    
for i in l:
    if i in la:
        print(i+1)

Fixed submission:
N,K,C=map(int,input().split())
S=input()

l=[0]*N
la=[0]*N
i=0
c=0
while True:
    if S[i]=="o":
        l[i]=1
        i+=C
        c+=1
    i+=1
    if i>=N:
        break

if c>K:
    exit()

i=N-1
c=0

while True:
    if S[i]=="o":
        la[i]=1
        i-=C
        c+=1
    i-=1
    if c==K:
        break
    
for i in range(N):
    if l[i]==1 and la[i]==1:
        print(i+1)

Buggy python submission (verdict: Runtime Error):
N,K,C=map(int,input().split())
S=input()

l=[]
la=[]
i=0
c=0
while True:
    if S[i]=="o":
        l.append(i)
        i+=C
        c+=1
    i+=1
    if i>N:
        break

if c>K:
    exit()

i=N-1
c=0

while True:
    if S[i]=="o":
        la.append(i)
        i-=C
        c+=1
    i-=1
    if c==K:
        break
    
for i in l:
    if i in la:
        print(i+1)

Fixed submission:
N,K,C=map(int,input().split())
S=input()

l=[0]*N
la=[0]*N
i=0
c=0
while True:
    if S[i]=="o":
        l[i]=1
        i+=C
        c+=1
    i+=1
    if i>=N:
        break

if c>K:
    exit()

i=N-1
c=0

while True:
    if S[i]=="o":
        la[i]=1
        i-=C
        c+=1
    i-=1
    if c==K:
        break
    
for i in range(N):
    if l[i]==1 and la[i]==1:
        print(i+1)

Buggy python submission (verdict: Runtime Error):
N,K,C=map(int,input().split())
S=input()

l=[]
la=[]
i=0
c=0
while True:
    if S[i]=="o":
        l.append(i)
        i+=C
        c+=1
    i+=1

if c>K:
    exit()

i=N-1
c=0

while True:
    if S[i]=="o":
        la.append(i)
        i-=C
        c+=1
    i-=1
    if c==K:
        break
    
for i in l:
    if i in la:
        print(i+1)

Fixed submission:
N,K,C=map(int,input().split())
S=input()

l=[0]*N
la=[0]*N
i=0
c=0
while True:
    if S[i]=="o":
        l[i]=1
        i+=C
        c+=1
    i+=1
    if i>=N:
        break

if c>K:
    exit()

i=N-1
c=0

while True:
    if S[i]=="o":
        la[i]=1
        i-=C
        c+=1
    i-=1
    if c==K:
        break
    
for i in range(N):
    if l[i]==1 and la[i]==1:
        print(i+1)

Buggy python submission (verdict: Time Limit Exceeded):
N,K,C=map(int,input().split())
S=input()

l=[]
la=[]
i=0
c=0
while True:
    if S[i]=="o":
        l.append(i)
        i+=C
        c+=1
    i+=1
    if c==K:
        break

i=N-1
c=0

while True:
    if S[i]=="o":
        la.append(i)
        i-=C
        c+=1
    i-=1
    if c==K:
        break
    
for i in l:
    if i in la:
        print(i+1)

Fixed submission:
N,K,C=map(int,input().split())
S=input()

l=[0]*N
la=[0]*N
i=0
c=0
while True:
    if S[i]=="o":
        l[i]=1
        i+=C
        c+=1
    i+=1
    if i>=N:
        break

if c>K:
    exit()

i=N-1
c=0

while True:
    if S[i]=="o":
        la[i]=1
        i-=C
        c+=1
    i-=1
    if c==K:
        break
    
for i in range(N):
    if l[i]==1 and la[i]==1:
        print(i+1)