use std::collections::*; #[allow(unused)] struct Scanner { stack: VecDeque, input: std::io::Stdin, } impl Scanner { fn new() -> Scanner { Scanner { stack: VecDeque::::new(), input: std::io::stdin(), } } fn take(&mut self) -> Option { if let Some(s) = self.stack.pop_front() { return Some(s); } self.enqueue_from_line(); self.stack.pop_front() } fn enqueue_from_line(&mut self) { let mut t = String::new(); self.input.read_line(&mut t).ok(); t.trim() .split_ascii_whitespace() .for_each(|s| self.stack.push_back(s.to_owned())); } } macro_rules! scan { ($io:expr => $t:ty) => { $io.take().unwrap().parse::<$t>().unwrap() }; ($io:expr => $t:tt * $n:expr) => ((0..$n).map(|_| scan!($io => $t)).collect::>()); ($io:expr => $($t:tt),*) => (($(scan!($io => $t)),*)); } fn main() { let mut cin = Scanner::new(); let n = scan!(cin => i32); let aa = scan!(cin => String * n); let mut map = btree_map::BTreeMap::::new(); for e in aa { let v = map.get(&e).unwrap_or(&0) + 1; map.insert(e, v); } let bb = scan!(cin => String * (n-1)); for e in bb { let v = map.get(&e).unwrap_or(&0) - 1; map.insert(e, v); } for (k, v) in map { if v > 0 { println!("{}", k); } } }