Language: C++

fn solve() {
    let stdin = std::io::stdin();
    let mut scn = Scanner {
        stdin: stdin.lock(),
    };
    let n: usize = scn.read();
    let k: usize = scn.read();
    let c: usize = scn.read();
    let s = scn.chars();
    let mut lefts = vec![(0, None); n];
    

    for (idx, ch) in s.iter().enumerate() {
        if idx >= 1 {
            lefts[idx] = lefts[idx - 1];
        }
        let (_, pre) = lefts[idx];
        if *ch == 'o' {
            if let Some(p) = pre {
                if p + c < idx {
                    lefts[idx].0 += 1;
                    lefts[idx].1 = Some(idx);
                }
            } else {
                lefts[idx].0 += 1;
                lefts[idx].1 = Some(idx);
            }
        }
    }
    let mut rights = vec![(0, None); n];
    for (idx, ch) in s.iter().enumerate().rev() {
        if idx + 1 < n {
            rights[idx] = rights[idx + 1];
        }
        let (_, pre) = rights[idx];

        if *ch == 'o' {
            if let Some(p) = pre {
                if p >= c && (p - c) > idx {
                    rights[idx].0 += 1;
                    rights[idx].1 = Some(idx);
                }
            } else {
                rights[idx].0 += 1;
                rights[idx].1 = Some(idx);
            }
        }
    }
    //eprintln!("{:?}", lefts);
    //eprintln!("{:?}", rights);

    for i in 0..n {
        if s[i] == 'o' {
            let mut tmp_cnt = 0;
            let (left_cnt, last) = if i >= 1 {
                lefts[i - 1]
            } else {
                (0, None)
            };
            //let (left_cnt, last) = lefts[i - 1];
            tmp_cnt += left_cnt;
            //eprintln!("{}", tmp_cnt);
            if let Some(last) = last {
                let idx1 = last + c + 1;
                let idx2 = i + 1;
                let tmp_idx = std::cmp::max(idx1, idx2);
                if tmp_idx < n {
                    tmp_cnt += rights[tmp_idx].0;
                }
            } else {
                if i + 1 < n {
                    tmp_cnt += rights[i + 1].0;
                }
            }
            if tmp_cnt < k {
                println!("{}", i + 1);
            }
            //eprintln!("{} {}", tmp_cnt, i);
        }
    }
}

fn main() {
    std::thread::Builder::new()
        .stack_size(64 * 1024 * 1024) // 64MB
        .spawn(|| solve())
        .unwrap()
        .join()
        .unwrap();
}
pub mod utils {
    const DYX: [(isize, isize); 8] = [
        (0, 1),   //right
        (1, 0),   //down
        (0, -1),  //left
        (-1, 0),  //top
        (1, 1),   //down right
        (-1, 1),  //top right
        (1, -1),  //down left
        (-1, -1), //top left
    ];

    pub fn try_adj(y: usize, x: usize, dir: usize, h: usize, w: usize) -> Option<(usize, usize)> {
        let ny = y as isize + DYX[dir].0;
        let nx = x as isize + DYX[dir].1;
        if ny >= 0 && nx >= 0 {
            let ny = ny as usize;
            let nx = nx as usize;
            if ny < h && nx < w {
                Some((ny, nx))
            } else {
                None
            }
        } else {
            None
        }
    }
}

//snippet from kenkoooo
pub struct Scanner<R> {
    stdin: R,
}

impl<R: std::io::Read> Scanner<R> {
    pub fn read<T: std::str::FromStr>(&mut self) -> T {
        use std::io::Read;
        let buf = self
            .stdin
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r')
            .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn read_line(&mut self) -> String {
        use std::io::Read;
        let buf = self
            .stdin
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b'\n' || b == b'\r')
            .take_while(|&b| b != b'\n' && b != b'\r')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }

    pub fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
}


Compiler output:
a.cc:52:14: error: too many decimal points in number
   52 |     for i in 0..n {
      |              ^~~~
a.cc:157:10: error: too many decimal points in number
  157 |         (0..n).map(|_| self.read()).collect()
      |          ^~~~
a.cc:1:1: error: 'fn' does not name a type
    1 | fn solve() {
      | ^~
a.cc:83:1: error: 'fn' does not name a type
   83 | fn main() {
      | ^~
a.cc:91:1: error: 'pub' does not name a type
   91 | pub mod utils {
      | ^~~
a.cc:121:1: error: 'pub' does not name a type
  121 | pub struct Scanner<R> {
      | ^~~
a.cc:125:1: error: 'impl' does not name a type
  125 | impl<R: std::io::Read> Scanner<R> {
      | ^~~~