using System; using System.IO; using System.Linq; using System.Collections.Generic; using System.Text; public class Program { public void Proc() { string inpt = Reader.ReadLine(); Dictionary cnt = new Dictionary(); inpt.ToList().ForEach(a=>{ if(cnt.ContainsKey(a)) { cnt[a]++; } else { cnt[a] = 1; } }); if(cnt.Count == 7 && cnt.Count(a=>a.Value == 2) == 6 && cnt.Count(a=>a.Value == 1) == 1) { Console.WriteLine(cnt.Where(a => a.Value == 1).First().Key); } else { Console.WriteLine("Impossible"); } } public class Reader { private static StringReader sr; public static bool IsDebug = false; public static string ReadLine() { if (IsDebug) { if (sr == null) { sr = new StringReader(InputText.Trim()); } return sr.ReadLine(); } else { return Console.ReadLine(); } } private static string InputText = @" hsgeeappashoo "; } public static void Main(string[] args) { #if DEBUG Reader.IsDebug = true; #endif Program prg = new Program(); prg.Proc(); } }