using System; using System.Linq; namespace y { class Program { static void Main(string[] args) { string s = Console.ReadLine(); string ans = ""; bool f = true; foreach (var c in s) { int a = s.Count(x => x == c); if (a > 2) { f = false; break; } if (a == 1) { ans += c.ToString(); } } if (!f || ans.Length >= 2) Console.WriteLine("Impossible"); else Console.WriteLine(ans); } } }