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: Time Limit Exceeded)

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

namespace ABC161
{
    public class Solve
    {
        public static void Main(string[] args)
        {
            new ABC_E();
        }
    }
    public class ABC_A
    {
        public ABC_A()
        {
            var i = Ex.ReadIntArray();
            Ex.Cw($"{i[2]} {i[0]} {i[1]}");
        }
    }
    public class ABC_B
    {
        public ABC_B()
        {
            var l1 = Ex.ReadIntArray();
            var arr = Ex.ReadLongArray();
            // N 種類の商品
            var n = l1[0];
            // M個を選べる
            var m = l1[1];
            // 総投票数の1/4M未満である
            long d = arr.Sum();
            var c = arr.Count(v => d <= v * 4 * m);
            Ex.Cw(m <= c);
        }
    }
    public class ABC_C
    {
        public ABC_C()
        {
            var l1 = Ex.ReadLongArray();
            // Nの初期値
            var n = l1[0];
            // Kの差の絶対値で置き換える
            var k = l1[1];

            var a = n % k;
            Ex.Cw(Math.Min(a, Math.Abs(a - k)));
        }
    }
    public class ABC_D
    {
        /// <summary>
        /// 小さい方からK番目のルンルン数
        /// </summary>
        long k;
        long end = 0;
        char[] arr;
        long cou = 0;

        public ABC_D()
        {
            k = Ex.ReadLong;

            long idx = 0;

            while (cou < k)
            {
                idx++;
                end = idx;
                arr = new char[end];
                for (int i = 1; i <= 9; i++)
                {
                    dfs(0, i);
                }
            }
        }

        void dfs(long idx, int t)
        {
            arr[idx] = (char)('0' + t);
            if (end == (idx + 1))
            {
                cou++;
                if (cou == k)
                {
                    Console.WriteLine(arr);
                }
                return;
            }
            if (cou >= k)
            {
                return;
            }


            if (t == 0)
            {
                dfs(idx + 1, 0);
                dfs(idx + 1, 1);
                return;
            }

            if (t == 9)
            {
                dfs(idx + 1, 8);
                dfs(idx + 1, 9);
                return;
            }
            dfs(idx + 1, t - 1);
            dfs(idx + 1, t);
            dfs(idx + 1, t + 1);
            return;
        }
    }
    public class ABC_E
    {
        // N日間のうち
        long n;
        // K日を選んで働く
        long k;
        // ある日働いたら、その直後の C 日間は働かない 
        long c;
        // S の i 文字目が x のとき、今日から i 日後には働かない
        bool[] s;
        bool[] ans;
        bool[] b;

        public ABC_E()
        {
            Input();

            Check();

            // 必ず働く日をすべて
            var a = ans
                .Select((item, index) => new { item, index })
                .Where(v => v.item)
                .Select(v => v.index + 1);
            Ex.Cw(string.Join("\n", a));
        }

        void Check()
        {
            List<int> list = s
                .Select((item, index) => new { item, index })
                .Where(v => v.item)
                .Select(v => v.index).ToList();

            foreach (var o in list)
            {
                s[o] = false;
                if (able())
                {
                    //var a = b
                    //    .Select((item, index) => new { item, index })
                    //    .Where(v => v.item)
                    //    .Select(v => v.index + 1);
                    //Ex.Cw(string.Join(" ", a));
                    ans[o] = false;
                }
                s[o] = true;
            }
        }

        bool able()
        {
            b = new bool[n];
            long cnt = 0;
            long i = 0;
            while (i < n)
            {
                if (!s[i])
                {
                    i++;
                    continue;
                }

                b[i] = true;
                cnt++;
                if (cnt == k) return true;
                i += c + 1;
            }
            return false;
        }

        void Input()
        {
            var l1 = Ex.ReadLongArray();
            n = l1[0];
            k = l1[1];
            c = l1[2];
            s = Ex.Read.ToCharArray().Select(c => c == 'o').ToArray();
            ans = new bool[n];
            Array.Copy(s, ans, n);
        }
    }
    public class ABC_F
    {
        public ABC_F()
        {

        }
    }
    public static class Ex
    {
        public static void Cw(object s)
        {
            Console.WriteLine(s);
        }
        public static void Cw(bool b)
        {
            if (b) Ex.Cw("Yes");
            else Ex.Cw("No");
        }

        public static string Read { get { return Console.ReadLine().Trim(); } }
        public static int ReadInt { get { return int.Parse(Read); } }
        public static long ReadLong { get { return long.Parse(Read); } }
        public static double ReadDouble { get { return double.Parse(Read); } }
        public static string[] ReadArray() { return Read.Split(' '); }
        public static int[] ReadIntArray() { return Read.Split(' ').Select(s => int.Parse(s)).ToArray(); }
        public static long[] ReadLongArray() { return Read.Split(' ').Select(s => long.Parse(s)).ToArray(); }
        public static string[] ReadArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read; return ret; }
        public static int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt; return ret; }
        public static long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong; return ret; }
    }
}