use proconio::{input, marker::Chars}; fn main() { input! { n: usize, w: usize, h: usize, s: Chars, } let mut ans = vec![vec!['x'; w]; h]; let (mut i, mut j) = (0, 0); for &s in &s { if s == 'o' { ans[i][j] = 'o'; i += 1; } else { i = 0; j += 1; } } for row in ans.iter().rev() { let row = row.iter().collect::(); println!("{row}"); } }