use std::io::Write; fn main() { let out = std::io::stdout(); let mut out = std::io::BufWriter::new(out.lock()); let t: usize = 1; for _ in 0..t { solve(&mut out); } } fn solve(out: &mut std::io::BufWriter) { let mut a = 1; for _ in 1..=8 { write!(out, "{} ", a).unwrap(); a *= 3; } writeln!(out, "4500").unwrap(); }