use std::collections::HashMap; fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let mut h = HashMap::new(); for c in s.trim().chars() { let v = h.entry(c).or_insert(0); *v += 1; if *v > 2 || h.len() > 7 { println!("Impossible"); return; } } println!("{}", h.iter().find(|&(_, &v)| v == 1).unwrap().0) }