use std::io::{stdin, Read}; fn main() { let mut buf = String::new(); stdin().read_to_string(&mut buf).unwrap(); let mut buf = buf.split_whitespace(); let mut get = || buf.next().unwrap().parse::().unwrap(); let n = get() as usize; let m = get() as usize; let mut xs = vec![]; for _ in 0..n { xs.push(get()); } let mut v = 0; for i in 0..m { v ^= xs[i]; } xs.sort(); xs.reverse(); for i in 0..m { if i > 0 { print!(" "); } print!("{}", xs[i]); } println!(); }