fn main() { let n = input_line::()[0]; let mut v = Vec::new(); for _i in 0..n { v.push(input_line::()); } for i in 0..n as usize { v[i].remove(0); v[i].sort_by(|a, b| b.cmp(a)); println!( "{}", v[i].iter() .map(|x| x.to_string()) .collect::>() .join(" ") ); } } fn input_line() -> Vec { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim() .split_whitespace() .map(|e| e.parse().ok().unwrap()) .collect() }