fn main() { let s: Vec = get::chars(); let mut freq = vec![0; 26]; for c in s { freq[c as usize - 'a' as usize] += 1 } let one = freq.iter().filter(|&&x|x==1).count(); let two = freq.iter().filter(|&&x|x==2).count(); if one == 1 && two == 6 { let machi = freq.iter().position(|&x|x==1).unwrap(); println!("{}", (machi as u8 + 'a' as u8) as char); return } println!("Impossible"); } #[allow(dead_code)] mod get { use std::io::*; use std::str::*; pub fn val() -> T { let mut buf = String::new(); stdin().read_line(&mut buf).ok(); buf.trim().parse::().ok().unwrap() } pub fn vals(n: usize) -> Vec { let mut vec: Vec = vec![]; for _ in 0 .. n { vec.push(val()); } vec } pub fn tuple() -> (T1, T2) { let mut buf = String::new(); stdin().read_line(&mut buf).ok(); let mut it = buf.trim().split_whitespace(); let x = it.next().unwrap().parse::().ok().unwrap(); let y = it.next().unwrap().parse::().ok().unwrap(); (x, y) } pub fn tuples(n: usize) -> Vec<(T1, T2)> { let mut vec: Vec<(T1, T2)> = vec![]; for _ in 0 .. n { vec.push(tuple()); } vec } pub fn tuple3() -> (T1, T2, T3) { let mut buf = String::new(); stdin().read_line(&mut buf).ok(); let mut it = buf.trim().split_whitespace(); let x = it.next().unwrap().parse::().ok().unwrap(); let y = it.next().unwrap().parse::().ok().unwrap(); let z = it.next().unwrap().parse::().ok().unwrap(); (x, y, z) } pub fn tuple3s(n: usize) -> Vec<(T1, T2, T3)> { let mut vec: Vec<(T1, T2, T3)> = vec![]; for _ in 0 .. n { vec.push(tuple3()); } vec } pub fn list() -> Vec { let mut buf = String::new(); stdin().read_line(&mut buf).ok(); buf.trim().split_whitespace().map(|t| t.parse::().ok().unwrap()).collect() } pub fn lists(h: usize) -> Vec> { let mut mat: Vec> = vec![]; for _ in 0 .. h { mat.push(list()); } mat } pub fn chars() -> Vec { let mut buf = String::new(); stdin().read_line(&mut buf).ok(); buf.trim().chars().collect() } }