using System; using System.Linq; using System.Collections.Generic; class Program { static void Main() { string S = Console.ReadLine(); Dictionary dic = new Dictionary(); foreach (var item in S) { if (dic.ContainsKey(item)) dic[item]++; else dic[item] = 1; } if (dic.Count(x => x.Value == 2) == 6) Console.WriteLine(dic.First(x => x.Value == 1).Key); else Console.WriteLine("Impossible"); } }