import Data.List main :: IO () main = do s <- getLine let i = length $ filter (\x -> length x /= 2) $ group $ sort s if i == 1 then putStrLn $ head $ filter (\x -> length x == 1) $ group $ sort s else putStrLn "Impossible"