using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace YukiCoder { class Program { static void Main(string[] args) { var S = Console.ReadLine().GroupBy(c=>c); if (S.Count() == 7 && S.Max(c => c.Count()) == 2) { var a = S.First(c => c.Count() == 1).ToArray(); Console.WriteLine(a); } else Console.WriteLine("Impossible"); Console.WriteLine(); Console.ReadLine(); } } }