using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace YukiCoder { public class RisingSun { private static Dictionary HoldingTiles = new Dictionary() { {'a',0}, {'b',0}, {'c',0}, {'d',0}, {'e',0}, {'f',0}, {'g',0}, {'h',0}, {'i',0}, {'j',0}, {'k',0}, {'l',0}, {'m',0}, }; public static void Main() { List NowHolding = Console.ReadLine().ToCharArray().ToList(); foreach(var TargetHolding in NowHolding) { if (HoldingTiles.ContainsKey(TargetHolding) == false) continue; HoldingTiles[TargetHolding] = HoldingTiles[TargetHolding] + 1; } Possible(); } public static void Possible() { if (HoldingTiles.Count(x => x.Value == 0) > 2) { Console.WriteLine("Impossible"); return; } var NotHaving = HoldingTiles.Where(x => x.Value == 0).FirstOrDefault(); if(NotHaving.Key != 0) { Console.WriteLine(NotHaving.Key); return; } foreach(var Tile in HoldingTiles.Keys) { Console.WriteLine(Tile); return; } } } }