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