package m.shin; import java.util.ArrayList; import java.util.Scanner; public class Con587 { public static void main(String[] args) { Scanner s = new Scanner(System.in); String str = s.next(); s.close(); ArrayList delete = new ArrayList<>(); boolean ft = false; String ans = ""; for(int i = 0;i < 7;i++){ String c = str.substring(0,1); str = str.substring(1, str.length()); if(delete.contains(c)){ break; }else{ delete.add(c); if(str.indexOf(c) == -1 && !ft){ ft = true; ans = c; continue; }else if(str.indexOf(c) == -1 && ft){ ft = false; break; }else{ str = str.replaceFirst(c, ""); } } } if(ft){ System.out.println(ans); }else{ System.out.println("Impossible"); } } }