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: Accepted)

/*******************************************************************************
* Author: Nirushuu
*******************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.IO;
using System.Globalization;
using System.Numerics;

/*******************************************************************************
* IO from Kattio.cs from open.kattis.com/help/csharp                          */
public class NoMoreTokensException : Exception
{
}

public class Tokenizer
{
    string[] tokens = new string[0];
    private int pos;
    StreamReader reader;

    public Tokenizer(Stream inStream)
    {
        var bs = new BufferedStream(inStream);
        reader = new StreamReader(bs);
    }

    public Tokenizer() : this(Console.OpenStandardInput())
    {
        // Nothing more to do
    }

    private string PeekNext()
    {
        if (pos < 0)
            // pos < 0 indicates that there are no more tokens
            return null;
        if (pos < tokens.Length)
        {
            if (tokens[pos].Length == 0)
            {
                ++pos;
                return PeekNext();
            }
            return tokens[pos];
        }
        string line = reader.ReadLine();
        if (line == null)
        {
            // There is no more data to read
            pos = -1;
            return null;
        }
        // Split the line that was read on white space characters
        tokens = line.Split(null);
        pos = 0;
        return PeekNext();
    }

    public bool HasNext()
    {
        return (PeekNext() != null);
    }

    public string Next()
    {
        string next = PeekNext();
        if (next == null)
            throw new NoMoreTokensException();
        ++pos;
        return next;
    }
}

public class Scanner : Tokenizer
{

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }

    public float NextFloat()
    {
        return float.Parse(Next());
    }

    public double NextDouble()
    {
        return double.Parse(Next());
    }
}

public class BufferedStdoutWriter : StreamWriter
{
    public BufferedStdoutWriter() : base(new BufferedStream(Console.OpenStandardOutput()))
    {
    }
}
/******************************************************************************/

/*******************************************************************************
* DisjointSet datastructure                                                   */
public struct DisjointSet {
    public int[] parent;
    public int[] rank;
    public DisjointSet(int n) {
        parent = new int[n];
        for (int i = 0; i < n; ++i) {
            parent[i] = i;
        }
        rank = new int[n];
    }

    public int Find(int i) {
        int idx = i;
        var compress = new List<int>();
        while (idx != parent[idx]) {
            compress.Add(idx);
            idx = parent[idx];
        }

        foreach (var e in compress) {   // path compress 
            parent[e] = idx;
        }
        return idx;
    }

    public void Union(int a, int b) {
        int aPar = this.Find(a);
        int bPar = this.Find(b);

        if (rank[aPar] > rank[bPar]) {  // by rank
            parent[bPar] = aPar;
        } else {
            parent[aPar] = bPar;
        }
        if (rank[aPar] == rank[bPar]) {
            ++rank[bPar];
        }
    }
}

class MaxHeap {
    List<int> data;

    public MaxHeap() {
        data = new List<int>();
    }

    public void Push(int a) {
        data.Add(a);
        int idx = data.Count - 1;
        int parent = (int) Math.Floor((double) (idx - 1) / 2);
        while (idx != 0 && (data[idx] > data[parent])) {
            int tmp = data[parent];
            data[parent] = data[idx];
            data[idx] = tmp;

            idx = parent;
            parent = (int) Math.Floor((double) (idx - 1) / 2);
        }
    }

    public int Pop() {
        int res = data[0];
        data[0] = data[data.Count - 1];
        data.RemoveAt(data.Count - 1);

        int idx = 0;
        while (true) {
            int child1 = (2 * idx) + 1;
            int child2 = (2 * idx) + 2;

            if (child1 >= data.Count) { // no children
                break;
            } else if (child2 >= data.Count) {  // one child
                if (data[idx] < data[child1]) {
                    int tmp = data[idx];
                    data[idx] = data[child1];
                    data[child1] = tmp;
                }
                break;
            } else {    // two children
                int maxChild = data[child1] > data[child2] ? child1 : child2;
                if (data[idx] < data[maxChild]) {
                    int tmp = data[idx];
                    data[idx] = data[maxChild];
                    data[maxChild] = tmp;
                    idx = maxChild;
                    continue;
                } else {    // no swap
                    break;
                }
            }
        } 

        return res;           
    }


}


class Dequeue {
    public Dictionary<int, int> data = new Dictionary<int, int>();
    int firstIdx;
    public int Count;
    public Dequeue() {
        data = new Dictionary<int, int>();
        firstIdx = 1;
        Count = 0;
    }

    public void PushFront(int a) {
        data[firstIdx - 1] = a;
        ++Count;
        --firstIdx;
    }

    public void PushBack(int a) {
        data[firstIdx + Count] = a;
        ++Count;
    }

    public int PopFront() {
        --Count;
        ++firstIdx;
        return data[firstIdx - 1];
    }

    public int PopBack() {
        --Count;
        return data[firstIdx + Count];
    }

    public int Get(int n) {
        return data[firstIdx + n];
    }
}
/******************************************************************************/

class MainClass {

    // Debug functions   
    static void debug<T>(IEnumerable<T> a, string s = "") {
        Console.WriteLine($"name: {s}");
        int i = 0;
        foreach (var e in a) {
            Console.WriteLine($"value {i}: {e}");
            ++i;
        }
    }
    static void dbg<T>(T a, string s = "") {
        Console.WriteLine($"name: {s} value: {a}");
    }
    ////////////////////
    
    static int gcd(int a, int b) {
        while (b != 0) {
            int t = b;
            b = a % b;
            a = t;
        }
        return a;
    }


    public static void Main() {
        
        var sc = new Scanner();
        var wr = new BufferedStdoutWriter();
        var dot = new NumberFormatInfo();
        dot.NumberDecimalSeparator = ".";


        int n = sc.NextInt();
        int k = sc.NextInt();
        int c = sc.NextInt();

        string s = " ";
        s += sc.Next();

        var earliest = new List<int>(k);
        {
            int cur = 1;
            for (int i = 0; i < k; ++i) {
                while (s[cur] != 'o') {
                    ++cur;
                }
                earliest.Add(cur);
                cur += c + 1;
            }
        }
        
        var latest = new List<int>(k);
        for (int i = 0; i < k; ++i) {
            latest.Add(-1);
        }
        {
            int cur = n;
            for (int i = k - 1; i >= 0; --i) {
                while (s[cur] != 'o') {
                    --cur;
                }
                latest[i] = cur;
                cur -= c + 1;
            }
        }

        var ans = new List<string>();
        for (int i = 0; i < k; ++i) {
            if (earliest[i] == latest[i]) {
                ans.Add(earliest[i].ToString());
            }
        }

        
        foreach (var e in ans) {
            wr.WriteLine(e);
        }
        wr.Flush();

        // wr.WriteLine();
        // foreach (var e in earliest) {
        //     wr.Write($"{e} ");
        // }

        // wr.WriteLine();
        // foreach (var e in latest) {
        //     wr.Write($"{e} ");
        // }

        // wr.Flush();
        
    }
}