using System; using System.Linq; class No587 { static void Main() { var str = Console.ReadLine(); var count = 0; var ans = ""; while (0 < str.Length) { var temp = str[0]; str=str.Remove(0,1); if (str.Contains(temp)) { str=str.Replace(temp.ToString(), ""); count++; } else ans = temp.ToString(); } Console.WriteLine(count == 6 ? ans : "Impossible"); } }