using System; using System.Collections.Generic; using System.Linq; class Solution { static void Main() { var s = Console.ReadLine(); var alpha = new Dictionary(); foreach (var c in s) { if (!alpha.ContainsKey(c)) { alpha[c] = 0; } alpha[c]++; } if (alpha.Count(a => a.Value == 2) == 6) { var orphan = alpha.First(a => a.Value == 1).Key; Console.WriteLine(orphan); } else { Console.WriteLine("Impossible"); } } }