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.Where(x => x.Value > 2).Count() > 0) { Console.WriteLine("Impossible"); return; } if (dic.Where(x => x.Value == 1).Count() == 1) { Console.WriteLine(dic.Where(x => x.Value == 1).First().Key); } else { Console.WriteLine("Impossible"); } } }