import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); char[] arr = sc.next().toCharArray(); int[] counts = new int[13]; for (char c : arr) { counts[c - 'a']++; } char x = '0'; for (int i = 0; i < counts.length; i++) { if (counts[i] == 1 || counts[i] == 2) { continue; } else { if (counts[i] == 0 && x == '0') { x = (char)(i + 'a'); } else { System.out.println("Impossible"); return; } } } if (x == '0') { Arrays.sort(arr); for (char c : arr) { System.out.println(c); } } else { System.out.println(x); } } }