use std::{collections::BTreeMap, io::Read}; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let v: Vec<_> = s.split_whitespace().skip(2).collect(); let mut h = BTreeMap::new(); for x in v.chunks(2) { h.insert(x[0], x[1]); } for (k, v) in h.iter() { println!("{} {}", k, v) } }