import java.util.ArrayDeque; import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) throws Exception { new Main().run(); } void run() { Scanner sc=new Scanner(System.in); char[] cs=sc.next().toCharArray(); boolean find=false; for(int i=0;i<26;++i) { int[] cnt=new int[26]; for(int j=0;j=1&&2>=cnt[j]; } int c2=0; for(int j=0;j<13;++j)if(cnt[j]==2)++c2; flag&=c2==1; if(flag) { System.out.println((char)('a'+i)); find=true; } } if(!find)System.out.println("Impossible"); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }