import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Scanner; class Main{ static Scanner s=new Scanner(System.in); public static void main(String[]$){ Map c=new HashMap<>(); s.next().chars().forEach(i->c.merge(i,1,Integer::sum)); int[] a=c.values().stream() .mapToInt(i->i) .sorted().toArray(); if(Arrays.equals(a,new int[]{1,2,2,2,2,2,2})){ System.out.println( (char)(int) c.entrySet().stream() .filter(o->o.getValue()==1) .findFirst().get().getKey()); }else System.out.println("Impossible"); } }