use proconio::input; #[allow(unused)] use proconio::marker::*; #[allow(unused)] use std::collections::*; fn main() { input! { _n: usize, w: usize, h: usize, s: Chars, }; let mut ans = vec![vec!['x'; w]; h]; let mut i = 0; let mut j = 0; for &s in &s { if s == 'o' { ans[h - 1 - i][j] = 'o'; i += 1; } else { i = 0; j += 1; } } for ans in &ans { for ans in ans { print!("{}", ans); } println!(""); } }