use proconio::input; fn main() { input! { n: usize } let lcm = if n < 4 { 6 } else if n < 8 { 30 } else { 210 }; let ans = (2..=lcm) .rev() .filter(|&x| lcm % x == 0) .take(n) .collect::>(); let output = ans .iter() .map(|x| x.to_string()) .collect::>() .join(" "); println!("{}", output); }