use proconio::input; use proconio::marker::Chars; use itertools::Itertools; fn main(){ input!{ h: usize, w: usize, s: [Chars; h], } let mut t = vec![String::new(); w]; for i in (0..h).rev(){ for j in 0..w{ t[j].push(s[i][j]); } } println!("{}", t.iter().join("\n")); }