import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; public class Main { public static long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] alpha = new char[26]; for(final char ch : sc.next().toCharArray()){ alpha[ch - 'a']++; } int two_count = 0, one_count = 0; for(final int a : alpha){ if(a == 2){ two_count++; }else if(a == 1){ one_count++; } } if(two_count == 6 && one_count == 1){ for(int i = 0; i < 26; i++){ if(alpha[i] == 1){ System.out.println((char)(i + 'a')); return; } } }else{ System.out.println("Impossible"); } } }