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# (Mono 4.6.2.0) (judge verdict: Wrong Answer)

using System;
using System.Linq;
using System.Collections.Generic;

namespace Contest
{
    class Program
    {
        static void Main(string[] args)
        {
            ABC161.E();
        }

        class ABC161
        {
            public static void A()
            {
                var X = Read.Int();
                var Y = Read.Int();
                var Z = Read.Int();
                Console.WriteLine("{0} {1} {2}", Z, X, Y);
            }
            public static void B()
            {
                var N = Read.Int();
                var M = Read.Int();
                var A = Read.IntN();
                Array.Sort(A);
                var total = A.Sum();
                Console.WriteLine(A[N - M] * 4 * M < total ? "No" : "Yes");
            }
            public static void C()
            {
                var N = Read.Long();
                var K = Read.Long();
                var a = N % K;
                Console.WriteLine(Math.Min(a, K - a));
            }
            public static void D()
            {
                var K = Read.Int();
                var list = new List<long>();
                for(int keta = 1; keta <= 10; ++keta)
                {
                    for(int i = 1; i <= 9; ++i)
                    {
                        D_Loop(keta, i, 1, list);
                    }
                }
                Console.WriteLine(list[K - 1]);
            }
            static void D_Loop(int keta, long x, int current, List<long> list)
            {
                if (current == keta) { list.Add(x); return; }
                long last = x % 10;
                if(last > 0)
                {
                    D_Loop(keta, x * 10 + last - 1, current + 1, list);
                }
                D_Loop(keta, x * 10 + last, current + 1, list);
                if (last < 9)
                {
                    D_Loop(keta, x * 10 + last + 1, current + 1, list);
                }
            }
            public static void E()
            {
                var N = Read.Int();
                var K = Read.Int();
                var C = Read.Int();
                var S = Read.Str();
                var dp = new int[N + C + 2];
                for (int i = N; i > 0; --i)
                {
                    dp[i] = dp[i + 1];
                    if (S[i - 1] == 'o') { dp[i] = Math.Max(dp[i], dp[i + C + 1] + 1); }
                }
                if(dp[1] > K) { return; }
                int currentCount = 0;
                for(int i = 1; i <= N; ++i)
                {
                    if (S[i - 1] == 'o') { currentCount++; }
                    if (dp[i] > dp[i + 1])
                    {
                        if (currentCount == 1) { Console.WriteLine(i); i += C; }
                        currentCount = 0;
                    }
                }
                //Dictionary<int, HashSet<int>> dict = new Dictionary<int, HashSet<int>>();
                //for(int i = 1; i <= N; ++i)
                //{
                //    if (S[i - 1] == 'o')
                //    {
                //        var v = dp[i];
                //        if (!dict.ContainsKey(v)) { dict.Add(v, new HashSet<int>()); }
                //        dict[v].Add(i);
                //    }
                //}
                //foreach(var h in dict.OrderBy(x => -x.Key))
                //{
                //    if (h.Value.Count == 1) { Console.WriteLine(h.Value.First());  }
                //}
            }
            public static void F()
            {

            }
        }



        class Util
        {
            public static long Power(long a, long n, long p)
            {
                long res = 1;
                long mult = a;
                for (int i = 0; i < 40; ++i)
                {
                    if ((n & ((long)1 << i)) > 0)
                    {
                        res = (res * mult) % p;
                    }
                    mult = (mult * mult) % p;
                }
                return res;
            }
            public static long Inverse(long a, long p)
            {
                long b = p, c = 1, d = 0, e = 0, f = 0;
                while (b != 0)
                {
                    e = a / b;
                    f = b; b = a - e * b; a = f;
                    f = d; d = c - e * d; c = f;
                }
                c %= p;
                return c + (c < 0 ? p : 0);
            }
        }
        struct MOD
        {
            public static long P = 1000000007;
            public readonly long V;

            public MOD(long a) { this.V = a; }
            public static implicit operator MOD(long a) { return new MOD(a); }
            public static MOD operator +(MOD a, MOD b) { return new MOD((a.V + b.V) % P); }
            public static MOD operator -(MOD a, MOD b) { return new MOD((a.V - b.V + P) % P); }
            public static MOD operator *(MOD a, MOD b) { return new MOD((a.V * b.V) % P); }
            public static MOD operator /(MOD a, MOD b) { return new MOD((a.V * b.Inverse().V) % P); }
            public MOD Inverse() { return Util.Inverse(V, P); }
            public MOD Power(long n) { return Util.Power(V, n, P); }
            public override string ToString() { return V.ToString(); }
        }


        static class Read
        {
            static Queue<string> queue = new Queue<string>();
            static void Enqueue() { var ss = Console.ReadLine().Split(' '); foreach (var s in ss) { queue.Enqueue(s); } }
            public static int Int() { if (queue.Count == 0) { Enqueue(); } return Convert.ToInt32(queue.Dequeue()); }
            public static long Long() { if (queue.Count == 0) { Enqueue(); } return Convert.ToInt64(queue.Dequeue()); }
            public static string Str() { if (queue.Count == 0) { Enqueue(); } return queue.Dequeue(); }
            public static int[] IntN() { return Console.ReadLine().Split(' ').Select(s => Convert.ToInt32(s)).ToArray(); }
            public static long[] LongN() { return Console.ReadLine().Split(' ').Select(s => Convert.ToInt64(s)).ToArray(); }
            public static string[] StrN() { return Console.ReadLine().Split(' '); }
            public static Tuple<int, int>[] TupleInt(int n) { List<Tuple<int, int>> list = new List<Tuple<int, int>>(); for (int i = 0; i < n; ++i) { var ab = Read.IntN(); list.Add(new Tuple<int, int>(ab[0], ab[1])); } return list.ToArray(); }
            public static Tuple<long, long>[] TupleLong(int n) { List<Tuple<long, long>> list = new List<Tuple<long, long>>(); for (int i = 0; i < n; ++i) { var ab = Read.LongN(); list.Add(new Tuple<long, long>(ab[0], ab[1])); } return list.ToArray(); }
            public static Tuple<string, string>[] TupleStr(int n) { List<Tuple<string, string>> list = new List<Tuple<string, string>>(); for (int i = 0; i < n; ++i) { var ab = Read.StrN(); list.Add(new Tuple<string, string>(ab[0], ab[1])); } return list.ToArray(); }
            public static Tuple<double, double>[] TupleDouble(int n) { List<Tuple<double, double>> list = new List<Tuple<double, double>>(); for (int i = 0; i < n; ++i) { var ab = Read.LongN(); list.Add(new Tuple<double, double>(ab[0], ab[1])); } return list.ToArray(); }
            public static long[,] LongMatrix(int r, int c)
            {
                var mat = new long[r, c];
                for (int i = 0; i < r; ++i)
                {
                    var x = Read.LongN();
                    for (int j = 0; j < c; ++j)
                    {
                        mat[i, j] = x[j];
                    }
                }
                return mat;
            }
            public static Dictionary<int, HashSet<int>> AdjacencyList(int N, int M)
            {
                Dictionary<int, HashSet<int>> dict = new Dictionary<int, HashSet<int>>();
                for (int i = 0; i <= N; ++i)
                {
                    dict.Add(i, new HashSet<int>());
                }
                for (int i = 0; i < M; ++i)
                {
                    var ab = Read.IntN();
                    dict[ab[0]].Add(ab[1]);
                    dict[ab[1]].Add(ab[0]);
                }
                return dict;
            }
            public static Dictionary<int, Dictionary<int, long>> AdjacencyListWithWeight(int N, int M)
            {
                Dictionary<int, Dictionary<int, long>> dict = new Dictionary<int, Dictionary<int, long>>();
                for (int i = 0; i <= N; ++i)
                {
                    dict.Add(i, new Dictionary<int, long>());
                }
                for (int i = 0; i < M; ++i)
                {
                    var ab = Read.IntN();
                    dict[ab[0]].Add(ab[1], ab[2]);
                    dict[ab[1]].Add(ab[0], ab[2]);
                }
                return dict;
            }
        }
    }
}