// #include <ext/pb_ds/assoc_container.hpp> 
//#include <ext/pb_ds/tree_policy.hpp>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstring>
#include <vector>
#include <deque>
#include <queue>
#include <set>
#include <map>
#include <valarray>
#include <iterator>
#include <functional>
#include <limits>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cassert>
#include <unordered_map>
#include <unordered_set>
#include <stack>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define trace(x) cerr << #x << ": " << x << " " << endl;
 
typedef int64_t ll;
 
#define endl '\n'
#define int ll
ll mod=1e9+7;
ll mod1=1e9+5;
ll power(ll a,ll b)
{
    if(b==0) return 1;
    else if(b%2==0)
        return power(((((a+mod)%mod)*((a+mod)%mod))%mod),b/2)%mod;
    else return (((a+mod)%mod)*(power(((((a+mod)%mod)*((a+mod)%mod))%mod),b/2)%mod))%mod;
}
  
  
 //using namespace __gnu_pbds;
 //#define ordered_set tree<pair<int,int>, null_type,less<pair<int,int>>, rb_tree_tag,tree_order_statistics_node_update>
//find_by_order(k)  returns iterator to kth element starting from 0;
//order_of_key(k) returns count of elements strictly smaller than k;
//erase,insert same as normal set
// mt19937 mrand(chrono::high_resolution_clock::now().time_since_epoch().count()); for randomized solution
int in(int i)
{
    return i+200000;
}
int32_t main()
{
    IOS

    
    int n,k,c;
    cin>>n>>k>>c;
    string s1;
    cin>>s1;
    int a[n+1];
    for(int i=1;i<=n;i++)
        if(s1[i-1]=='o')
        {
            a[i]=1;
        }
        else
        {
            a[i]=0;
        }
    int dp[n+1];
    memset(dp,0,sizeof(dp));
    set<int> s;
    s.insert(0);
    for(int i=1;i<=n;i++)
    {
        if(a[i]==0)
        {
            if(i-c-1>=1)
            {
                s.insert(dp[i-c-1]);
            }
        }
        else
        {
            if(i-c-1>=1)
            {
                s.insert(dp[i-c-1]);
            }
            dp[i]=1;
            dp[i]=min(max(dp[i],*s.rbegin()+1),k);
        }
    }

    s.clear();
    s.insert(0);
    int dp1[n+1];
    memset(dp1,0,sizeof(dp1));
    for(int i=n;i>=1;--i)
    {
        if(a[i]==0)
        {
            if(i+c+1<=n)
            {
                s.insert(dp1[i+c+1]);
            }
        }
        else
        {
            if(i+c+1<=n)
            {
                s.insert(dp1[i+c+1]);
            }
            dp1[i]=1;
            dp1[i]=min(max(dp1[i],*s.rbegin()+1),k);
        }
    }
    
    s.clear();
    for(int i=1;i<=n;i++)
    {
        if(a[i])
            s.insert(i);
    }

    vector<int> v;

    for(int i=1;i<=n;i++)
    {
        if(a[i])
        {

            int ri=0;
            int in=n+c+10;
            if(s.lower_bound(i+c+1)!=s.end())
            {
                in=*s.lower_bound(i+c+1);
                ri=dp1[*s.lower_bound(i+c+1)];
            }
            int le=0;
            int in1=-c-10;
            if(s.lower_bound(i-c)!=s.begin())
            {
                auto it=s.lower_bound(i-c);
                it--;
                in1=*it;
                le=dp[*it];
            }
            int in3=-1;
            int in4=-1;
            if(s.lower_bound(i+1)!=s.end())
            {
                in3=dp1[*s.lower_bound(i+1)];
            }
        
            if(s.lower_bound(i)!=s.begin())
            {
                auto it=s.lower_bound(i);
                it--;
                in4=dp[*it];
            }

            
            if(le+ri==k-1)
            {
                if(i-in1>c and in-i>c and in3!=dp1[i] and in4!=dp[i])
                {
                    v.push_back(i);
                }
            }
        }
    }
    for(auto i:v)
        cout<<i<<" ";
}       

Measured memory_bytes: 17544