Problem:
Score : 500 points

Problem Statement

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 1

11 3 2
ooxxxoxxxoo

Sample Output 1

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.

Sample Input 2

5 2 3
ooxoo

Sample Output 2

1
5

There is only one possible choice for his workdays: Day 1,5.

Sample Input 3

5 1 0
ooooo

Sample Output 3

There may be no days on which he is bound to work.

Sample Input 4

16 4 3
ooxxoxoxxxoxoxxo

Sample Output 4

11
16

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

/**
 *    author:  otera    
**/
#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
using namespace std;

//#define int long long
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const int inf=1e9+7;
const ll INF=1LL<<60 ;
const ll mod=1e9+7 ;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<int, int> P;
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
#define debug(x)  cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

void solve() {
	int n, k, c; cin >> n >> k >> c;
    string s; cin >> s;
    int ok = 0;
    int cnt = 0;
    vector<int> pos;
    rep(i, n) {
        if(s[i] == 'o') {
            pos.pb(i);
        }
        if(s[i] == 'o' && ok <= i) {
            ++ cnt;
            ok += c + 1;
        }
    }
    // if(cnt > k) {
    //     cout << endl;
    //     return;
    // }
    vector<int> dp(n + 2, 0), dp2(n + 2, 0);
    vector<int> mdp(n + 2, 0);
    for(int i = n; i >= 1; -- i) {
        int j = min(n + 1, i + c + 1);
        if(s[i - 1] == 'o') dp[i] = 1 + mdp[j];
        else dp[i] = mdp[i + 1];
        //cerr << i << " " << dp[i] << endl;
        chmax(mdp[i], dp[i]);
    }
    vector<int> m2dp(n + 2, 0);
    for(int i = 1; i <= n; ++ i) {
        int j = max(0, i - c - 1);
        if(s[i - 1] == 'o') dp2[i] = 1 + m2dp[j];
        else dp2[i] = m2dp[i - 1];
        //cerr << i << " " << dp[i] << endl;
        chmax(m2dp[i], dp2[i]);
    }
    for(int i = 0; i < (int)pos.size(); ++ i) {
        int j = pos[i];
        int co2 = dp[j + 1] + dp2[max(0, j + 1 - c - 1)];
        //cerr << j << " " << co2 << endl;
        if(co2 < k || co2 > k) continue;
        if(i > 0) {
            int l = pos[i - 1];
            if(l <= j - c - 1) continue;
            int co = dp2[l + 1] + dp[min(n + 1, l + 1 + c + 1)];
            if(co >= k) continue;
        }
        if(i < (int)pos.size() - 1) {
            int l = pos[i + 1];
            if(l >= j + c + 1) continue;
            int co = dp2[max(0, l + 1 - c - 1)] + dp[l + 1];
            if(co >= k) continue;
        }
        cout << j + 1 << endl;
    }
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(10);
	//int t; cin >> t; rep(i, t)solve();
	solve();
    return 0;
}