use proconio::{input, marker::Bytes}; use std::iter; fn main() { input! { n: i32, k: i32, a: [Bytes; n], } let a = a .iter() .map(|x| x.iter().flat_map(|&y| iter::repeat(y).take(k as usize))); let a = a.flat_map(|x| iter::repeat(x).take(k as usize)); let a = a.map(|x| String::from_utf8(x.collect()).unwrap()); a.for_each(|x| println!("{}", x)); }