fn main() { let mut xx = String::new(); std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok(); let mut xx: Vec = xx.split_whitespace().skip(1).flat_map(str::parse).collect(); for i in 1..(2 * xx.len() - 3) { for p in 0.. { let q = i - p; if q > xx.len() - 1 { continue; } if p >= q { break; } if xx[p] > xx[q] { xx.swap(p, q); } } } println!( "{}", xx.iter() .map(std::string::ToString::to_string) .collect::>() .join(" ") ); }