import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String s = scan.next(); scan.close(); String []ary = s.split(""); int l = ary.length; int cnt1 = 0; int cnt2 = 0; String a = ""; for(int i = 0; i < l; i++) { String t = ary[i]; for(int j = 0; j < l; j++) { if(t.equals(ary[j])) { cnt1 ++; } } if(cnt1 == 1) { a = t; cnt2 ++; }else if(cnt1 >= 3) { cnt2 ++; } cnt1 = 0; } if(cnt2 == 1) { System.out.println(a); }else { System.out.println("Impossible"); } } }