AtCoder Beginner Contest 161 - Yutori

Takahashi has decided to work on K days of his choice from the N days starting with tomorrow.
You are given an integer C and a string S. Takahashi will choose his workdays as follows:
 - After working for a day, he will refrain from working on the subsequent C days.
 - If the i-th character of S is x, he will not work on Day i, where Day 1 is tomorrow, Day 2 is the day after tomorrow, and so on.
Find all days on which Takahashi is bound to work.

-----Constraints-----
 - 1 \leq N \leq 2 \times 10^5
 - 1 \leq K \leq N
 - 0 \leq C \leq N
 - The length of S is N.
 - Each character of S is o or x.
 - Takahashi can choose his workdays so that the conditions in Problem Statement are satisfied.

-----Input-----
Input is given from Standard Input in the following format:
N K C
S

-----Output-----
Print all days on which Takahashi is bound to work in ascending order, one per line.

-----Sample Input-----
11 3 2
ooxxxoxxxoo

-----Sample Output-----
6

Takahashi is going to work on 3 days out of the 11 days. After working for a day, he will refrain from working on the subsequent 2 days.
There are four possible choices for his workdays: Day 1,6,10, Day 1,6,11, Day 2,6,10, and Day 2,6,11.
Thus, he is bound to work on Day 6.

Difficulty: MEDIUM

Starter code:

Solutions:
(N, K, C) = list(map(int, input().split()))
s = list(str(input()))
L = []
R = []
for i in range(N):
	if len(L) >= K:
		break
	if s[i] == 'o' and (L == [] or i + 1 - L[-1] > C):
		L.append(i + 1)
for i in range(N - 1, -1, -1):
	if len(R) >= K:
		break
	if s[i] == 'o' and (R == [] or R[-1] - (i + 1) > C):
		R.append(i + 1)
R.reverse()
ans = []
for i in range(K):
	if L[i] == R[i]:
		print(L[i])


(N, K, C) = map(int, input().split())
S = list(input())
S_work = []
s = []
f = []
i = 0
while len(s) < K:
	if S[i] == 'o':
		s.append(i)
		i += C + 1
	elif S[i] == 'x':
		i += 1
	elif i == len(S):
		break
i = 1
while len(f) < K:
	if S[N - i] == 'o':
		f.append(N - i)
		i += C + 1
	elif S[N - i] == 'x':
		i += 1
	elif i == len(S):
		break
f.sort()
for i in range(K):
	if s[i] == f[i]:
		print(s[i] + 1)


num = list(map(int, input().split()))
string = input()
countl = 0
countr = num[1]
i = 0
j = num[0]
L = []
R = []
while countl != num[1]:
	if string[i] == 'o':
		L.append(i + 1)
		countl = countl + 1
		i = i + num[2] + 1
	else:
		i = i + 1
	if i >= num[0]:
		break
while countr != 0:
	if string[j - 1] == 'o':
		R.append(j)
		countr = countr - 1
		j = j - num[2] - 1
	else:
		j = j - 1
	if j < 0:
		break
R.reverse()
for k in range(num[1]):
	if L[k] == R[k]:
		print(L[k])


def main() -> None:
	(n, k, c) = list(map(int, input().split()))
	s = input()
	if k < s.count('o') and c == 0:
		print('')
		return
	count = c
	(day_work, day_work_reverse) = ([], [])
	for (i, day) in enumerate(s):
		count += 1
		if day == 'o' and c < count:
			day_work.append(i + 1)
			count = 0
	count = c
	for (i, day) in enumerate(s[::-1]):
		count += 1
		if day == 'o' and c < count:
			day_work_reverse.append(n - i)
			count = 0
	day_must = set(day_work[:k]) & set(day_work_reverse[:k])
	for day in sorted(list(day_must)):
		print(day)
	return

def __starting_point():
	main()
__starting_point()


(N, K, C) = list(map(int, input().split()))
S = list(input())
l_list = [-1 for i in range(N)]
i = 0
cnt = 0
while i < N and cnt < K:
	if S[i] == 'o':
		l_list[i] = cnt
		cnt += 1
		i += C
	i += 1
r_list = [-1 for i in range(N)]
i = N - 1
cnt = 0
while i >= 0 and cnt < K:
	if S[i] == 'o':
		r_list[i] = K - 1 - cnt
		cnt += 1
		i -= C
	i -= 1
for i in range(N):
	if l_list[i] == -1 or r_list[i] == -1:
		continue
	if l_list[i] == r_list[i]:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input()
cnt = 0
e = 0
l = []
for (i, si) in enumerate(s):
	if e == k:
		break
	if cnt > 0:
		cnt -= 1
		continue
	if si == 'o':
		l.append(i + 1)
		cnt = c
		e += 1
r = []
cnt = 0
d = 0
for (i, si) in enumerate(s[::-1]):
	if d == k:
		break
	if cnt > 0:
		cnt -= 1
		continue
	if si == 'o':
		r.append(n - i)
		cnt = c
		d += 1
for i in range(k):
	if l[i] == r[k - 1 - i]:
		print(l[i])


def main():
	(_n, k, c) = list(map(int, input().split()))
	s = input()
	l = []
	r = []
	for (i, char) in enumerate(s):
		if len(l) >= k:
			break
		if char == 'o' and (not len(l) or i - l[-1] > c):
			l.append(i)
	for (i, char) in reversed(tuple(enumerate(s))):
		if len(r) >= k:
			break
		if char == 'o' and (not len(r) or r[-1] - i > c):
			r.append(i)
	r.reverse()
	for i in range(k):
		if l[i] == r[i]:
			print(l[i] + 1)
main()


(N, K, C) = map(int, input().split())
S = input()
L = [0] * K
R = [0] * K
i = 0
for j in range(K):
	while S[i] != 'o':
		i += 1
	L[j] = i
	i += C + 1
i = N - 1
for j in range(K - 1, -1, -1):
	while S[i] != 'o':
		i -= 1
	R[j] = i
	i -= C + 1
for j in range(K):
	if L[j] == R[j]:
		print(L[j] + 1)


(n, k, c) = map(int, input().split())
s = list(input())
left = []
right = []
i = 0
while i < n:
	if len(left) >= k:
		break
	if s[i] == 'o':
		left.append(i)
		i += c + 1
	else:
		i += 1
i = n - 1
while i >= 0:
	if len(right) >= k:
		break
	if s[i] == 'o':
		right.append(i)
		i -= c + 1
	else:
		i -= 1
for i in range(k):
	if left[i] == right[k - 1 - i]:
		print(left[i] + 1)


import itertools
from collections import deque, defaultdict, Counter
from itertools import accumulate
import bisect
from heapq import heappop, heappush, heapify
import math
from copy import deepcopy
import queue
import numpy as np
Mod = 1000000007

def sieve_of_eratosthenes(n):
	if not isinstance(n, int):
		raise TypeError('n is not int')
	if n < 2:
		raise ValueError('n is not effective')
	prime = [1] * (n + 1)
	for i in range(2, int(math.sqrt(n)) + 1):
		if prime[i] == 1:
			for j in range(2 * i, n + 1):
				if j % i == 0:
					prime[j] = 0
	res = []
	for i in range(2, n + 1):
		if prime[i] == 1:
			res.append(i)
	return res

class UnionFind:

	def __init__(self, n):
		self.parent = [i for i in range(n + 1)]
		self.rank = [0 for i in range(n + 1)]

	def findroot(self, x):
		if x == self.parent[x]:
			return x
		else:
			y = self.parent[x]
			y = self.findroot(self.parent[x])
			return y

	def union(self, x, y):
		px = self.findroot(x)
		py = self.findroot(y)
		if px < py:
			self.parent[y] = px
		else:
			self.parent[px] = py

	def same_group_or_no(self, x, y):
		return self.findroot(x) == self.findroot(y)

def main():
	(n, k, c) = map(int, input().split())

	def sub(s):
		n = len(s)
		cur = 0
		last = -(c + 1)
		res = [0] * (n + 1)
		for i in range(n):
			if i - last > c and s[i] == 'o':
				cur += 1
				last = i
			res[i + 1] = cur
		return res
	s = input()
	left = sub(s)
	t = s
	t = t[::-1]
	right = sub(t)
	for i in range(n):
		if s[i] == 'x':
			continue
		if left[i] + right[n - i - 1] < k:
			print(i + 1)

def __starting_point():
	main()
__starting_point()


(N, K, C) = list(map(int, input().split()))
S = input()
work_day_min = []
work_day_max = []
for i in range(N):
	if S[i] == 'o':
		if i > 0 and len(work_day_min) > 0:
			if i - work_day_min[-1] <= C:
				continue
		work_day_min.append(i)
	if len(work_day_min) == K:
		break
for i in range(N):
	if S[N - i - 1] == 'o':
		if i > 0 and len(work_day_max) > 0:
			if work_day_max[-1] - (N - i - 1) <= C:
				continue
		work_day_max.append(N - i - 1)
	if len(work_day_max) == K:
		break
for i in range(K):
	if work_day_min[i] == work_day_max[K - i - 1]:
		print(work_day_min[i] + 1)


(n, k, c) = map(int, input().split())
s = input()
left_to_right = [0 for _ in range(n)]
now = 1
i = 0
while i < n:
	if s[i] == 'o':
		left_to_right[i] = now
		i += c
		now += 1
	i += 1
right_to_left = [0 for _ in range(n)]
now = k
i = n - 1
while 0 <= i:
	if s[i] == 'o':
		right_to_left[i] = now
		i -= c
		now -= 1
	i -= 1
for i in range(n):
	if left_to_right[i] == right_to_left[i] and left_to_right[i] != 0:
		print(i + 1)


from sys import stdin, stdout
(N, K, C) = map(int, stdin.readline().rstrip().split())
S = stdin.readline()
vec = []
rvec = []
i = 0
while i < N:
	if S[i] == 'o':
		vec.append(i)
		i += C
	i += 1
j = N - 1
while j >= 0:
	if S[j] == 'o':
		rvec.append(j)
		j -= C
	j -= 1
ans = []
for i in range(K):
	if vec[i] == rvec[K - i - 1]:
		stdout.write(str(vec[i] + 1) + '\n')
stdout.write('\n')


(n, k, c) = map(int, input().split())
s = input()

def greedy_work(days, rest, plan):
	day_count = 0
	go = [0] * n
	while day_count < days:
		if plan[day_count] == 'o':
			go[day_count] = 1
			day_count += rest + 1
		else:
			day_count += 1
	return go
front = greedy_work(n, c, s)
back = greedy_work(n, c, s[::-1])
back = back[::-1]
if front.count(1) == k:
	for i in range(n):
		if front[i] == 1 and back[i] == 1:
			print(i + 1)


(n, k, c) = map(int, input().split())
s = list(input())
a = set()
cnt = 0
for (i, x) in enumerate(s[::-1]):
	j = n - i
	if cnt > 0:
		cnt -= 1
	elif x == 'o':
		cnt += c
		a.add(j)
b = set()
cnt = 0
for (i, x) in enumerate(s):
	if cnt > 0:
		cnt -= 1
	elif x == 'o':
		cnt += c
		b.add(i + 1)
if len(a) == k:
	print(*sorted(list(a & b)), sep='\n')
else:
	exit()


(N, K, C) = map(int, input().split())
S = input()
w = []
for i in range(len(S)):
	if S[i] == 'o':
		w.append(i)
early = []
tmpwd = -1
for i in range(len(w)):
	if len(early) >= K:
		continue
	if tmpwd < 0:
		tmpwd = w[i]
	elif w[i] > tmpwd + C:
		tmpwd = w[i]
	else:
		continue
	early.append(w[i])
late = []
tmpwd = -1
for i in reversed(range(len(w))):
	if len(late) >= K:
		continue
	if tmpwd < 0:
		tmpwd = w[i]
	elif w[i] < tmpwd - C:
		tmpwd = w[i]
	else:
		continue
	late.append(w[i])
wd = set(early) & set(late)
early.sort()
late.sort()
for i in range(K):
	if early[i] == late[i]:
		print(early[i] + 1)


(n, k, c) = [int(i) for i in input().split()]
s = input()
work1 = [0] * k
work2 = [0] * k
cnt = 0
day = 0
while cnt < k:
	if s[day] == 'o':
		work1[cnt] = day
		cnt += 1
		day += c + 1
	else:
		day += 1
cnt = k - 1
day = n - 1
while cnt >= 0:
	if s[day] == 'o':
		work2[cnt] = day
		cnt -= 1
		day -= c + 1
	else:
		day -= 1
for i in range(k):
	if work1[i] == work2[i]:
		print(work1[i] + 1)


(n, k, c) = map(int, input().split())
S = list(input())
L = [0] * k
nx = -1
cnt = 0
for (i, s) in enumerate(S):
	if i <= nx:
		continue
	if s == 'o':
		L[cnt] = i
		nx = i + c
		cnt += 1
		if cnt == k:
			break
R = [0] * k
nx = -1
cnt = 0
for (i, s) in enumerate(S[::-1]):
	if i <= nx:
		continue
	if s == 'o':
		R[cnt] = n - i - 1
		nx = i + c
		cnt += 1
		if cnt == k:
			break
for (l, r) in zip(L, R[::-1]):
	if l == r:
		print(l + 1)


(N, K, C) = list(map(int, input().split()))
S = input()
L = [0] * K
R = [0] * K
lpiv = 0
rpiv = N - 1
for i in range(K):
	while S[lpiv] == 'x':
		lpiv += 1
	while S[rpiv] == 'x':
		rpiv -= 1
	L[i] = lpiv
	R[i] = rpiv
	lpiv += C + 1
	rpiv -= C + 1
ans = 0
for i in range(K):
	if L[i] == R[K - i - 1]:
		print(L[i] + 1)


(n, k, c) = map(int, input().split())
s = input()
i = 0

def func(s, k, c):
	i = 0
	res = []
	while 1:
		if s[i] == 'o':
			res.append(i)
			if len(res) == k:
				break
			i += c
		i += 1
	return res
ans1 = func(s, k, c)
ans2 = func(s[::-1], k, c)
ans2 = [n - a - 1 for a in ans2]
ans2 = ans2[::-1]
for i in range(k):
	if ans1[i] == ans2[i]:
		print(ans1[i] + 1)


(n, k, c) = map(int, input().split())
s = input()
l = [0] * n
pre = n + c + 1
cnt = k
for i in range(n - 1, -1, -1):
	if s[i] == 'o' and -i + pre > c and (cnt > 0):
		pre = i
		l[i] = cnt
		cnt -= 1
pre = -c - 5
cnt = 0
for i in range(n):
	if s[i] == 'o' and i - pre > c and (cnt < k):
		pre = i
		cnt += 1
		if l[i] == cnt:
			print(i + 1)


(N, K, C) = map(int, input().split())
S = input()
(L, R) = ([-1] * K, [-1] * K)
k = 0
temp = -C
for (i, s) in enumerate(S, 1):
	if s == 'o' and i > temp + C:
		L[k] = i
		k += 1
		temp = i
	if k == K:
		break
k = K - 1
temp = N + C + 1
for (i, s) in reversed(list(enumerate(S, 1))):
	if s == 'o' and i < temp - C:
		R[k] = i
		k -= 1
		temp = i
	if k == -1:
		break
ans = []
for (l, r) in zip(L, R):
	if l == r:
		ans.append(l)
for a in ans:
	print(a)


(n, k, c) = list(map(int, input().split()))
s = input()
fro = []
bac = []
for i in range(n):
	if s[i] == 'o' and (len(fro) == 0 or fro[-1] + c < i):
		fro.append(i)
	if s[n - i - 1] == 'o' and (len(bac) == 0 or bac[-1] - c > n - i - 1):
		bac.append(n - i - 1)
for i in range(k):
	if fro[i] == bac[k - i - 1]:
		print(fro[i] + 1)


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

def get_positions():
	res = []
	i = 0
	while i < N and len(res) < K:
		if S[i] == 'o':
			res.append(i)
			i = i + C + 1
		else:
			i += 1
	return res
l = get_positions()
S = S[::-1]
r = get_positions()
for i in range(K):
	r[i] = N - 1 - r[i]
S = S[::-1]
lastl = [-1] * (N + 1)
for i in range(K):
	lastl[l[i] + 1] = i
for i in range(N):
	if lastl[i + 1] == -1:
		lastl[i + 1] = lastl[i]
lastr = [-1] * (N + 1)
for i in range(K):
	lastr[r[i]] = i
for i in range(N - 1, -1, -1):
	if lastr[i] == -1:
		lastr[i] = lastr[i + 1]
for i in range(N):
	if S[i] == 'x':
		continue
	li = lastl[i]
	ri = lastr[i + 1]
	cnt = 0
	if li != -1:
		cnt += li + 1
	if ri != -1:
		cnt += ri + 1
	if li != -1 and ri != -1 and (r[ri] - l[li] <= C):
		cnt -= 1
	if cnt >= K:
		continue
	print(i + 1)


(N, K, C) = map(int, input().split())
S = input()
wd_e = []
wd_l = []
pre = -(C + 1)
for i in range(N):
	if S[i] == 'o' and i - pre > C:
		wd_e.append(i)
		pre = i
	if len(wd_e) == K:
		break
pre = -(C + 1)
S = S[::-1]
for i in range(N):
	if S[i] == 'o' and i - pre > C:
		wd_l.append(N - 1 - i)
		pre = i
	if len(wd_l) == K:
		break
for (a, b) in zip(wd_e, wd_l[::-1]):
	if a == b:
		print(a + 1)


def greedy_sche(read_dir=1):
	res = []
	i = 1 if read_dir == 1 else n
	cnt = 1
	while cnt <= k:
		if s[i - 1]:
			res.append(i)
			cnt += 1
			i += read_dir * (c + 1)
		else:
			i += read_dir
	return res
(n, k, c) = map(int, input().split())
s = [c == 'o' for c in input()]
for (f, b) in zip(greedy_sche(1), greedy_sche(-1)[::-1]):
	if f == b:
		print(f)


(n, k, c) = map(int, input().split())
sl = list(input())
ansl = []
before = -float('inf')
for (idx, s) in enumerate(sl):
	if s == 'o' and before + c < idx:
		before = idx
		ansl.append(idx)
ansl2 = []
before = -float('inf')
for (idx, s) in enumerate(sl[::-1]):
	if s == 'o' and before + c < idx:
		before = idx
		ansl2.append(n - idx - 1)
for (a1, a2) in zip(ansl[:k], ansl2[:k][::-1]):
	if a1 == a2:
		print(a1 + 1)


(n, k, c) = list(map(int, input().split()))
s = input()
INF = float('inf')
left = [0] * (n + 1)
right = [0] * (n + 1)
mleft = 0
last = -c - 1
for i in range(n):
	if s[i] == 'o' and i - last > c:
		mleft += 1
		last = i
		left[i + 1] = mleft
mright = 0
last = -c - 1
t = s[::-1]
for i in range(n):
	if t[i] == 'o' and i - last > c:
		mright += 1
		last = i
		right[i + 1] = mright
for i in range(n):
	left[i + 1] = max(left[i + 1], left[i])
	right[i + 1] = max(right[i + 1], right[i])
left.remove(left[0])
right.remove(right[0])
right = right[::-1]
left.append(0)
right.append(0)
ans = []
for i in range(1, n + 1):
	if s[i - 1] == 'o':
		if left[i - 2] + right[i] < k:
			ans.append(i)
for i in range(len(ans)):
	print(ans[i])


(N, K, C) = (int(i) for i in input().split())
S = str(input())
L = [-1] * K
R = [-1] * K
S_index = 0
count = 0
while count < K:
	if S[S_index] == 'o':
		L[count] = S_index
		count += 1
		S_index += C + 1
	else:
		S_index += 1
S_index = N - 1
count = 0
while count < K:
	if S[S_index] == 'o':
		R[count] = S_index
		count += 1
		S_index -= C + 1
	else:
		S_index -= 1
R.reverse()
for (l, r) in zip(L, R):
	if l == r:
		print(l + 1)


def resolve():
	(N, K, C) = list(map(int, input().split()))
	S = input()
	left = [0] * N
	i = 0
	cnt = 1
	while i < N:
		if S[i] == 'o':
			left[i] = cnt
			i += C
			cnt += 1
		i += 1
	right = [0] * N
	i = 0
	cnt = K
	T = S[::-1]
	while i < N:
		if T[i] == 'o':
			right[i] = cnt
			i += C
			cnt -= 1
		i += 1
	right = right[::-1]
	for i in range(N):
		if left[i] == 0:
			continue
		if left[i] == right[i]:
			print(i + 1)

def __starting_point():
	resolve()
__starting_point()


(N, K, C) = map(int, input().split())
S = input()
L = list()
R = list()
i = 0
work_i = 0
while i < N and work_i < K:
	if S[i] == 'o':
		L.append(i)
		work_i += 1
		i += C
	i += 1
j = N - 1
work_j = 0
while j >= 0 and work_j < K:
	if S[j] == 'o':
		R.append(j)
		work_j += 1
		j -= C
	j -= 1
R.reverse()
length = min(len(L), len(R))
for i in range(length):
	if L[i] == R[i]:
		print(L[i] + 1)


(n, k, c) = list(map(int, input().split()))
s = str(input())
l = []
r = []
cnt = 0
for i in range(k):
	if s[cnt] == 'o':
		l.append(cnt + 1)
		cnt += c + 1
	else:
		while s[cnt] != 'o':
			cnt += 1
		l.append(cnt + 1)
		cnt += c + 1
cnt = 1
for i in range(k):
	if s[-cnt] == 'o':
		r.append(n - cnt + 1)
		cnt += c + 1
	else:
		while s[-cnt] != 'o':
			cnt += 1
		r.append(n - cnt + 1)
		cnt += c + 1
r = r[::-1]
for i in range(k):
	if l[i] == r[i]:
		print(l[i])


from collections import deque

def read_int():
	return int(input().strip())

def read_ints():
	return list(map(int, input().strip().split(' ')))

def solve():
	(N, K, C) = read_ints()
	S = input().strip()
	earliest = []
	i = 0
	while len(earliest) < K:
		if S[i] == 'o':
			earliest.append(i)
			i += C + 1
		else:
			i += 1
	latest = []
	i = N - 1
	while len(latest) < K:
		if S[i] == 'o':
			latest.append(i)
			i -= C + 1
		else:
			i -= 1
	latest.reverse()
	for (i, j) in zip(earliest, latest):
		if i == j:
			print(i + 1)

def __starting_point():
	solve()
__starting_point()


(n, k, c) = map(int, input().split())
s = input()
l2 = [float('inf')] * n
cnt2 = k
i = n - 1
while cnt2 != 0:
	if s[i] == 'o':
		l2[i] = cnt2
		i -= c + 1
		cnt2 -= 1
	else:
		i -= 1
cnt1 = 0
i = 0
while cnt1 < k:
	if s[i] == 'o':
		if l2[i] == cnt1 + 1:
			print(i + 1)
		i += c + 1
		cnt1 += 1
	else:
		i += 1


(n, k, c) = map(int, input().split())
s = input()
left_dp = []
right_dp = []
i = 0
while len(left_dp) < k:
	if s[i] == 'o':
		left_dp.append(i + 1)
		i += c + 1
	else:
		i += 1
i = n - 1
while len(right_dp) < k:
	if s[i] == 'o':
		right_dp.append(i + 1)
		i -= c + 1
	else:
		i -= 1
for i in range(k):
	if left_dp[i] == right_dp[k - i - 1]:
		print(left_dp[i])


import copy
(n, k, c) = map(int, input().split())
s = list(input())
front = []
back = []
j = copy.copy(k)
i = 0
while j > 0:
	if s[i] == 'o':
		front.append(i)
		i += c + 1
		j -= 1
	else:
		i += 1
j = copy.copy(k)
i = n - 1
while j > 0:
	if s[i] == 'o':
		back.append(i)
		i -= c + 1
		j -= 1
	else:
		i -= 1
back.sort()
for i in range(k):
	if front[i] == back[i]:
		print(front[i] + 1)


import sys
import math
import numpy as np
import itertools
(n, k, c) = (int(i) for i in input().split())
m = list(input())
l = [-1] * n
r = [-1] * n
a = 0
b = c
for i in range(n):
	if b >= c and m[i] == 'o':
		b = 0
		l[a] = i
		a += 1
	else:
		b += 1
	if a == k:
		break
a = k - 1
b = c
for i in range(n - 1, -1, -1):
	if b >= c and m[i] == 'o':
		b = 0
		r[a] = i
		a -= 1
	else:
		b += 1
	if a == k:
		break
answer = 0
for i in range(n):
	if l[i] == r[i] and l[i] >= 0:
		print(l[i] + 1)


(N, K, C) = map(int, input().split())
S = input()
(left, right) = ([], [])
d = 0
while d < N and len(left) < K:
	if S[d] == 'o':
		left.append(d)
		d += C + 1
	else:
		d += 1
d = N - 1
while d >= 0 and len(right) < K:
	if S[d] == 'o':
		right.append(d)
		d -= C + 1
	else:
		d -= 1
right.sort()
ans = []
for i in range(K):
	if left[i] == right[i]:
		ans.append(left[i])
for c in ans:
	print(c + 1)


(N, K, C) = [int(i) for i in input().split()]
S = input()
ok_days = []
fdp = []
bdp = []
for (ind, s) in enumerate(S):
	if s == 'o':
		ok_days.append(ind + 1)
last = 0
fseen = set()
for i in ok_days:
	if i > last:
		fseen.add(i)
		last = i + C
last = ok_days[-1] + 1
bseen = set()
for i in ok_days[::-1]:
	if i < last:
		bseen.add(i)
		last = i - C
ans = fseen & bseen
if len(fseen) <= K and len(bseen) <= K:
	for i in sorted(list(ans)):
		print(i)


(N, K, C) = map(int, input().split())
S = input()
l = [None] * N
c = 0
t = 0
while c < K:
	if S[t] == 'o':
		l[t] = c
		c += 1
		t += C + 1
	else:
		t += 1
t = N - 1
a = []
while c:
	if S[t] == 'o':
		c -= 1
		if c == l[t]:
			a.append(t + 1)
		t -= C + 1
	else:
		t -= 1
print(*a[::-1], sep='\n')


(n, k, c) = list(map(int, input().split()))
s = input()
available = []
for i in range(n):
	if s[i] == 'o':
		available.append(i)
left = [0] * n
rest = 0
cnt = 0
for i in range(n):
	if s[i] == 'o' and i >= rest:
		cnt += 1
		left[i] = cnt
		rest = i + c + 1
	else:
		left[i] = cnt
right = [0] * n
rest = n - 1
cnt = 0
for i in range(n - 1, -1, -1):
	if s[i] == 'o' and i <= rest:
		cnt += 1
		right[i] = cnt
		rest = i - c - 1
	else:
		right[i] = cnt
for i in [left, right]:
	i.insert(0, 0)
	i.append(0)
ans = []
for i in range(1, n + 1):
	a = left[i - 1] + right[i + 1]
	if a < k:
		ans.append(i)
for j in ans:
	print(j)


(N, K, D) = map(int, input().split())
S = [True if x == 'o' else False for x in input()]
(l_lst, r_lst) = ([], [])
i = 1
for _ in range(K):
	while not S[i - 1]:
		i += 1
	l_lst.append(i)
	i += D + 1
i = N
for _ in range(K):
	while not S[i - 1]:
		i -= 1
	r_lst.append(i)
	i -= D + 1
r_lst.reverse()
for i in range(K):
	ans = l_lst[i]
	if ans == r_lst[i]:
		print(ans)


def solve():
	(N, K, C) = list(map(int, input().split()))
	S = input()
	left = []
	rest = 0
	work = 0
	for i in range(N):
		if S[i] == 'o' and rest == 0:
			left.append(i)
			rest = C + 1
			work += 1
		if rest > 0:
			rest -= 1
		if work == K:
			break
	right = []
	rest = 0
	work = 0
	for i in reversed(list(range(N))):
		if S[i] == 'o' and rest == 0:
			right.append(i)
			rest = C + 1
			work += 1
		if rest > 0:
			rest -= 1
		if work == K:
			break
	right = list(reversed(right))
	for i in range(len(left)):
		if left[i] == right[i]:
			print(left[i] + 1)

def __starting_point():
	solve()
__starting_point()


(N, K, C) = map(int, input().split())
S = input().rstrip()
P = [0] * (N + 1)
(cl, l, cr, r) = (0, 1, 0, 1)
for i in range(N):
	if cl > C and S[i] != 'x':
		cl = 0
		l += 1
	cl += 1
	P[i + 1] += l
	if cr > C and S[-1 - i] != 'x':
		cr = 0
		r += 1
	cr += 1
	P[N - 2 - i] += r
for i in range(N):
	if P[i] < K and S[i] == 'o':
		print(i + 1)


def assign(s, n, k, c):
	res = []
	i = 0
	while k > 0 and i < n:
		if s[i] == 'o':
			res.append(i)
			k -= 1
			i += c
		i += 1
	return res
(n, k, c) = map(int, input().split())
s = input()
a = assign(s, n, k, c)
b = assign(s[::-1], n, k, c)[::-1]
c = [n - x - 1 for x in b]
for (x, y) in zip(a, c):
	if x == y:
		print(x + 1)


(n, k, c) = map(int, input().split())
s = list(input())
L = []
R = []
i = 0
while i < n:
	if s[i] == 'o':
		L.append(i + 1)
		i += c + 1
	else:
		i += 1
j = 0
s2 = s[::-1]
while j < n:
	if s2[j] == 'o':
		R.append(n - j)
		j += c + 1
	else:
		j += 1
R = R[::-1]
if len(L) <= k:
	for p in range(min(len(L), len(R))):
		if L[p] == R[p]:
			print(L[p])


(n, k, c) = map(int, input().split())
s = input()
l = [-c - 1]
for i in range(n):
	if s[i] == 'o' and i - l[-1] > c:
		l.append(i)
r = [n + c]
for i in reversed(range(n)):
	if s[i] == 'o' and r[-1] - i > c:
		r.append(i)
r.reverse()
if len(l) - 1 == k:
	for (li, ri) in zip(l[1:], r):
		if li == ri:
			print(li + 1)


(N, K, C) = map(int, input().rstrip().split(' '))
S = input()
kinmu = 0
niti = 0
f = []
b = []
kinmu = 0
niti = 0
while kinmu < K and niti < N:
	if S[niti] == 'o':
		f.append(niti)
		kinmu += 1
		niti += C
	niti += 1
kinmu = 0
niti = N - 1
while kinmu < K and niti >= 0:
	if S[niti] == 'o':
		b.append(niti)
		kinmu += 1
		niti -= C
	niti -= 1
b.reverse()
for i in range(K):
	if f[i] == b[i]:
		print(f[i] + 1)


def main():
	(N, K, C) = [int(i) for i in input().split()]
	S = input().rstrip()
	if all((s == 'x' for s in S)):
		return
	left = [0] * N
	day = 0
	work_cnt = 1
	while day < N:
		if S[day] == 'o':
			left[day] = work_cnt
			work_cnt += 1
			day += C
		day += 1
	right = [0] * N
	day = N - 1
	work_cnt = K
	while 0 <= day:
		if S[day] == 'o':
			right[day] = work_cnt
			work_cnt -= 1
			day -= C
		day -= 1
	for i in range(N):
		if left[i] == right[i] and left[i] != 0:
			print(i + 1)
main()


(N, K, C) = map(int, input().split())
S = input()
F = {}
i = 0
c = 1
while i < N and c <= K:
	if S[i] == 'x':
		i += 1
		continue
	F[c] = i + 1
	i += C + 1
	c += 1
L = {}
i = N - 1
c = K
while i >= 0 and c >= 1:
	if S[i] == 'x':
		i -= 1
		continue
	L[c] = i + 1
	i -= C + 1
	c -= 1
for i in range(1, K + 1):
	if F[i] == L[i]:
		print(F[i])


(n, k, c) = map(int, input().split())
s = input()
L = [0] * k
R = [0] * k
m = 0
l = 0
for i in range(k):
	while s[m] == 'x':
		m += 1
	L[i] = m
	m += c + 1
	while s[n - l - 1] == 'x':
		l += 1
	R[i] = n - l - 1
	l += c + 1
for i in range(k):
	if R[k - i - 1] == L[i]:
		print(L[i] + 1)


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


(N, K, C) = map(int, input().split())
S = input()
must = set()
i = len(S) + C
for j in range(K):
	i = S.rindex('o', 0, i - C)
	must.add(i)
if i <= C or 'o' not in S[:i - C]:
	i = -C - 1
	for j in range(K):
		i = S.index('o', i + C + 1)
		if i in must:
			print(i + 1)


(N, K, C) = map(int, input().split())
S = input()
r = []
l = []
i = 0
while 1:
	if S[i] == 'x':
		i += 1
		continue
	r.append(i)
	if len(r) >= K:
		break
	i += C + 1
i = N - 1
while 1:
	if S[i] == 'x':
		i -= 1
		continue
	l.append(i)
	if len(l) >= K:
		break
	i -= C + 1
for (a, b) in zip(r, reversed(l)):
	if a == b:
		print(a + 1)


(n, k, c) = map(int, input().split())
s = input()
l = [0] * n
r = [0] * n
mini = 0
maxi = n - 1
numl = 1
numr = k
for i in range(n):
	if s[i] != 'x' and i >= mini:
		l[i] = numl
		numl += 1
		mini = i + (c + 1)
for i in reversed(range(n)):
	if s[i] != 'x' and i <= maxi:
		r[i] = numr
		numr -= 1
		maxi = i - (c + 1)
for i in range(n):
	if l[i] != 0 and l[i] == r[i]:
		print(i + 1)


from collections import deque
(n, k, c) = map(int, input().split())
s = list(input())
L = deque([])
R = deque([])
i = 1
while 0 < i < n + 1 and len(L) < k:
	if s[i - 1] != 'x':
		L.append(i)
		i += c + 1
	else:
		i += 1
i = n
while 0 < i < n + 1 and len(R) < k:
	if s[i - 1] != 'x':
		R.appendleft(i)
		i -= c + 1
	else:
		i -= 1
for i in range(k):
	if L[i] == R[i]:
		print(L[i])


(n, k, c) = map(int, input().split())
s = input()
s2 = s[::-1]
dp1 = [0] * (n + 2)
dp2 = [0] * (n + 2)
for (dp, ss) in zip([dp1, dp2], [s, s2]):
	for i in range(n):
		if ss[i] == 'x':
			dp[i + 1] = dp[i]
		elif i <= c:
			dp[i + 1] = min(1, dp[i] + 1)
		else:
			dp[i + 1] = max(dp[i - c] + 1, dp[i])
dp2 = dp2[::-1]
for i in range(1, n + 1):
	if s[i - 1] == 'o' and dp1[i - 1] + dp2[i + 1] < k:
		print(i)


(n, k, c) = map(int, input().split())
s = input()
L = []
R = []
i = 0
j = n - 1
while i < n and len(L) < k:
	if s[i] == 'o':
		L.append(i)
		i += c
	i += 1
while j > -1 and len(R) < k:
	if s[j] == 'o':
		R.append(j)
		j -= c
	j -= 1
R.reverse()
for x in range(k):
	if R[x] == L[x]:
		print(R[x] + 1)


(n, k, c) = map(int, input().split())
s = list(input())
l = [-99999999]
for i in range(n):
	if s[i] == 'o':
		if l[-1] + c < i:
			l.append(i)
l = l[1:k + 1]
l2 = [99999999]
for i in range(n - 1, -1, -1):
	if s[i] == 'o':
		if l2[-1] - c > i:
			l2.append(i)
l2.reverse()
l2 = l2[len(l2) - 1 - k:len(l2) - 1]
for i in range(k):
	if l[i] == l2[i]:
		print(l[i] + 1)


(n, k, rest) = map(int, input().split())
s = input()
last = -3000000
l1 = []
l2 = set()
for (i, c) in enumerate(s):
	if last + rest < i and c == 'o':
		last = i
		l1.append(i)
last = 6000000
for (i, c) in enumerate(reversed(s)):
	if n - 1 - i < last - rest and c == 'o':
		last = n - 1 - i
		l2.add(n - 1 - i)
if len(l1) != k:
	print()
else:
	for i in l1:
		if i in l2:
			print(i + 1)


(N, K, C) = map(int, input().split())
S = input()
L = [0] * N
R = [0] * N
c = 1
last = -C - 1
for i in range(N):
	if i - last > C and S[i] != 'x' and (c <= K):
		L[i] = c
		c += 1
		last = i
c = K
last = N + C
for i in range(N - 1, -1, -1):
	if last - i > C and S[i] != 'x' and (c >= 1):
		R[i] = c
		c -= 1
		last = i
for i in range(N):
	if 0 < L[i] == R[i]:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input()
l = list()
r = list()
i = 0
while i < n:
	if len(l) == k:
		break
	if s[i] == 'o':
		l.append(i)
		i += c
	i += 1
i = n - 1
while i >= 0:
	if len(r) == k:
		break
	if s[i] == 'o':
		r.append(i)
		i -= c
	i -= 1
r.sort()
for i in range(k):
	if l[i] == r[i]:
		print(l[i] + 1)


(N, K, C) = map(int, input().split())
S = input()
p = -C - 1
L = []
R = []
for i in range(N):
	if i > p + C and S[i] == 'o':
		L.append(i)
		p = i
p = N + C
for i in range(N - 1, -1, -1):
	if p > C + i and S[i] == 'o':
		R.append(i)
		p = i
R = R[::-1]
if len(L) > K or len(R) > K:
	exit()
ans = []
for (a, b) in zip(L, R):
	if a == b:
		ans.append(str(a + 1))
print('\n'.join(ans))


(n, k, c) = map(int, input().split())
s = input()
idx = 0
forward = []
while idx < len(s) and len(forward) < k:
	if s[idx] == 'o':
		forward.append(idx)
		idx += c + 1
	else:
		idx += 1
idx = len(s) - 1
backward = []
while idx >= 0 and len(backward) < k:
	if s[idx] == 'o':
		backward.append(idx)
		idx -= c + 1
	else:
		idx -= 1
for (f, b) in zip(forward, backward[::-1]):
	if f == b:
		print(f + 1)


import sys
sys.setrecursionlimit(10 ** 9)
(N, K, C) = map(int, input().split())
S = input()
i = 0
forward = set()
while N > i:
	if S[i] == 'o':
		forward.add(i)
		i += C + 1
	else:
		i += 1
if len(forward) != K:
	exit()
i = N - 1
backward = set()
while i >= 0:
	if S[i] == 'o':
		backward.add(i)
		i -= C + 1
	else:
		i -= 1
isect = list(forward & backward)
for i in sorted(isect):
	print(i + 1)


import bisect
(n, k, c) = map(int, input().split())
s = input()
lst = []
for i in range(n):
	if s[i] == 'o':
		lst.append(i + 1)
(x, y) = ([], [])
for i in range(len(lst)):
	if i == 0:
		x.append(lst[i])
	elif lst[i] - x[-1] > c:
		x.append(lst[i])
	if len(x) == k:
		break
for i in range(len(lst))[::-1]:
	if i == len(lst) - 1:
		y.append(lst[i])
	elif y[-1] - lst[i] > c:
		y.append(lst[i])
	if len(y) == k:
		break
x.sort()
y.sort()
ans = []
for i in range(k):
	if x[i] == y[i]:
		ans.append(x[i])
for a in ans:
	print(a)


data = input().split(' ')
(N, K, C) = (int(data[0]), int(data[1]), int(data[2]))
S = input()
point = 0
work_start = [0] * (K + 1)
for i in range(1, K + 1):
	point = S.find('o', point, N)
	work_start[i] = point + 1
	point += C + 1
point = N
work_end = [0] * (K + 1)
for i in range(K, 0, -1):
	point = S.rfind('o', 0, point)
	work_end[i] = point + 1
	point -= C
for i in range(1, K + 1):
	if work_start[i] == work_end[i]:
		print(work_start[i])


(n, k, c) = map(int, input().split())
plan = list(input())
a = [0] * k
b = [0] * k
idx = 0
pause = c
for i in range(n):
	pause += 1
	if plan[i] == 'x':
		continue
	if pause > c and idx < k:
		a[idx] = i + 1
		idx += 1
		pause = 0
idx = k - 1
pause = c
for i in range(n - 1, -1, -1):
	pause += 1
	if plan[i] == 'x':
		continue
	if pause > c:
		if idx >= 0:
			b[idx] = i + 1
			idx -= 1
			pause = 0
for i in range(k):
	if a[i] == b[i]:
		print(a[i])


(n, k, c) = map(int, input().split())
c += 1
s = list(input())
a = []
i = 0
while i < len(s) and len(a) < k:
	if s[i] == 'x':
		i += 1
		continue
	a.append(i)
	i += c
b = []
j = len(s) - 1
while j > -1 and len(b) < k:
	if s[j] == 'x':
		j -= 1
		continue
	b.append(j)
	j -= c
b = b[::-1]
for i in range(len(a)):
	if a[i] == b[i]:
		print(a[i] + 1)


(n, k, c) = list(map(int, input().split()))
s = input()
i = 0
counter = 0
fslist = []
while counter < k:
	if s[i] == 'o':
		fslist.append(i)
		i += c + 1
		counter += 1
	else:
		i += 1
i = -1
counter = 0
felist = []
while counter < k:
	if s[i] == 'o':
		felist.append(i + n)
		i -= c + 1
		counter += 1
	else:
		i -= 1
felist.reverse()
for i in range(k):
	if fslist[i] == felist[i]:
		print(fslist[i] + 1)


(n, k, c) = map(int, input().split())
S = input()
left = [-1 for i in range(k)]
right = [-1 for i in range(k)]
pointer = 0
for l in range(k):
	for s in range(pointer, n):
		if S[s] == 'o':
			left[l] = s
			pointer = s + c + 1
			break
pointer = n - 1
for r in range(k):
	for s in range(pointer, -1, -1):
		if S[s] == 'o':
			right[r] = s
			pointer = s - c - 1
			break
for (l, r) in zip(left, right[::-1]):
	if l == r:
		print(l + 1)


L = []
R = []
(N, K, C) = map(int, input().split())
S = list(input())
s = S[::-1]
i = 0
while len(L) < K:
	if S[i] == 'o':
		L.append(i + 1)
		if i + C < N:
			for j in range(1, C + 1):
				S[i + j] = 'x'
	i += 1
k = 0
while len(R) < K:
	if s[k] == 'o':
		R.append(N - k)
		if k + C < N:
			for l in range(1, C + 1):
				s[k + l] = 'x'
	k += 1
R = R[::-1]
ans = []
for i in range(K):
	if L[i] == R[i]:
		ans.append(L[i])
print(*ans)


(n, k, c) = map(int, input().split())
s = input()
left = [0] * (n + 2)
t = 0
while t < n:
	if s[t] == 'o':
		left[t + 1] = 1
		t += c
	t += 1
for i in range(n + 1):
	left[i + 1] += left[i]
right = [0] * (n + 2)
t = n - 1
while t >= 0:
	if s[t] == 'o':
		right[t + 1] = 1
		t -= c
	t -= 1
for i in range(n + 1)[::-1]:
	right[i] += right[i + 1]
for i in range(1, n + 1):
	if left[i - 1] + right[i + 1] < k:
		print(i)


(n, k, c) = map(int, input().split())
s = input()

def solve_shortest(s):
	sche = []
	t = 0
	day = 0
	for (i, ch) in enumerate(s):
		if (ch == 'o') & (i >= t):
			sche += [i]
			t = i + c + 1
			day += 1
		if day == k:
			break
	else:
		return
	return sche
sche1 = solve_shortest(s)
sche2 = solve_shortest(s[::-1])
ans = []
for (x, y) in zip(sche1, sche2[::-1]):
	if x + y == n - 1:
		ans.append(x + 1)
print('\n'.join(map(str, ans)))


(n, k, c) = map(int, input().split())
S = list(input())
rS = S[::-1]
lcnt = 0
left = [0] * n
rcnt = 0
right = [0] * n
llimit = -1
rlimit = -1
for i in range(n):
	if S[i] == 'o' and llimit < i:
		lcnt += 1
		left[i] = lcnt
		llimit = i + c
	if rS[i] == 'o' and rlimit < i:
		rcnt += 1
		right[-(i + 1)] = k + 1 - rcnt
		rlimit = i + c
for i in range(n):
	if left[i] == right[i] and left[i] > 0:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input()
left = []
right = []
i = 0
while i < n:
	if s[i] == 'o':
		left.append(i)
		i += c
		if len(left) == k:
			break
	i += 1
i = n - 1
while i >= 0:
	if s[i] == 'o':
		right.append(i)
		i -= c
		if len(right) == k:
			break
	i -= 1
right.reverse()
ans = []
for (i, j) in zip(left, right):
	if i == j:
		ans.append(i)
for x in ans:
	print(x + 1)


(n, k, c) = map(int, input().split())
s = input()
dpl = []
dpr = []
ans = []
count = 0
i = 0
while count < k:
	if s[i] == 'o':
		dpl.append(i)
		count += 1
		i += c + 1
	else:
		i += 1
count = 0
i = n - 1
while count < k:
	if s[i] == 'o':
		dpr.append(i)
		count += 1
		i += -c - 1
	else:
		i -= 1
dpr.sort()
for i in range(len(dpl)):
	if dpl[i] == dpr[i]:
		ans.append(dpl[i] + 1)
print(*ans, sep='\n')


(n, k, c) = map(int, input().split())
s = input()
l = [0 for i in range(k)]
r = [0 for i in range(k)]
(i, j) = (0, 0)
while i < n and (not l[-1]):
	if s[i] == 'o':
		l[j] = i + 1
		i += c + 1
		j += 1
	else:
		i += 1
(i, j) = (0, k - 1)
while i < n and (not r[0]):
	if s[n - i - 1] == 'o':
		r[j] = n - i
		i += c + 1
		j -= 1
	else:
		i += 1
for i in range(k):
	if l[i] == r[i]:
		print(l[i])


(n, k, c) = list(map(int, input().split()))
s = input()
l1 = [None] * k
l2 = [None] * k
i = 0
j = 0
while j < k and i < n:
	if s[i] == 'o':
		l1[j] = i
		i += c + 1
		j += 1
	else:
		i += 1
i = n - 1
j = k - 1
while j >= 0 and i >= 0:
	if s[i] == 'o':
		l2[j] = i
		i -= c + 1
		j -= 1
	else:
		i -= 1
for (item1, item2) in zip(l1, l2):
	if item1 == item2:
		print(item1 + 1)


(n, k, c) = list(map(int, input().split()))
s = input()
cnt0 = [-10 ** 10] * len(s)
cnt1 = [-10 ** 10] * len(s)
rest0 = c
rest1 = c
ct0 = 1
ct1 = 1
for i in range(len(s)):
	a = s[i]
	b = s[len(s) - 1 - i]
	if (c <= rest0) & (a == 'o'):
		cnt0[i] = ct0
		ct0 += 1
		rest0 = 0
	else:
		rest0 += 1
	if (c <= rest1) & (b == 'o'):
		cnt1[len(s) - 1 - i] = ct1
		ct1 += 1
		rest1 = 0
	else:
		rest1 += 1
for i in range(len(s)):
	if cnt0[i] + cnt1[i] == k + 1:
		print(i + 1)


(N, K, C) = map(int, input().split())
S = input()
A = []
i = 0
while len(A) < K:
	if S[i] == 'o':
		A.append(i + 1)
		i += C + 1
	else:
		i += 1
B = []
i = -1
while len(B) < K:
	if S[i] == 'o':
		B.append(i)
		i -= C + 1
	else:
		i -= 1
B = [N + i + 1 for i in B]
B = B[::-1]
for i in range(K):
	if A[i] == B[i]:
		print(A[i])


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import time, random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	(n, k, c) = LI()
	s = S()
	l = set()
	i = 0
	while i < n:
		if s[i] == 'x':
			i += 1
		else:
			l.add(i + 1)
			i += c + 1
	if len(l) > k:
		return ''
	r = set()
	i = n - 1
	while i >= 0:
		if s[i] == 'x':
			i -= 1
		else:
			r.add(i + 1)
			i -= c + 1
	return JA(sorted(l & r), '\n')
print(main())


import sys

def solve(N: int, K: int, C: int, S: str):
	l = [None] * N
	r = [None] * N
	pre = -float('inf')
	k = -1
	for cur in range(N):
		if cur - pre > C and S[cur] == 'o':
			k += 1
			pre = cur
			l[k] = cur
	pre = float('inf')
	k = K
	for cur in range(N - 1, -1, -1):
		if pre - cur > C and S[cur] == 'o':
			k -= 1
			pre = cur
			r[k] = cur
	return [ll + 1 for (ll, rr) in zip(l[:K], r[:K]) if ll == rr]

def main():

	def iterate_tokens():
		for line in sys.stdin:
			for word in line.split():
				yield word
	tokens = iterate_tokens()
	N = int(next(tokens))
	K = int(next(tokens))
	C = int(next(tokens))
	S = next(tokens)
	print(*solve(N, K, C, S), sep='\n')

def __starting_point():
	main()
__starting_point()


(n, k, c) = map(int, input().split())
s = list(input())
p = [-1] * n
i = 0
f = 0
while i < n:
	if s[i] == 'o':
		p[i] = f
		f += 1
		i += c + 1
	else:
		i += 1
i = 0
f = 0
q = [-1] * n
while i < n:
	if s[n - i - 1] == 'o':
		q[n - i - 1] = f
		f += 1
		i += c + 1
	else:
		i += 1
for i in range(n):
	if p[i] >= 0 and q[i] >= 0 and (p[i] + q[i] == k - 1):
		print(i + 1)


INF = float('inf')
(n, k, c) = map(int, input().split())
s = input()
(l, r) = ([(0, -INF)] + [None] * n, [(0, INF)] + [None] * n)
for (i, x) in enumerate(s):
	(wn, wd) = l[i]
	l[i + 1] = (wn + 1, i) if x == 'o' and i - wd > c else l[i]
for (i, x) in enumerate(s[::-1]):
	(wn, wd) = r[i]
	j = n - i - 1
	r[i + 1] = (wn + 1, j) if x == 'o' and wd - j > c else r[i]
for i in range(n):
	(ln, ld) = l[i]
	(rn, rd) = r[n - i - 1]
	w = ln + rn
	if rd - ld <= c:
		w -= 1
	if w < k:
		print(i + 1)


def main():
	(n, k, c) = map(int, input().split())
	s = input().rstrip()
	frnt = [None] * n
	back = [None] * n
	if s[0] == 'o':
		frnt[0] = [1, 0]
	else:
		frnt[0] = [0, -1 * n - 100]
	for i in range(1, n):
		if s[i] == 'o' and i - frnt[i - 1][1] - 1 >= c:
			frnt[i] = [frnt[i - 1][0] + 1, i]
		else:
			frnt[i] = [frnt[i - 1][0], frnt[i - 1][1]]
	if s[-1] == 'o':
		back[-1] = [1, n - 1]
	else:
		back[-1] = [0, 2 * n + 100]
	for i in reversed(range(n - 1)):
		if s[i] == 'o' and back[i + 1][1] - i - 1 >= c:
			back[i] = [back[i + 1][0] + 1, i]
		else:
			back[i] = [back[i + 1][0], back[i + 1][1]]
	for i in range(n):
		if s[i] == 'x':
			continue
		a = frnt[i][0] + back[i][0]
		if i == frnt[i][1]:
			a -= 1
		if i == back[i][1]:
			a -= 1
		if i != frnt[i][1] and i != back[i][1]:
			if back[i][1] - frnt[i][1] - 1 < c:
				a -= 1
		if a == k - 1:
			print(i + 1)

def __starting_point():
	main()
__starting_point()


import sys
(n, k, c) = map(int, input().split())
s = input()
front = [0 for _ in range(n)]
back = [0 for _ in range(n)]
rm = -10 ** 6
cur = 0
for i in range(n):
	if s[i] == 'o' and i - rm > c:
		cur += 1
		front[i] = cur
		rm = i
if cur > k:
	sys.exit()
lm = 10 ** 6
cur = k + 1
for i in range(n - 1, -1, -1):
	if s[i] == 'o' and lm - i > c:
		cur -= 1
		back[i] = cur
		lm = i
for i in range(n):
	if front[i] > 0 and front[i] == back[i]:
		print(i + 1)


(N, K, C) = map(int, input().split())
S = input()
l = []
r = []
i = 0
j = N - 1
while i < N and len(l) < K:
	if S[i] == 'o':
		l.append(i)
		i += C
	i += 1
while j >= 0 and len(r) < K:
	if S[j] == 'o':
		r.append(j)
		j -= C
	j -= 1
r.reverse()
for i in range(K):
	if l[i] == r[i]:
		print(l[i] + 1)


(N, K, C) = map(int, input().split())
S = input()
latest = [None] * K
i = len(S) + C
for j in range(K):
	i = S.rindex('o', 0, i - C)
	latest[j] = i
if i <= C or 'o' not in S[:i - C]:
	i = -C - 1
	for j in range(K - 1, -1, -1):
		i = S.index('o', i + C + 1)
		if i == latest[j]:
			print(i + 1)


def main():
	(N, K, C) = map(int, input().split())
	S = input()
	R = [0] * K
	(n, k) = (N - 1, 0)
	while k < K:
		if S[n] == 'o':
			R[k] = n + 1
			k += 1
			n -= C
		n -= 1
	R = R[::-1]
	(n, k) = (0, 0)
	while k < K:
		if S[n] == 'o':
			if n + 1 == R[k]:
				print(n + 1)
			k += 1
			n += C
		n += 1
main()


(n, k, c) = map(int, input().split())
s = input()
sub = []
key = -1
for i in range(n):
	if s[i] == 'o' and (key == -1 or key + c + 1 <= i):
		sub.append(i + 1)
		key = i
	if len(sub) == k:
		break
sub2 = []
key = -1
for i in range(n - 1, -1, -1):
	if s[i] == 'o' and (key == -1 or key - c - 1 >= i):
		sub2.append(i + 1)
		key = i
	if len(sub2) == k:
		break
sub2.reverse()
ans = []
for i in range(k):
	if sub[i] == sub2[i]:
		ans.append(sub[i])
for value in ans:
	print(value)


(n, k, c) = map(int, input().split())
sl = list(input())
ansl = []
before = -float('inf')
for (idx, s) in enumerate(sl):
	if s == 'o' and before + c < idx:
		before = idx
		ansl.append(idx)
if len(ansl) > k:
	print()
	exit()
ansl2 = []
before = -float('inf')
for (idx, s) in enumerate(sl[::-1]):
	if s == 'o' and before + c < idx:
		before = idx
		ansl2.append(n - idx - 1)
for a in sorted(list(set(ansl) & set(ansl2))):
	print(a + 1)


(n, k, c) = map(int, input().split())
s = input()

def yutori(s, inv):
	ans = [0] * k
	index = 0
	for i in range(k):
		if inv:
			ans[k - 1 - i] = n - 1 - s.find('o', index)
			index = s.find('o', index) + (c + 1)
		else:
			ans[i] = s.find('o', index)
			index = ans[i] + (c + 1)
	return ans
l = yutori(s, 0)
r = yutori(s[::-1], 1)
for (i, j) in zip(l, r):
	if i == j:
		print(i + 1)


def main():
	(N, K, C) = list(map(int, input().split()))
	S = input()
	i = 0
	c = 0
	p = [-1] * N
	while c < K:
		if S[i] == 'o':
			p[i] = c
			c += 1
			i += C
		i += 1
	i = N - 1
	c = K - 1
	q = [-1] * N
	while c >= 0:
		if S[i] == 'o':
			q[i] = c
			c -= 1
			i -= C
		i -= 1
	for i in range(N):
		if ~p[i] and p[i] == q[i]:
			print(i + 1)

def __starting_point():
	main()
__starting_point()


(N, K, C) = map(int, input().split())
S = input()
l = []
num = 0
i = 0
while num < K:
	if S[i] == 'o':
		l.append(i)
		num += 1
		i += C + 1
	else:
		i += 1
r = []
num = 0
i = N - 1
while num < K:
	if S[i] == 'o':
		r.append(i)
		num += 1
		i -= C + 1
	else:
		i -= 1
r.reverse()
for i in range(K):
	if l[i] == r[i]:
		print(l[i] + 1)


(N, K, C) = map(int, input().split())
SL = input()
SR = SL[::-1]
Left = []
Right = []
Last = -N - 1
Rast = -N - 1
cL = cR = 0
for i in range(N):
	if SL[i] == 'o' and i - Last > C and (cL <= K):
		Left.append(i)
		Last = i
		cL += 1
	if SR[i] == 'o' and i - Rast > C and (cR <= K):
		Right.append(N - i - 1)
		Rast = i
		cR += 1
Right = Right[::-1]
ans = []
for k in range(K):
	if Left[k] == Right[k]:
		ans.append(Left[k] + 1)
if len(ans) == 0:
	print()
else:
	for a in ans:
		print(a)


(n, k, c) = map(int, input().split())
s = input()
l = []
tmp = 0
cnt = 0
while tmp < n:
	if s[tmp] == 'o':
		l.append(tmp)
		tmp += c + 1
		cnt += 1
	else:
		tmp += 1
if cnt > k:
	exit()
l2 = []
tmp2 = n - 1
cnt2 = 0
while tmp2 >= 0:
	if s[tmp2] == 'o':
		l2.append(tmp2)
		tmp2 -= c + 1
		cnt2 += 1
	else:
		tmp2 -= 1
if cnt2 > k:
	exit()
for i in range(k):
	if l[i] == l2[k - 1 - i]:
		print(l[i] + 1)


(N, K, C) = map(int, input().split())
S = input()
L = [0 for i in range(K)]
R = [0 for i in range(K)]
n = 0
rc = 0
lc = 0
while True:
	if lc == K:
		break
	if S[n] == 'o':
		L[lc] = n + 1
		n += C + 1
		lc += 1
	else:
		n += 1
n = N - 1
while True:
	if rc == K:
		break
	if S[n] == 'o':
		R[K - 1 - rc] = n + 1
		n -= C + 1
		rc += 1
	else:
		n -= 1
for i in range(K):
	if R[i] == L[i]:
		print(R[i])


def main():
	(N, K, C) = map(int, input().split())
	S = input()
	L = [-1] * K
	i = 0
	cur = 0
	while i < N:
		if S[i] == 'o':
			L[cur] = i
			cur += 1
			if cur == K:
				break
			i += C
		i += 1
	R = [-1] * K
	i = N - 1
	cur = K - 1
	while i >= 0:
		if S[i] == 'o':
			R[cur] = i
			cur -= 1
			if cur == -1:
				break
			i -= C
		i -= 1
	ans = (l + 1 for (l, r) in zip(L, R) if l == r)
	print(*ans, sep='\n')

def __starting_point():
	main()
__starting_point()


(N, K, C) = list(map(int, input().split()))
S = input().strip('\n')
L = [-1] * N
R = [10 ** 10] * N
l = 1
r = K
li = 0
ri = N - 1
while li < N:
	if S[li] == 'o':
		L[li] = l
		l += 1
		li += C + 1
	else:
		li += 1
while ri >= 0:
	if S[ri] == 'o':
		R[ri] = r
		r -= 1
		ri -= C + 1
	else:
		ri -= 1
for i in range(N):
	if L[i] == R[i]:
		print(i + 1)


def main():
	(N, K, C) = map(int, input().split())
	S = dict(enumerate(str(input()), 1))
	sr = list((k for (k, v) in S.items() if v == 'o'))
	sl = list(reversed(sr.copy()))
	l = [sl.pop()]
	r = [sr.pop()]
	for x in range(1, K):
		while True:
			ll = sl.pop()
			if ll > l[x - 1] + C:
				l.append(ll)
				break
		while True:
			rr = sr.pop()
			if rr < r[x - 1] - C:
				r.append(rr)
				break
	for (ll, rr) in zip(l, reversed(r)):
		if ll == rr:
			print(ll)

def __starting_point():
	main()
__starting_point()


(N, K, C) = list(map(int, input().split()))
S = input()
length = len(S)
INF = float('inf')
Ls = [-INF]
n = 0
for (i, c) in enumerate(S):
	if c == 'o' and i - Ls[-1] > C:
		Ls.append(i)
		n += 1
		if n >= K:
			break
Rs = [INF]
n = 0
for (i, c) in enumerate(reversed(S)):
	if c == 'o' and Rs[-1] - (length - 1 - i) > C:
		Rs.append(length - 1 - i)
		n += 1
		if n >= K:
			break
Rs.reverse()
for (l, r) in zip(Ls[1:], Rs[:-1]):
	if l == r:
		print(l + 1)


(N, K, C) = map(int, input().split())
S = input()
forward = []
back = []
ans = []
tmp = 0
for i in range(len(S)):
	if tmp:
		tmp -= 1
		continue
	if S[i] == 'o':
		forward.append(i + 1)
		tmp = C
tmp = 0
for i in range(len(S) - 1, -1, -1):
	if tmp:
		tmp -= 1
		continue
	if S[i] == 'o':
		back.append(i + 1)
		tmp = C
	if len(back) == K:
		break
back.sort()
for i in range(K):
	if forward[i] == back[i]:
		print(forward[i])


(N, K, C) = map(int, input().split())
S = list(input())

def solve(List):
	ans = []
	i = 0
	while i < N:
		if List[i] == 'o':
			ans.append(i + 1)
			i += C
		i += 1
	return ans
n = solve(S)
if len(n) > K:
	pass
else:
	r = solve(S[::-1])
	r = list(map(lambda x: N + 1 - x, r[::-1]))
	ans = list(set(n) & set(r))
	ans.sort()
	for i in ans:
		print(i)


def main():
	import sys
	input = sys.stdin.readline
	sys.setrecursionlimit(10 ** 7)
	from collections import Counter, deque
	from itertools import combinations, permutations, accumulate, groupby, product
	from bisect import bisect_left, bisect_right
	from heapq import heapify, heappop, heappush
	import math
	(n, k, c) = map(int, input().split())
	s = input().rstrip()
	left = [0] * n
	day = 0
	temp = 0
	while day < n:
		if s[day] == 'o':
			temp += 1
			left[day] = temp
			for i in range(c):
				if day + i + 1 < n:
					left[day + i + 1] = temp
			day += c
		else:
			left[day] = temp
		day += 1
	right = [0] * n
	day = n - 1
	temp = 0
	while 0 <= day:
		if s[day] == 'o':
			temp += 1
			right[day] = temp
			for i in range(c):
				if day - i - 1 >= 0:
					right[day - i - 1] = temp
			day -= c
		else:
			right[day] = temp
		day -= 1
	res = []
	for i in range(n):
		if s[i] == 'o':
			if i - c - 1 < 0:
				pre = 0
			else:
				pre = left[i - c - 1]
			if i + c + 1 >= n:
				pos = 0
			else:
				pos = right[i + c + 1]
			if pre + pos == k - 1:
				res.append(i + 1)
	for i in range(len(res)):
		if i - 1 >= 0:
			l = res[i - 1]
		else:
			l = -1000000
		if i + 1 < len(res):
			r = res[i + 1]
		else:
			r = 10000000
		if res[i] - l > c and r - res[i] > c:
			print(res[i])

def __starting_point():
	main()
__starting_point()


import sys
sys.setrecursionlimit(10 ** 9)
MOD = 10 ** 9 + 7
(N, K, C) = map(int, input().split())
S = list(input())
mae = [-1] * N
i = 0
count = 0
while i < N and count < K:
	if S[i] == 'o':
		mae[i] = count
		count += 1
		i += C + 1
	else:
		i += 1
ushiro = [-1] * N
i = N - 1
count = 0
while i >= 0 and count < K:
	if S[i] == 'o':
		ushiro[i] = K - count - 1
		count += 1
		i -= C + 1
	else:
		i -= 1
for i in range(N):
	if mae[i] == ushiro[i] and mae[i] != -1:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input()
ne = 10 ** 6 * -1
fow = []
bac = []
for i in range(n):
	if i > ne and s[i] != 'x':
		ne = i + c
		fow.append(i)
	if len(fow) == k:
		break
ne = 10 ** 6
for i in range(n - 1, -1, -1):
	if i < ne and s[i] != 'x':
		ne = i - c
		bac.append(i)
	if len(bac) == k:
		break
bac.sort()
for (i, j) in zip(fow, bac):
	if i == j:
		print(i + 1)


(n, k, c) = map(int, input().split())
S = list(input())

def f(S):
	L = []
	on = True
	cnt = 0
	for i in range(n):
		if not on:
			if cnt == c:
				on = True
			cnt += 1
		if on and S[i] == 'o':
			on = False
			cnt = 0
			L.append(i)
			if len(L) == k:
				break
	return L
L = f(S)
R = [n - 1 - i for i in f(S[::-1])][::-1]
for i in range(k):
	if L[i] == R[i]:
		print(L[i] + 1)


(n, k, c) = list(map(int, input().split()))
s = [True if i == 'o' else False for i in input()]
front = [0] * n
back = [0] * n
count = 0
day = 0
while day < n:
	if s[day]:
		front[day] = 1
		day += c + 1
		count += 1
	else:
		day += 1
day = n - 1
while day >= 0:
	if s[day]:
		back[day] = 1
		day -= c + 1
	else:
		day -= 1
if count == k:
	for i in range(n):
		if front[i] == 1 and back[i] == 1:
			print(i + 1)


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

def greedy(A):
	ret = []
	k = i = 0
	while i < N and k < K:
		if A[i] == 'x':
			i += 1
		else:
			ret.append(i)
			k += 1
			i += C + 1
	return ret
L = greedy(S)
R = greedy(S[::-1])
R = [N - 1 - r for r in R][::-1]
for (i, l) in enumerate(L):
	if R[i] == l:
		print(l + 1)


(n, k, c) = [int(x) for x in input().split()]
s = list(input())
L = []
R = []
i = 0
while i < n:
	if s[i] == 'o':
		L.append(i)
		i += c
	i += 1
i = 0
while i < n:
	if s[n - i - 1] == 'o':
		R.append(n - i - 1)
		i += c
	i += 1
days = []
for i in range(k):
	if L[i] == R[k - i - 1]:
		days.append(L[i])
for i in range(len(days)):
	print(days[i] + 1)


(N, K, C) = map(int, input().split())
S = input()
A = [0] * N
B = [0] * N
a = 0
b = N - 1
for i in range(K):
	j = K - 1 - i
	while S[a] == 'x':
		a += 1
	while S[b] == 'x':
		b -= 1
	A[i] = a
	a += 1 + C
	B[j] = b
	b -= 1 + C
for i in range(K):
	if A[i] == B[i]:
		print(A[i] + 1)


(N, K, C) = map(int, input().split())
S = input()
left = []
right = []
(i, j) = (0, N - 1)
while len(left) <= K - 1:
	if S[i] == 'o':
		left.append(i)
		i += C + 1
	else:
		i += 1
while len(right) <= K - 1:
	if S[j] == 'o':
		right.append(j)
		j -= C + 1
	else:
		j -= 1
right.sort()
for n in range(K):
	if left[n] == right[n]:
		print(left[n] + 1)


line1 = input().split()
n = int(line1[0])
k = int(line1[1])
c = int(line1[2])
s = list(input())
l = [s.index('o') + 1]
r = [len(s) - s[::-1].index('o')]
for i in range(1, k):
	j = l[i - 1]
	m = r[i - 1]
	while j - l[i - 1] <= c or s[j - 1] != 'o':
		j += 1
	while r[i - 1] - m <= c or s[m - 1] != 'o':
		m -= 1
	r.append(m)
	l.append(j)
r = r[::-1]
for i in range(len(r)):
	if r[i] == l[i]:
		print(r[i])


(n, k, c) = map(int, input().split())
s = input()
l = [''] * n
r = [''] * n
x = 1
y = 0
for i in range(n):
	y -= 1
	if s[i] == 'o' and y < 0:
		l[i] = x
		x += 1
		y = c
	if x > k:
		x -= 1
		break
y = 0
for i in range(n)[::-1]:
	y -= 1
	if s[i] == 'o' and y < 0:
		r[i] = x
		x -= 1
		y = c
	if x <= 0:
		break
for i in range(n):
	if l[i] and l[i] == r[i]:
		print(i + 1)


(N, K, C) = map(int, input().split())
S = input()
L = [0] * K
i = 0
x = 0
while i < K and x < N:
	if S[x] == 'o':
		L[i] = x
		i += 1
		x += C + 1
	else:
		x += 1
R = [0] * K
i = K - 1
x = N - 1
while i >= 0 and x >= 0:
	if S[x] == 'o':
		R[i] = x
		i -= 1
		x -= C + 1
	else:
		x -= 1
ans = []
for i in range(K):
	if L[i] == R[i]:
		ans.append(L[i])
for a in ans:
	print(a + 1)


(N, K, C) = map(int, input().split())
S = input()
L = []
R = []
holiday = 0
for i in range(N):
	if holiday:
		holiday -= 1
	elif S[i] == 'o':
		L.append(i)
		holiday = C
holiday = 0
for i in range(N - 1, -1, -1):
	if holiday:
		holiday -= 1
	elif S[i] == 'o':
		R.append(i)
		holiday = C
R = R[::-1]
out = set(L) and set(R)
if len(L) == K:
	for (l, r) in zip(L, R):
		if l == r:
			print(l + 1)


from bisect import *
from collections import *
(N, K, C) = map(int, input().split())
S = input()
T = [i for (i, x) in enumerate(S, 1) if x == 'o']
sl = deque()
sr = deque()
i = 0
while len(sl) < K:
	sl.append(T[i])
	i = bisect_right(T, T[i] + C)
i = len(T) - 1
while len(sr) < K:
	sr.appendleft(T[i])
	i = bisect_left(T, T[i] - C) - 1
for (x, y) in zip(sl, sr):
	if x == y:
		print(x)


(n, k, c) = map(int, input().split())
s = input()
l = [0 for i in range(n)]
r = [-1 for i in range(n)]
a = 1
b = -1
for i in range(n):
	if s[i] == 'o' and b < i:
		l[i] = a
		a += 1
		b = i + c
		if a > k:
			break
a = k
b = n
for i in range(n):
	if s[-i - 1] == 'o' and b > n - i - 1:
		r[-i - 1] = a
		a -= 1
		b = n - i - 1 - c
		if a < 1:
			break
for i in range(n):
	if l[i] == r[i]:
		print(i + 1)


(N, K, C) = map(int, input().split())
S = input()
ls = []
nex = -1
for i in range(N):
	if S[i] == 'o' and i > nex:
		ls.append(i + 1)
		nex = i + C
	if len(ls) == K:
		break
rs = []
nex = N
for i in reversed(range(N)):
	if S[i] == 'o' and i < nex:
		rs.append(i + 1)
		nex = i - C
	if len(rs) == K:
		break
for (l, r) in zip(ls, rs[::-1]):
	if l == r:
		print(l)


(N, K, C) = map(int, input().split())
S = input()
(L, R) = ([], [])
i = 0
while len(L) < K:
	if S[i] == 'o':
		L.append(i)
		i += C + 1
	else:
		i += 1
i = N - 1
while len(R) < K:
	if S[i] == 'o':
		R.append(i)
		i -= C + 1
	else:
		i -= 1
R = R[::-1]
for i in range(K):
	if L[i] == R[i]:
		print(L[i] + 1)


(n, k, c) = map(int, input().split())
s = list(input())
ll = []
rr = []
day = 0
while day < n:
	if s[day] == 'o':
		ll.append(day)
		day += c + 1
	else:
		day += 1
	if len(ll) >= k:
		break
day = n - 1
while 0 <= day:
	if s[day] == 'o':
		rr.append(day)
		day -= c + 1
	else:
		day -= 1
	if len(rr) >= k:
		break
rr = rr[::-1]
for i in range(k):
	if ll[i] == rr[i]:
		print(ll[i] + 1)


(N, K, C) = map(int, input().split())
S = input()
L = []
R = []
count_L = C
count_R = C
for i in range(N):
	if S[i] == 'o' and count_L >= C:
		count_L = 0
		L.append(i)
	else:
		count_L += 1
	if S[N - i - 1] == 'o' and count_R >= C:
		count_R = 0
		R.append(N - i - 1)
	else:
		count_R += 1
	if len(L) >= K and len(R) >= K:
		break
for (l, r) in zip(L, R[::-1]):
	if l == r:
		print(l + 1)


def ris():
	return map(int, input().split())

def rs():
	return input()
(n, k, c) = ris()
s = rs()
i = 0
rk = k
l1 = []
while rk:
	if s[i] == 'o':
		l1.append(i)
		rk -= 1
		i += c
	i += 1
i = n - 1
rk = k
l2 = []
while rk:
	if s[i] == 'o':
		l2.append(i)
		rk -= 1
		i -= c
	i -= 1
for (i1, i2) in zip(l1, reversed(l2)):
	if i1 == i2:
		print(i1 + 1)


(n, k, c) = map(int, input().split())
s = input()
l = [-1] * k
r = [-1] * k
cnt = 0
last = -float('inf')
for i in range(n):
	if last + c < i and s[i] == 'o':
		last = i
		l[cnt] = i
		cnt += 1
		if cnt == k:
			break
cnt = 0
last = float('inf')
for i in reversed(range(n)):
	if i < last - c and s[i] == 'o':
		last = i
		r[cnt] = i
		cnt += 1
		if cnt == k:
			break
r = list(reversed(r))
for i in range(k):
	if l[i] == r[i]:
		print(l[i] + 1)


(N, K, C) = [int(_) for _ in input().split()]
S = input()
cand = [i + 1 for (i, s) in enumerate(S) if s == 'o']
F = [[cand[0]]]
for c in cand[1:]:
	if c - F[-1][0] > C:
		F += [[]]
	F[-1] += [c]
if len(F) > K:
	return
B = [[cand[-1]]]
for c in cand[-2::-1]:
	if B[-1][0] - c > C:
		B[-1] = B[-1][::-1]
		B += [[]]
	B[-1] += [c]
B = B[::-1]
B[0] = B[0][::-1]
ans = []
for (f, b) in zip(F, B):
	if len(f) == 1 or f[1] not in b:
		ans += [f[0]]
print('\n'.join(map(str, ans)))


(n, k, c) = map(int, input().split())
s = 'x' + input()
l = []
i = 1
while len(l) < k:
	if s[i] == 'o':
		l.append(i)
		i += c + 1
	else:
		i += 1
r = []
i = n
while len(r) < k:
	if s[i] == 'o':
		r.append(i)
		i -= c + 1
	else:
		i -= 1
r = r[::-1]
for i in range(len(l)):
	if l[i] == r[i]:
		print(l[i])


(N, K, C) = map(int, input().split())
S = ' ' + input()
L = [0 for _ in range(K + 1)]
R = [0 for _ in range(K + 1)]
p = 1
i = 1
while i < N + 1 and p <= K:
	if S[i] == 'o':
		L[p] = i
		i += C
		p += 1
	i += 1
p = K
i = N
while i > 0 and p > 0:
	if S[i] == 'o':
		R[p] = i
		i -= C
		p -= 1
	i -= 1
for i in range(1, K + 1):
	if L[i] == R[i]:
		print(L[i])


from collections import deque
(N, K, C) = map(int, input().split())
S = input()
fastest = deque([])
latest = deque([])
date = 1
for work_days in range(K):
	while S[date - 1] == 'x':
		date += 1
	fastest.append(date)
	date += C + 1
date = 1
for work_days in range(K):
	while S[-date] == 'x':
		date += 1
	latest.append(N - (date - 1))
	date += C + 1
for i in range(K):
	f = fastest.popleft()
	l = latest.pop()
	if f == l:
		print(f)


(n, k, c) = map(int, input().split())
s = input()
l = []
i = 0
num = 0
while num < k:
	if s[i] == 'o':
		l.append(i)
		num += 1
		i += c + 1
	else:
		i += 1
r = []
num = 0
i = n - 1
while num < k:
	if s[i] == 'o':
		r.append(i)
		num += 1
		i -= c + 1
	else:
		i -= 1
r.reverse()
for i in range(k):
	if l[i] == r[i]:
		print(l[i] + 1)


(N, K, C) = map(int, input().split())
S = str(input())
x = 0
L = [-1] * K
p = 0
while x < N and p != K:
	if S[x] == 'o':
		L[p] = x
		p += 1
		x += C + 1
	else:
		x += 1
y = N - 1
R = [-1] * K
q = 0
while y > -1 and q != K:
	if S[y] == 'o':
		R[q] = y
		q += 1
		y -= C + 1
	else:
		y -= 1
for i in range(K):
	if L[i] == R[K - i - 1]:
		print(L[i] + 1)


def do_solve(n, k, c, s):
	dp = [0 for i in range(n)]
	for i in range(n):
		dp[i] = 1 if s[i] == 'o' else 0
		if i - c - 1 >= 0:
			dp[i] = max(dp[i], dp[i - c - 1] + 1 if s[i] == 'o' else 0)
		if i - 1 >= 0:
			dp[i] = max(dp[i], dp[i - 1])
	return dp

def solve(n, k, c, s):
	dp1 = do_solve(n, k, c, s)
	dp2 = do_solve(n, k, c, s[::-1])[::-1]
	res = []
	for i in range(n):
		if s[i] == 'x':
			continue
		l = dp1[i - 1] if i - 1 >= 0 else 0
		r = dp2[i + 1] if i + 1 < n else 0
		if l + r == k - 1:
			res.append(i + 1)
	return res
assert solve(16, 4, 3, 'ooxxoxoxxxoxoxxo') == [11, 16]
assert solve(11, 3, 2, 'ooxxxoxxxoo') == [6]
assert solve(5, 1, 0, 'ooooo') == []
assert solve(5, 2, 3, 'ooxoo') == [1, 5]
(n, k, c) = list(map(int, input().split()))
s = input().strip()
for num in solve(n, k, c, s):
	print(num)


(n, k, c) = map(int, input().split())
s = input()
l = [0] * k
r = [0] * k
ld = 0
rd = n - 1
for i in range(k):
	j = k - 1 - i
	while s[ld] == 'x':
		ld += 1
	while s[rd] == 'x':
		rd -= 1
	l[i] = ld
	ld += 1 + c
	r[j] = rd
	rd -= 1 + c
for i in range(k):
	if l[i] == r[i]:
		print(l[i] + 1)


(n, k, c) = list(map(int, input().split()))
s = input()
left = [k + 1] * n
right = [k + 1] * n
(l, r) = (1, 1)
i = 0
while i < n:
	if s[i] == 'o':
		left[i] = l
		l += 1
		i += c
	i += 1
i = 1
while i < n + 1:
	if s[-i] == 'o':
		right[-i] = r
		r += 1
		i += c
	i += 1
for i in range(n):
	if left[i] + right[i] == k + 1:
		print(i + 1)


(N, K, C) = map(int, input().split())
S = input()
T = [n for (n, v) in enumerate(S) if v == 'o']
(a, b) = ([T[0]], [T[-1]])
for i in range(len(T)):
	if len(a) != K:
		if T[i] - a[-1] > C:
			a.append(T[i])
	if len(b) != K:
		if b[-1] - T[-i - 1] > C:
			b.append(T[-i - 1])
for i in range(K):
	if a[i] == b[-i - 1]:
		print(a[i] + 1)


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

def solve(S):
	A = []
	for (i, s) in enumerate(S):
		if s == 'o' and (not A or A[-1] + C < i):
			A.append(i)
		if len(A) >= K:
			break
	return A
L = solve(S)
R = reversed(solve(reversed(S)))
print('\n'.join((str(l + 1) for (l, r) in zip(L, R) if l == N - r - 1)))


MI = lambda : map(int, input().split())
(n, k, c) = MI()
s = input()
left = []
right = []
i = 0
while 0 <= i <= n - 1:
	if s[i] == 'o':
		left += (i,)
		i += c + 1
	else:
		i += 1
j = n - 1
while 0 <= j <= n - 1:
	if s[j] == 'o':
		right += (j,)
		j -= c + 1
	else:
		j -= 1
ans = list(set(left) & set(right))
if len(ans) > k:
	print()
else:
	for q in sorted(ans):
		print(q + 1)


def main():
	(n, k, c) = (int(i) for i in input().split())
	s = input()
	if k > sum((1 for c in s if c == 'o')):
		return
	latest = [None] * k
	earliest = [None] * k
	earliest[0] = s.index('o')
	for i in range(1, k):
		try:
			earliest[i] = s.index('o', earliest[i - 1] + c + 1)
		except ValueError:
			return
	latest[-1] = s.rindex('o')
	for i in reversed(list(range(k - 1))):
		try:
			latest[i] = s.rindex('o', 0, latest[i + 1] - c)
		except ValueError:
			return
	bound_days = [earliest[i] + 1 for i in range(k) if earliest[i] == latest[i]]
	for (e, l) in zip(earliest, latest):
		if e == l:
			print(e + 1)
main()


def main():
	import sys
	input = sys.stdin.readline
	sys.setrecursionlimit(10 ** 7)
	from collections import Counter, deque
	from itertools import combinations, permutations, accumulate, groupby, product
	from bisect import bisect_left, bisect_right
	from heapq import heapify, heappop, heappush
	import math
	(n, k, c) = map(int, input().split())
	s = input().rstrip()
	left = [0] * n
	day = 0
	temp = 1
	while day < n:
		if s[day] == 'o':
			left[day] = temp
			temp += 1
			day += c
		day += 1
	right = [0] * n
	day = n - 1
	temp = k
	while 0 <= day:
		if s[day] == 'o':
			right[day] = temp
			temp -= 1
			day -= c
		day -= 1
	for i in range(n):
		if left[i] == right[i] and left[i] != 0:
			print(i + 1)

def __starting_point():
	main()
__starting_point()


(n, k, c) = map(int, input().split())
s = input()
left = [-1 for _ in range(k)]
right = [-1 for _ in range(k)]
bef = -10 ** 10
cnt = 0
for (i, ss) in enumerate(s):
	if ss == 'o' and i - bef > c:
		if cnt == k:
			return
		left[cnt] = i
		bef = i
		cnt += 1
cnt = 0
bef = -10 ** 10
for (i, ss) in enumerate(s[::-1]):
	if ss == 'o' and i - bef > c:
		if cnt == k:
			return
		right[k - 1 - cnt] = n - 1 - i
		bef = i
		cnt += 1
for (ll, rr) in zip(left, right):
	if ll == rr:
		print(ll + 1)


(n, k, c) = map(int, input().split())
s = list(input())
forward = []
backward = []
i = 0
while i < len(s) and len(forward) < k:
	if s[i] == 'x':
		i += 1
		continue
	forward.append(i)
	i += c + 1
i = len(s) - 1
while i > -1 and len(backward) < k:
	if s[i] == 'x':
		i -= 1
		continue
	backward.append(i)
	i -= c
	i -= 1
for i in range(len(forward)):
	if forward[i] == backward[len(backward) - i - 1]:
		print(forward[i] + 1)


def resolve():
	(N, K, C) = map(int, input().split())
	S = input()
	dpt1 = [0] * K
	dpt2 = [0] * K
	pnt = 0
	for i in range(K):
		while S[pnt] == 'x':
			pnt += 1
		dpt1[i] = pnt
		pnt += C + 1
	pnt = N - 1
	for i in range(K - 1, -1, -1):
		while S[pnt] == 'x':
			pnt -= 1
		dpt2[i] = pnt
		pnt -= C + 1
	for (a, b) in zip(dpt1, dpt2):
		if a == b:
			print(a + 1)
resolve()


(n, k, c) = map(int, input().split())
S = input()
DP1 = []
DP2 = []
day = 0
work = 0
while day < n and work < k:
	if S[day] == 'o':
		DP1.append(day)
		day += c + 1
		work += 1
	else:
		day += 1
day = n - 1
work = 0
while day >= 0 and work < k:
	if S[day] == 'o':
		DP2.append(day)
		day -= c + 1
		work += 1
	else:
		day -= 1
for (day1, day2) in zip(DP1, DP2[::-1]):
	if day1 == day2:
		print(day1 + 1)


def main():
	(N, K, C) = list(map(int, input().split(' ')))
	S = input()
	(R, L) = ([0 for _ in range(K)], [0 for _ in range(K)])
	(index, cnt) = (0, 0)
	while cnt < K and index <= N - 1:
		if S[index] == 'o':
			R[cnt] = index
			index += C + 1
			cnt += 1
		else:
			index += 1
	S = S[::-1]
	(index, cnt) = (0, 0)
	while cnt < K and index <= N - 1:
		if S[index] == 'o':
			L[K - 1 - cnt] = N - 1 - index
			index += C + 1
			cnt += 1
		else:
			index += 1
	ans = [R[k] + 1 for k in range(K) if R[k] == L[k]]
	if len(ans) == 0:
		print('')
	else:
		for a in ans:
			print(a)

def __starting_point():
	main()
__starting_point()


import sys
sr = lambda : sys.stdin.readline().rstrip()
ir = lambda : int(sr())
lr = lambda : list(map(int, sr().split()))
(N, K, C) = lr()
S = sr()
left = []
right = []

def work(S):
	ret = []
	cur = 0
	count = 0
	while count < K:
		if S[cur] == 'o':
			count += 1
			ret.append(cur)
			cur += C + 1
		else:
			cur += 1
	return ret
left = work(S)
right = work(S[::-1])
right = [N - 1 - x for x in right]
right.reverse()
answer = []
for (l, r) in zip(left, right):
	if l == r:
		answer.append(str(l + 1))
print('\n'.join(answer))


(N, K, C) = map(int, input().split())
S = input()
dp0 = [0] * K
dp1 = [0] * K
step = C
cnt = 0
for i in range(N):
	if step >= C and S[i] == 'o':
		dp0[cnt] = i
		cnt += 1
		if cnt == K:
			break
		step = 0
	else:
		step += 1
step = C
cnt = K - 1
for i in range(N - 1, -1, -1):
	if step >= C and S[i] == 'o':
		dp1[cnt] = i
		cnt -= 1
		if cnt == -1:
			break
		step = 0
	else:
		step += 1
ans = 0
for (i, (a, b)) in enumerate(zip(dp0, dp1)):
	if a == b:
		print(a + 1)


(N, K, C) = map(int, input().split())
S = input()[::-1]
Top = []
Bottom = []
yasumi = 0
ans = []
k = K
for i in range(N):
	if yasumi == 0 and S[i] == 'o' and (k > 0):
		Bottom.append(N - i)
		yasumi += C
		k -= 1
	elif yasumi > 0:
		yasumi -= 1
S_ = S[::-1]
Bottom.sort()
j = -1
yasumi = 0
for i in range(N):
	if yasumi == 0 and S_[i] == 'o' and (K > 0):
		j += 1
		yasumi += C
		K -= 1
		if j >= len(Bottom):
			break
		elif Bottom[j] == i + 1:
			ans.append(i + 1)
	elif yasumi > 0:
		yasumi -= 1
for i in ans:
	print(i)


(N, K, C) = map(int, input().split())
S = input()
X = [0] * N
Y = [0] * N
i = 0
c = 0
while i < N:
	if S[i] == 'o':
		c += 1
		X[i] = 1
		i += C + 1
	else:
		i += 1
if c > K:
	exit()
i = N - 1
while i >= 0:
	if S[i] == 'o':
		Y[i] = 1
		i -= C + 1
	else:
		i -= 1
for i in range(N):
	if X[i] and Y[i]:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input() + '?'
(l, r) = ([], [])
cur = 0
count = 0
while cur <= n:
	if s[cur] == 'o':
		count += 1
		l.append((count, cur + 1))
		cur += c
	cur += 1
cur = n
count = k
while cur >= 0:
	if s[cur] == 'o':
		r.append((count, cur + 1))
		count -= 1
		cur -= c
	cur -= 1
ans = (i[1] for i in set(l) & set(r))
for i in sorted(ans):
	print(i)


I = lambda : list(map(int, input().split()))
(n, k, m) = I()
p = 0
l = k
s = input()
x = []
y = []
for i in range(n):
	if s[i] == 'o' and p == 0:
		k -= 1
		x.append(i + 1)
		if k == 0:
			break
		p = m
	else:
		p -= 1
		p = max(0, p)
p = 0
k = l
for i in range(n - 1, -1, -1):
	if s[i] == 'o' and p == 0:
		k -= 1
		y.append(i + 1)
		if k == 0:
			break
		p = m
	else:
		p -= 1
		p = max(0, p)
y = y[::-1]
for i in range(len(x)):
	if x[i] == y[i]:
		print(x[i])


(N, K, C) = map(int, input().split())
S = input().rstrip()
wc = 0
arr = ['x'] * N
arr2 = ['x'] * N
cur = 0
while cur < N:
	if S[cur] == 'x':
		cur += 1
		continue
	wc += 1
	arr[cur] = wc
	cur += C + 1
cur = N - 1
wc = K + 1
while cur >= 0:
	if S[cur] == 'x':
		cur -= 1
		continue
	wc -= 1
	arr2[cur] = wc
	cur -= C + 1
for (i, (a, b)) in enumerate(zip(arr, arr2)):
	if a == b and a != 'x':
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input()
l = [0] * k
r = [0] * k
rest = 0
work = 0
for i in range(n):
	rest = max(rest - 1, 0)
	if s[i] == 'o' and rest == 0 and (work < k):
		l[work] = i + 1
		work += 1
		rest += c + 1
rest = 0
work = 0
for i in range(n - 1, -1, -1):
	rest = max(rest - 1, 0)
	if s[i] == 'o' and rest == 0 and (work < k):
		r[k - work - 1] = i + 1
		work += 1
		rest += c + 1
for i in range(k):
	if l[i] == r[i]:
		print(l[i])


import sys
(N, K, C) = map(int, input().split())
S = input()
S_R = S[::-1]
L = []
R = []
loop = 0
cnt = 0
while loop < N:
	if S[loop] == 'o':
		L.append(loop + 1)
		cnt += 1
		loop += C + 1
	else:
		loop += 1
	if cnt > K:
		break
if cnt < K:
	exit()
loop = 0
cnt = 0
while loop < N:
	if S_R[loop] == 'o':
		R.append(N - loop)
		cnt += 1
		loop += C + 1
	else:
		loop += 1
	if cnt > K:
		break
if cnt < K:
	exit()
R = R[::-1]
for i in range(K):
	if L[i] == R[i]:
		print(L[i])


(N, K, C) = map(int, input().split())
S = str(input())
works1 = 0
works2 = 0
l1 = []
l2 = []
i = 0
while i < N and works1 < K:
	if S[i] == 'o':
		l1.append(i + 1)
		i = i + C + 1
		works1 += 1
	else:
		i = i + 1
i = N - 1
while i > -1 and works2 < K:
	if S[i] == 'o':
		l2.append(i + 1)
		i = i - C - 1
		works2 = works2 + 1
	else:
		i = i - 1
for i in range(len(l1)):
	if l1[i] == l2[-i - 1]:
		print(l1[i])


(n, k, c) = map(int, input().split())
s = [i == 'o' for i in list(input())]
i = 0
cnt = 0
l = [0] * n
r = [0] * n
while i < n:
	if s[i]:
		cnt += 1
		for j in range(i, c + i + 1):
			if j < n:
				l[j] = cnt
		i += c + 1
	else:
		l[i] = cnt
		i += 1
i = n - 1
cnt = 0
while i >= 0:
	if s[i]:
		cnt += 1
		for j in range(i, i - 1 - c, -1):
			if j >= 0:
				r[j] = cnt
		i -= c + 1
	else:
		r[i] = cnt
		i -= 1
r.append(0)
if r[1] < k:
	print(1)
for i in range(1, n - 1):
	if not s[i]:
		continue
	if l[i - 1] + r[i + 1] < k:
		print(i + 1)
if l[n - 2] < k:
	print(n)


def greedy_count(s):
	global n, c
	res = [0] * (n + 2)
	t = 0
	while t < n:
		if s[t] == 'o':
			res[t + 1] = 1
			t += c
		t += 1
	for i in range(n + 1):
		res[i + 1] += res[i]
	return res
(n, k, c) = map(int, input().split())
s = input()
left = greedy_count(s)
right = greedy_count(s[::-1])[::-1]
for i in range(1, n + 1):
	if left[i - 1] + right[i + 1] < k:
		print(i)


(n, k, c) = map(int, input().split())
s = input()
asc = []
des = []
count = 0
while count < n:
	if s[count] == 'o':
		asc.append(count)
		count += c + 1
	else:
		count += 1
asc = asc[0:k]
count = n - 1
while count >= 0:
	if s[count] == 'o':
		des.append(count)
		count -= c + 1
	else:
		count -= 1
des = des[0:k]
des.reverse()
for i in range(len(asc)):
	if asc[i] == des[i]:
		print(asc[i] + 1)


(N, K, C) = map(int, input().split())
S = input()
mae = [0] * (2 * N)
ato = [0] * (2 * N)
cnt = 0
n = 0 - N - 100
for i in range(N):
	if i - n <= C:
		continue
	if S[i] == 'o':
		mae[cnt] = i
		cnt += 1
		n = i
cnt = K - 1
n = 2 * N + 100
for i in range(N - 1, -1, -1):
	if n - i <= C:
		continue
	if S[i] == 'o':
		ato[cnt] = i
		cnt -= 1
		n = i
for i in range(K):
	if mae[i] == ato[i]:
		print(mae[i] + 1)


def work(S, k, c):
	tir = 0
	cnt = 0
	for (i, s) in enumerate(S):
		if s == 'o' and tir == 0 and (cnt < k):
			yield i
			tir = c
			cnt += 1
		else:
			tir = max(tir - 1, 0)
(n, k, c) = map(int, input().split())
S = list(input())
L = [i + 1 for i in work(S, k, c)]
R = [n - i for i in work(S[::-1], k, c)][::-1]
for (l, r) in zip(L, R):
	if l == r:
		print(l)


(n, k, c) = map(int, input().split())
s = list(input())
L = []
R = []
i = -1
j = n
for ki in range(k):
	while i < n:
		i += 1
		if s[i] == 'o':
			L += [i]
			i += c
			break
for ki in range(k):
	while 0 <= j:
		j -= 1
		if s[j] == 'o':
			R += [j]
			j -= c
			break
for i in range(k):
	if L[i] == R[-i - 1]:
		print(L[i] + 1)


(n, k, c) = map(int, input().split())
s = input()
dpl = [0 for i in range(n + 1)]
dpr = [0 for i in range(n + 1)]
for i in range(n):
	dpl[i + 1] = dpl[i] if s[i] == 'x' else dpl[i - c] + 1 if i - c >= 0 else 1
for i in range(n, 0, -1):
	dpr[i - 1] = dpr[i] if s[i - 1] == 'x' else dpr[i + c] + 1 if i + c < n else 1
for i in range(1, n + 1):
	if dpl[i - 1] + dpr[i] < k:
		print(i)


(n, k, c) = list(map(int, input().split()))
s = input()
l = [0] * k
r = [0] * k
p = 0
i = 0
while i < n:
	if s[i] == 'o':
		l[p] = i
		p += 1
		if p >= k:
			break
		i += c
	i += 1
p = k - 1
i = n - 1
while i >= 0:
	if s[i] == 'o':
		r[p] = i
		p -= 1
		if p < 0:
			break
		i -= c
	i -= 1
for i in range(k):
	if l[i] == r[i]:
		print(l[i] + 1)


def main():
	(n, k, c) = list(map(int, input().split()))
	s = input()
	schedule = [w == 'o' for w in s]
	left = []
	l_day = 0
	right = []
	r_day = n - 1
	while len(left) < k:
		if schedule[l_day]:
			left.append(l_day)
			l_day += c
		l_day += 1
	while len(right) < k:
		if schedule[r_day]:
			right.append(r_day)
			r_day -= c
		r_day -= 1
	right.reverse()
	for i in range(k):
		if left[i] == right[i]:
			print(left[i] + 1)

def __starting_point():
	main()
__starting_point()


import sys
(n, k, c) = map(int, input().split())
s = input()
count = 0
i = 0
ansleft = set()
while i < n:
	if s[i] == 'o':
		ansleft.add(i + 1)
		i += c + 1
		count += 1
	else:
		i += 1
if count >= k + 1:
	sys.exit()
ansright = set()
s = s[::-1]
i = 0
while i < n:
	if s[i] == 'o':
		ansright.add(n - i)
		i += c + 1
	else:
		i += 1
ans = ansright & ansleft
ans = list(ans)
ans.sort()
for i in ans:
	print(i)


(n, k, c) = map(int, input().split())
s = input()
leftmost = []
cursor = 0
for _ in range(k):
	while s[cursor] == 'x':
		cursor += 1
	leftmost.append(cursor)
	cursor += c + 1
rightmost = []
cursor = n - 1
for _ in range(k):
	while s[cursor] == 'x':
		cursor -= 1
	rightmost.append(cursor)
	cursor -= c + 1
rightmost.reverse()
for (l, r) in zip(leftmost, rightmost):
	if l == r:
		print(l + 1)


(N, K, C) = map(int, input().split())
S = input()
maekara = []
i = 1
cnt = 0
while i <= N and cnt < K:
	if S[i - 1] == 'o':
		maekara.append(i)
		i += C + 1
		cnt += 1
	else:
		i += 1
usirokara = []
j = N
cnt = 0
while j >= 1 and cnt < K:
	if S[j - 1] == 'o':
		usirokara.append(j)
		j -= C + 1
		cnt += 1
	else:
		j -= 1
usirokara = usirokara[::-1]
for i in range(K):
	if maekara[i] == usirokara[i]:
		print(maekara[i])


import sys
readline = sys.stdin.readline
(N, K, C) = map(int, readline().split())
S = readline().rstrip()
fast = [0] * K
ind = 0
cnt = 0
while cnt < K:
	if S[ind] == 'o':
		fast[cnt] = ind
		cnt += 1
		ind += C + 1
	else:
		ind += 1
late = [0] * K
ind = len(S) - 1
cnt = K - 1
while 0 <= cnt:
	if S[ind] == 'o':
		late[cnt] = ind
		cnt -= 1
		ind -= C + 1
	else:
		ind -= 1
ans = []
for i in range(K):
	if fast[i] == late[i]:
		ans += [fast[i] + 1]
for a in ans:
	print(a)


(N, K, C) = map(int, input().split())
S = list(input())
A = [0] * N
B = [0] * N
i = 0
a = 1
while i < N:
	if S[i] == 'o':
		A[i] = a
		a += 1
		i += C + 1
	else:
		i += 1
j = N - 1
b = K
while j >= 0:
	if S[j] == 'o':
		B[j] = b
		b -= 1
		j -= C + 1
	else:
		j -= 1
for i in range(N):
	if A[i] == B[i] and A[i] != 0:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input()
s2 = s
s += 'x' * c
s2 = 'x' * c + s2
k2 = k
kans = k
left = []
i = 0
while i < n:
	if s[i] == 'o':
		left.append(i + 1)
		i += c
	i += 1
right = []
i = len(s2) - 1
while i >= c:
	if k2 == 0:
		break
	if s2[i] == 'o':
		right.append(i + 1 - c)
		k2 -= 1
		i -= c
	i -= 1
if len(left) == kans:
	ans = sorted(list(set(left) & set(right)))
	for i in ans:
		print(i)
else:
	exit()


(N, K, C) = map(int, input().split())
S = list(input())
A = list()
B = list()
i = 0
num = 0
while num < K:
	if S[i] == 'o':
		A.append(i)
		num += 1
		i += C
	i += 1
i = len(S) - 1
num = 0
while num < K:
	if S[i] == 'o':
		B.append(i)
		num += 1
		i -= C
	i -= 1
B.sort()
for (i, j) in zip(A, B):
	if i == j:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input()
forth = set()
reverse = set()
cur = 0
tired = 0
for i in range(n):
	if s[i] == 'o':
		if tired == 0:
			cur += 1
			tired = c
			forth.add(i + 1)
		elif tired > 0:
			tired -= 1
	elif tired > 0:
		tired -= 1
if cur > k:
	return
s = s[::-1]
cur = 0
tired = 0
for i in range(n):
	if s[i] == 'o':
		if tired == 0:
			cur += 1
			tired = c
			reverse.add(n - i)
		elif tired > 0:
			tired -= 1
	elif tired > 0:
		tired -= 1
ans = forth & reverse
ans = list(ans)
ans.sort()
for i in ans:
	print(i)


(n, k, c) = map(int, input().split())
S = [1 if a == 'o' else 0 for a in input()]
count = 0
X = [0] * n
Y = [0] * n
i = 0
while i < n:
	if S[i]:
		count += 1
		X[i] = 1
		i += c + 1
	else:
		i += 1
if count > k:
	exit()
i = n - 1
while i >= 0:
	if S[i]:
		Y[i] = 1
		i -= c + 1
	else:
		i -= 1
for i in range(0, n):
	if X[i] and Y[i]:
		print(i + 1)


from collections import deque
import copy
(N, K, C) = list(map(int, input().split()))
S = input().split()[0]
TW = 0
q = []
for s in range(len(S)):
	if S[s] == 'o':
		q.append(s + 1)
WD = []
LD = 0
for s in q:
	if len(WD) > K:
		break
	if LD == 0:
		WD.append(s)
		LD = s
	elif s - LD <= C:
		continue
	else:
		WD.append(s)
		LD = s
WDR = []
LD = 0
q.reverse()
for s in q:
	if len(WDR) > K:
		break
	if LD == 0:
		WDR.append(s)
		LD = s
	elif LD - s <= C:
		continue
	else:
		WDR.append(s)
		LD = s
for d in range(len(WD)):
	if WD[d] == WDR[len(WD) - d - 1]:
		print(WD[d])


(N, K, C) = map(int, input().split())
S = input()
L = []
R = []
point = 0
for i in range(K):
	while S[point] != 'o':
		point += 1
	L.append(point)
	point += C + 1
point = N - 1
for i in range(K):
	while S[point] != 'o':
		point -= 1
	R.append(point)
	point -= C + 1
R = sorted(R)
for i in range(K):
	if L[i] == R[i]:
		print(L[i] + 1)


(n, k, c) = map(int, input().split())
s = input()
l = []
next_workable = 0
for i in range(n):
	if next_workable <= i and s[i] == 'o':
		l.append(i)
		next_workable = i + c + 1
r = []
next_workable = n - 1
for i in range(n - 1, -1, -1):
	if i <= next_workable and s[i] == 'o':
		r.append(i)
		next_workable = i - c - 1
if len(l) > k:
	exit()
for i in range(k):
	if l[i] == r[-1 - i]:
		print(l[i] + 1)


(N, K, C) = map(int, input().split())
S = input()
fastest = []
latest = []
date = 1
for work_days in range(K):
	while S[date - 1] == 'x':
		date += 1
	fastest.append(date)
	date += C + 1
date = 1
for work_days in range(K):
	while S[-date] == 'x':
		date += 1
	latest.append(N - (date - 1))
	date += C + 1
for i in range(K):
	if fastest[i] == latest[-(i + 1)]:
		print(fastest[i])


(n, k, c) = map(int, input().split())
s = '?' + input()
fwd = set()
now = 1
while now <= n:
	if s[now] == 'o':
		fwd.add(now)
		now += c + 1
	else:
		now += 1
bwd = set()
now = n
while now >= 1:
	if s[now] == 'o':
		bwd.add(now)
		now -= c + 1
	else:
		now -= 1
if len(fwd) == k:
	print(*sorted(list(fwd & bwd)), sep='\n')
else:
	exit()


def debug(arg):
	if __debug__:
		pass
	else:
		import sys
		print(arg, file=sys.stderr)

def main():
	(N, K, C) = map(int, input().split())
	S = dict(enumerate(str(input()), 1))
	sr = list((k for (k, v) in S.items() if v == 'o'))
	sl = list(reversed(sr.copy()))
	debug(sr)
	debug(sl)
	l = [sl.pop()]
	r = [sr.pop()]
	for x in range(1, K):
		while True:
			ll = sl.pop()
			if ll > l[x - 1] + C:
				l.append(ll)
				break
		while True:
			rr = sr.pop()
			if rr < r[x - 1] - C:
				r.append(rr)
				break
	debug(r)
	debug(l)
	for (ll, rr) in zip(l, sorted(r)):
		if ll == rr:
			print(ll)

def __starting_point():
	main()
__starting_point()


(N, K, C) = list(map(int, input().split()))
S = input()
s = []
count = 0
for i in range(N):
	if len(s) == K:
		break
	if count == 0:
		if S[i] == 'x':
			continue
		else:
			count = C
			s.append(i + 1)
	else:
		count -= 1
s2 = []
count = 0
for i in range(N - 1, -1, -1):
	if len(s2) == K:
		break
	if count == 0:
		if S[i] == 'x':
			continue
		else:
			s2.append(i + 1)
			count = C
	else:
		count -= 1
for (a, b) in zip(s, s2[::-1]):
	if a == b:
		print(a)


(N, K, C) = map(int, input().split())
S = input()
day = []
for i in range(len(S)):
	if S[i] == 'o':
		day.append(i + 1)
E = [day[0]]
cur = day[0]
for i in range(1, len(day)):
	if day[i] >= cur + C + 1:
		cur = day[i]
		E.append(cur)
F = [day[len(day) - 1]]
cur = day[len(day) - 1]
for i in range(len(day) - 1, -1, -1):
	if day[i] <= cur - C - 1:
		cur = day[i]
		F.append(cur)
if len(E) > K:
	while len(E) > K:
		E.pop()
if len(F) > K:
	while len(F) > K:
		F.pop()
F.reverse()
for i in range(K):
	if E[i] == F[i]:
		print(E[i])


(n, k, c) = map(int, input().split())
s = list(input())
for i in range(len(s)):
	if s[i] == 'o':
		s[i] = True
	else:
		s[i] = False
i = 0
work1 = []
while len(work1) < k:
	if s[i]:
		work1.append(i)
		i += c + 1
	else:
		i += 1
i = n - 1
work2 = []
while len(work2) < k:
	if s[i]:
		work2.append(i)
		i -= c + 1
	else:
		i -= 1
work2.sort()
for i in range(k):
	if work1[i] == work2[i]:
		print(work1[i] + 1)


(n, k, c) = list(map(int, input().split()))
s = input()
b = []
d = -1
for i in range(k):
	while s[d] == 'x':
		d -= 1
	b.append(n + d)
	d -= c + 1
d = 0
for i in range(k):
	while s[d] == 'x':
		d += 1
	if d == b[-i - 1]:
		print(d + 1)
	d += c + 1


(n, k, c) = map(int, input().split())
s = input()
(x, y) = ([0] * n, [0] * n)
(work1, work2) = ([], [])
last = -10 ** 9
cnt = 0
for i in range(n):
	if s[i] == 'o' and i - last > c:
		cnt += 1
		last = i
		work1.append(i)
	if cnt == k:
		break
nextw = 10 ** 9
cnt = 0
for i in range(n - 1, -1, -1):
	if s[i] == 'o' and nextw - i > c:
		work2.append(i)
		cnt += 1
		nextw = i
	if cnt == k:
		break
work2.reverse()
for i in range(k):
	if work1[i] == work2[i]:
		print(work1[i] + 1)


(n, k, c) = map(int, input().split())
s = str(input())
t = []
u = []
(i, x, y, j) = (0, 0, 0, n - 1)
while i < n and x < k:
	if s[i] == 'o':
		t.append(i)
		x += 1
		i += c
	i += 1
while j >= 0 and y < k:
	if s[j] == 'o':
		u.append(j)
		y += 1
		j += -c
	j += -1
for i in range(0, k):
	if t[i] == u[k - 1 - i]:
		print(t[i] + 1)


(n, k, c) = map(int, input().split())
S = list(input())
A = []
B = []
i = 0
while i < n:
	if S[i] == 'o':
		A.append(i)
		i = i + c + 1
	else:
		i = i + 1
i = n - 1
while i > -1:
	if S[i] == 'o':
		B.append(i)
		i = i - c - 1
	else:
		i = i - 1
if len(A) > k or len(B) > k:
	exit()
B.sort()
for i in range(k):
	if A[i] == B[i]:
		print(A[i] + 1)


(n, k, c) = map(int, input().split())
s = input()
l = []
r = []
i = 0
while len(l) < k:
	if s[i] == 'o':
		l.append(i)
		i += c + 1
	else:
		i += 1
i = n - 1
while len(r) < k:
	if s[i] == 'o':
		r.append(i)
		i -= c + 1
	else:
		i -= 1
r = r[::-1]
for (i, j) in zip(l, r):
	if i == j:
		print(i + 1)


(N, K, C) = map(int, input().split())
S = input()
(dl, pl, dr, pr) = ([], -(C + 1), [], -(C + 1))
for i in range(N):
	if S[i] == 'o' and i - pl > C and (len(dl) < K):
		dl.append(i + 1)
		pl = i
	if S[N - i - 1] == 'o' and i - pr > C and (len(dr) < K):
		dr.append(N - i)
		pr = i
for i in range(K):
	if dl[i] == dr[K - i - 1]:
		print(dl[i])


(N, K, C) = map(int, input().split())
S = input()
l = [i + 1 for i in range(N) if S[i] == 'o']
left = [l[0]]
right = [l[-1]]
for i in range(1, len(l)):
	if l[i] > left[-1] + C:
		left.append(l[i])
	if l[-i - 1] < right[-1] - C:
		right.append(l[-i - 1])
if len(left) == K:
	for i in range(len(left)):
		if left[i] == right[-i - 1]:
			print(left[i])


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

def ff(s):
	i = 1
	kin = []
	for k in range(0, K):
		while s[i - 1] == 'x':
			i = i + 1
		kin += [i]
		i = i + C + 1
	return kin
k1 = ff(S)
S2 = S[::-1]
k2 = ff(S2)
for i in range(0, K):
	k2[i] = N - k2[i] + 1
k2 = k2[::-1]
for i in range(0, K):
	if k1[i] == k2[i]:
		print(k1[i])


(N, K, C) = map(int, input().split())
S = input()
(L, R) = ([0] * N, [0] * N)
i = 0
count = 1
while count <= K:
	if S[i] == 'x':
		i += 1
		continue
	L[i] = count
	count += 1
	i += C + 1
i = N - 1
count = K
while count > 0:
	if S[i] == 'x':
		i -= 1
		continue
	R[i] = count
	count -= 1
	i -= C + 1
for i in range(N):
	if L[i] == 0:
		continue
	if L[i] == R[i]:
		print(i + 1)


import sys
import collections
input = sys.stdin.readline
(N, K, C) = map(int, input().split())
S = input().strip()
(L, R) = ([-1] * N, [-1] * N)
i = 0
for k in range(K):
	while i < N and S[i] == 'x':
		i += 1
	if i >= N:
		break
	L[i] = k
	i += C + 1
i = N - 1
for k in range(K - 1, -1, -1):
	while i >= 0 and S[i] == 'x':
		i -= 1
	if i < 0:
		break
	R[i] = k
	i -= C + 1
for i in range(N):
	if L[i] != -1 and L[i] == R[i]:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input()
l = len(s) - 1
i = 0
lb = []
le = []
while i < len(s) and len(lb) < k:
	if s[i] == 'o':
		lb.append(i)
		i += c + 1
		continue
	i += 1
while l > -1 and len(le) < k:
	if s[l] == 'o':
		le.append(l)
		l -= c + 1
		continue
	l -= 1
le.sort()
for j in range(0, len(lb)):
	if lb[j] == le[j]:
		print(lb[j] + 1)


(N, K, C) = list(map(int, input().split()))
S = input()
A = []
cnt = 0
for (i, s) in enumerate(S, 1):
	if cnt > 0:
		cnt -= 1
	elif s == 'o':
		cnt = C
		A.append(i)
if len(A) > K:
	return
B = []
cnt = 0
for (i, s) in zip(list(range(N, 0, -1)), S[::-1]):
	if cnt > 0:
		cnt -= 1
	elif s == 'o':
		cnt = C
		B.append(i)
assert len(B) == K
B.reverse()
Ans = []
for (a, b) in zip(A, B):
	if a == b:
		Ans.append(a)
print('\n'.join(map(str, Ans)))


import sys
(N, K, C) = map(int, input().split())
S = list(input())
ini = []
las = []
cnt = C
for (c, i) in enumerate(S):
	if cnt >= C and i == 'o':
		ini.append(c)
		cnt = 0
	else:
		cnt += 1
cnt = C
for (c, i) in enumerate(reversed(S)):
	if cnt >= C and i == 'o':
		las.append(len(S) - c - 1)
		cnt = 0
	else:
		cnt += 1
las = sorted(las)
if len(ini) > K:
	sys.exit()
for (i, j) in zip(ini, las):
	if i == j:
		print(i + 1)


(N, K, C) = map(int, input().split())
S = str(input())
L = []
R = []
now = 0
times = 0
while times < K:
	if S[now] == 'o':
		L.append(now)
		now += C
		times += 1
	now += 1
now = N - 1
times = 0
while times < K:
	if S[now] == 'o':
		R.append(now)
		now -= C
		times += 1
	now -= 1
R.sort()
for i in range(K):
	if L[i] == R[i]:
		print(L[i] + 1)


def main():
	import sys

	def input():
		return sys.stdin.readline().rstrip()
	(n, k, c) = list(map(int, input().split()))
	s = [True if i == 'o' else False for i in input()]
	L = [0] * k
	R = [0] * k
	i = n - 1
	now = k - 1
	while 0 <= now:
		if s[i]:
			R[now] = i
			i -= c
			now -= 1
		i -= 1
	i = 0
	now = 0
	while now < k:
		if s[i]:
			L[now] = i
			if L[now] == R[now]:
				print(i + 1)
			i += c
			now += 1
		i += 1

def __starting_point():
	main()
__starting_point()


(N, K, C) = map(int, input().split())
S = input()
l = [0] * K
r = [0] * K
ld = 0
rd = N - 1
for i in range(K):
	j = K - i - 1
	while S[ld] == 'x':
		ld += 1
	while S[rd] == 'x':
		rd -= 1
	l[i] = ld
	ld += 1 + C
	r[j] = rd
	rd -= 1 + C
for i in range(K):
	if l[i] == r[i]:
		print(l[i] + 1)


(N, K, C) = list(map(int, input().split()))
S = input()
l = [-1] * N
r = [-1] * N
idx = 1
i = 0
C += 1
while i < N:
	if S[i] == 'o':
		l[i] = idx
		idx += 1
		i += C
	else:
		i += 1
idx = 1
i = N - 1
while 0 <= i:
	if S[i] == 'o':
		r[i] = idx
		idx += 1
		i -= C
	else:
		i -= 1
if idx - 1 <= K:
	for i in range(N):
		if l[i] != -1 and r[i] != -1:
			print(i + 1)


(n, k, c) = map(int, input().split())
s = [i for i in input()]
a = [0 for i in range(n)]
b = [0 for i in range(n)]
i = 0
while i < n:
	if s[i] == 'o':
		a[i] = 1
		i += c
	i += 1
s.reverse()
i = 0
while i < n:
	if s[i] == 'o':
		b[i] = 1
		i += c
	i += 1
b.reverse()
if sum(a) > k:
	quit()
for i in range(n):
	if a[i] and b[i]:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = list(input())
ans = []
cnt = 0
kcn = 0
for (i, x) in enumerate(s[::-1]):
	i = n - i - 1
	if cnt:
		cnt -= 1
	elif x == 'o' and kcn < k:
		cnt += c
		kcn += 1
		ans.append(i)
cnt = 0
j = len(ans) - 1
kcn = 0
for (i, x) in enumerate(s):
	if cnt:
		cnt -= 1
	elif x == 'o' and kcn < k:
		cnt += c
		kcn += 1
		if ans[j] == i:
			print(i + 1)
		j -= 1


(N, K, C) = map(int, input().split())
S = input()
i = 0
left = []
while i < N and len(left) < K:
	if S[i] == 'o':
		left.append(i)
		i += C + 1
		continue
	i += 1
i = N - 1
right = []
while i >= 0 and len(right) < K:
	if S[i] == 'o':
		right.append(i)
		i -= C + 1
		continue
	i -= 1
n = len(left)
for i in range(n):
	if left[i] == right[n - i - 1]:
		print(left[i] + 1)


(N, K, C) = map(int, input().split())
S = input()
l = [0] * K
i = 0
for j in range(K):
	while S[i] == 'x':
		i += 1
	l[j] = i
	i += C + 1
r = [0] * K
i = N - 1
for j in range(K - 1, -1, -1):
	while S[i] == 'x':
		i -= 1
	r[j] = i
	i -= C + 1
[print(l_i + 1) for (l_i, r_i) in zip(l, r) if l_i == r_i]


ss = input().split()
(n, k, c) = map(int, ss)
s = input()
L = {}
R = {}
i = 0
fk = 0
while i < n and fk < k:
	if s[i] == 'x':
		i += 1
	else:
		L[fk + 1] = i
		i += c + 1
		fk += 1
n -= 1
while 0 <= n and 0 < k:
	if s[n] == 'x':
		n -= 1
	else:
		R[k] = n
		n -= c + 1
		k -= 1
keys = set(L.keys()) | set(R.keys())
for k in sorted(keys):
	if k in R and k in L:
		if R[k] == L[k]:
			print(R[k] + 1)


def resolve():

	def sub(s):
		cur = 0
		last = -(C + 1)
		res = [0] * (N + 1)
		for i in range(N):
			if i - last > C and s[i] == 'o':
				cur += 1
				last = i
			res[i + 1] = cur
		return res
	(N, K, C) = list(map(int, input().split()))
	S = input()
	left = sub(S)
	T = S[::-1]
	right = sub(T)
	for i in range(N):
		if S[i] == 'x':
			continue
		if left[i] + right[N - i - 1] < K:
			print(i + 1)

def __starting_point():
	resolve()
__starting_point()


(N, K, C) = map(int, input().split())
S = input()
A = []
for i in range(N):
	if S[i] == 'o':
		A.append(i)
M = []
d = 0
cnt = 0
for i in A:
	if d <= i:
		M.append(i)
		d = i + C + 1
		cnt += 1
	if cnt == K + 1:
		print()
		exit()
U = []
d = N - 1
cnt = 0
for i in A[::-1]:
	if i <= d:
		U.append(i)
		d = i - C - 1
		cnt += 1
	if cnt == K + 1:
		print()
		exit()
D = set(M) & set(U)
D = sorted(D)
for i in D:
	print(i + 1)


(n, k, c) = map(int, input().split())
s = list(input())
R = []
p = 0
for _ in range(k):
	while s[p] == 'x':
		p += 1
	R.append(p)
	p += c + 1
L = []
p = n - 1
for _ in range(k):
	while s[p] == 'x':
		p -= 1
	L.append(p)
	p -= c + 1
L = list(reversed(L))
for i in range(k):
	if R[i] == L[i]:
		print(R[i] + 1)


(n, k, c) = list(map(int, input().split()))
s = list(input())
l = []
r = []
i = 0
while i < n and len(l) <= k:
	if s[i] == 'o':
		l.append(i)
		i += c + 1
	else:
		i += 1
i = n - 1
while i >= 0 and len(r) <= k:
	if s[i] == 'o':
		r.append(i)
		i -= c + 1
	else:
		i -= 1
i = 0
while i < k:
	if l[i] == r[k - 1 - i]:
		print(l[i] + 1)
	i += 1


nkc = list(map(int, input().split()))
s = input()
ok = [i for i in range(nkc[0]) if s[i] == 'o']
L = []
today = -1000000
for x in ok:
	if x - today >= nkc[2] + 1:
		today = x
		L.append(x)
	if len(L) == nkc[1]:
		break
R = []
today = 1000000
ok.reverse()
for x in ok:
	if today - x >= nkc[2] + 1:
		today = x
		R.append(x)
	if len(R) == nkc[1]:
		break
R.reverse()
for i in range(nkc[1]):
	if L[i] == R[i]:
		print(L[i] + 1)


(n, k, c) = map(int, input().split())
s = input()
fo = []
ba = []
r = 0
for (ind, cc) in enumerate(s):
	ind += 1
	r -= 1
	if cc == 'x' or r > 0:
		continue
	fo.append(ind)
	if len(fo) == k:
		break
	r = c + 1
r = 0
for (ind, cc) in enumerate(reversed(s)):
	ind = n - ind
	r -= 1
	if cc == 'x' or r > 0:
		continue
	ba.append(ind)
	if len(ba) == k:
		break
	r = c + 1
for (f, b) in zip(fo, reversed(ba)):
	if f == b:
		print(f)


(N, K, C) = map(int, input().split())
S = input()
i = 0
d1 = [-1] * N
for k in range(K):
	while S[i] == 'x' and i < N:
		i += 1
	if i == N:
		break
	d1[i] = k
	i += C + 1
i = 0
d2 = [-1] * N
for k in range(K - 1, -1, -1):
	while S[N - 1 - i] == 'x' and i < N:
		i += 1
	if i == N:
		break
	d2[N - 1 - i] = k
	i += C + 1
print(*[i + 1 for i in range(N) if d1[i] == d2[i] >= 0], sep='\n')


(n, k, c) = map(int, input().split())
s = input()
L = [-1] * k
R = [-1] * k
now = 0
cnt = 0
while now < n and cnt < k:
	if s[now] == 'o':
		L[cnt] = now
		cnt += 1
		now += c + 1
	else:
		now += 1
now = n - 1
cnt = k - 1
while now >= 0 and cnt >= 0:
	if s[now] == 'o':
		R[cnt] = now
		cnt -= 1
		now -= c + 1
	else:
		now -= 1
A = []
for i in range(k):
	if L[i] == R[i]:
		A.append(L[i] + 1)
print(*A, sep='\n')


(N, K, C) = [int(input_) for input_ in input().split(' ')]
tick_cross = input()

def find_earliest_work_days(K, C, tick_cross):
	N = len(tick_cross)
	day = 0
	earliest_work_days = []
	number_of_work_days = len(earliest_work_days)
	while day < N and number_of_work_days < K:
		if tick_cross[day] == 'o':
			earliest_work_days.append(day + 1)
			number_of_work_days = len(earliest_work_days)
			day += C + 1
		else:
			day += 1
	return earliest_work_days

def find_latest_work_days(K, C, tick_cross):
	N = len(tick_cross)
	day = N - 1
	latest_work_days = []
	number_of_work_days = len(latest_work_days)
	while day >= 0 and number_of_work_days < K:
		if tick_cross[day] == 'o':
			latest_work_days.append(day + 1)
			number_of_work_days = len(latest_work_days)
			day -= C + 1
		else:
			day -= 1
	return sorted(latest_work_days)
earliest_work_days = find_earliest_work_days(K, C, tick_cross)
latest_work_days = find_latest_work_days(K, C, tick_cross)
for (earliest, latest) in zip(earliest_work_days, latest_work_days):
	if earliest == latest:
		print(earliest)


INF = 10 ** 18
(N, K, C) = map(int, input().split())
S = input()
left = [0] * N
right = [0] * N
l = -INF
for i in range(N):
	if S[i] == 'o':
		if l == -INF:
			left[i] = 1
			l = i + C
		elif l < i:
			left[i] = max(left[i], left[i - C - 1] + 1)
			l = i + C
		else:
			left[i] = left[i - 1]
	else:
		left[i] = left[i - 1]
r = INF
for i in reversed(range(N)):
	if S[i] == 'o':
		if r == INF:
			right[i] = 1
			r = i
		elif i < r - C:
			right[i] = max(right[i], right[i + C + 1] + 1)
			r = i
		else:
			right[i] = right[(i + 1) % N]
	else:
		right[i] = right[(i + 1) % N]
for i in range(N):
	lsum = left[i - 1] if i - 1 >= 0 else 0
	rsum = right[i + 1] if i + 1 < N else 0
	if lsum + rsum < K:
		print(i + 1)


import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter, defaultdict, deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
mod = 10 ** 9 + 7

def inp():
	return int(input())

def inpm():
	return map(int, input().split())

def inpl():
	return list(map(int, input().split()))

def inpls():
	return list(input().split())

def inplm(n):
	return list((int(input()) for _ in range(n)))

def inplL(n):
	return [list(input()) for _ in range(n)]

def inplT(n):
	return [tuple(input()) for _ in range(n)]

def inpll(n):
	return [list(map(int, input().split())) for _ in range(n)]

def inplls(n):
	return sorted([list(map(int, input().split())) for _ in range(n)])
(n, k, c) = inpm()
s = input()
saisoku = [0] * n
saioso = [0] * n
i = 0
while i < n:
	if s[i] == 'x':
		i += 1
		continue
	saisoku[i] = 1
	i += c + 1
if saisoku.count(1) > k:
	return
i = n - 1
while i >= 0:
	if s[i] == 'x':
		i -= 1
		continue
	saioso[i] = 1
	i -= c + 1
for i in range(n):
	if saisoku[i] == 1 and saioso[i] == 1:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input()

def solve_dp(s):
	dp = [0] * (n + 2)
	for i in range(n):
		if i <= c and s[i] == 'o':
			dp[i + 1] = 1
		elif s[i] == 'o':
			dp[i + 1] = max(dp[i], dp[i - c] + 1)
		else:
			dp[i + 1] = dp[i]
	return dp
mae = solve_dp(s)
ushiro = solve_dp(s[::-1])[::-1]
for i in range(1, n + 1):
	if mae[i - 1] + ushiro[i + 1] < k:
		print(i)


(n, k, c) = list(map(int, input().split()))
s = input()
workL = [0] * (n + 1)
workR = [0] * (n + 1)
cnt = 0
left = 0
while left < n:
	if s[left] == 'o':
		workL[left + 1] += 1
		cnt += 1
		left += c
	left += 1
cnt = 0
right = n - 1
while right >= 0:
	if s[right] == 'o':
		workR[right] += 1
		cnt += 1
		right -= c
	right -= 1
for i in range(n - 1):
	workL[i + 1] += workL[i]
for i in range(n - 1, 0, -1):
	workR[i - 1] += workR[i]
print('\n'.join(map(str, [i + 1 for i in range(n) if workL[i] + workR[i + 1] < k])))


(N, K, C) = list(map(int, input().split()))
S = input()
R = []
L = []
i = 0
while i < N:
	if S[i] == 'o':
		R.append(i)
		i += C + 1
	else:
		i += 1
i = N - 1
while i >= 0:
	if S[i] == 'o':
		L.append(i)
		i -= C + 1
	else:
		i -= 1
R = R[:K + 1]
L = L[:K + 1]
L.reverse()
for i in range(K):
	if R[i] == L[i]:
		print(str(R[i] + 1), end=' ')


(n, k, c) = map(int, input().split())
s = input()
left = []
cnt = 0
now = 0
while cnt < k:
	if s[now] == 'o':
		left.append(now)
		cnt += 1
		now += c
	now += 1
right = []
cnt = 0
now = len(s) - 1
while cnt < k:
	if s[now] == 'o':
		right.append(now)
		cnt += 1
		now -= c
	now -= 1
right = right[::-1]
for (l, r) in zip(left, right):
	if l == r:
		print(l + 1)


INF = float('inf')
(n, k, c) = list(map(int, input().split()))
s = input()
L = [-1 for _ in range(n)]
cl = c + 1
wl = 1
for i in range(n):
	if wl > k:
		continue
	if s[i] == 'x':
		cl += 1
	elif cl > c:
		L[i] = wl
		wl += 1
		cl = 1
	else:
		cl += 1
R = [-1 for _ in range(n)]
cr = c + 1
wr = k
for j in range(n - 1, -1, -1):
	if wr < 1:
		continue
	if s[j] == 'x':
		cr += 1
	elif cr > c:
		R[j] = wr
		wr -= 1
		cr = 1
	else:
		cr += 1
for i in range(n):
	if L[i] == -1:
		continue
	if R[i] == -1:
		continue
	if L[i] == R[i]:
		print(i + 1)


(n, k, c) = map(int, input().split())
s = input()
l = []
r = []
i = 0
j = n - 1
while 0 <= i <= n - 1:
	if s[i] == 'o':
		l += (i,)
		i += c + 1
	else:
		i += 1
while 0 <= j <= n - 1:
	if s[j] == 'o':
		r += (j,)
		j -= c + 1
	else:
		j -= 1
a = list(set(l) & set(r))
if len(a) > k:
	exit()
for q in sorted(a):
	print(q + 1)


(n, k, c) = map(int, input().split())
c += 1
s = input()
A = [i + 1 for i in range(n) if s[i] == 'o']
L = [1 for i in range(k)]
R = [n for i in range(k)]
import bisect
for i in range(1, k):
	L[i] = A[bisect.bisect_left(A, L[i - 1] + c)]
	R[-i - 1] = A[bisect.bisect_right(A, R[-i] - c) - 1]
for i in range(k):
	if L[i] == R[i]:
		print(L[i])