using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Scanner { private readonly char Separator = ' '; private int Index = 0; private string[] Line = new string[0]; public string Next() { if (Index >= Line.Length) { Line = Console.ReadLine().Split(Separator); Index = 0; } var ret = Line[Index]; Index++; return ret; } public int NextInt() { return int.Parse(Next()); } public long NextLong() { return long.Parse(Next()); } public string[] StringArray() { Line = Console.ReadLine().Split(Separator); Index = Line.Length; return Line; } public int[] IntArray() { var l = StringArray(); var res = new int[l.Length]; for (int i = 0; i < l.Length; i++) { res[i] = int.Parse(l[i]); } return res; } public long[] LongArray() { var l = StringArray(); var res = new long[l.Length]; for (int i = 0; i < l.Length; i++) { res[i] = long.Parse(l[i]); } return res; } } class Program { private string S; private void Scan() { var sc = new Scanner(); S = sc.Next(); } public void Solve() { Scan(); var cnt = new int[200]; foreach (char c in S) { cnt[c]++; } int one = 0; string s = ""; for (char c = 'a'; c <= 'z'; c++) { var i = cnt[c]; if (i == 1) { s = c.ToString(); one++; } if (i >= 3) { Console.WriteLine("Impossible"); return; } } Console.WriteLine(one == 1 ? s : "Impossible"); } static void Main(string[] args) { new Program().Solve(); } }