import sys tmp_s = "abcdefghijklm" dic = {} for i in tmp_s: dic[i] = 0 s = raw_input() for i in s: if dic[i] == 3 or i not in tmp_s: print "Impossible" sys.exit() else: dic[i] += 1 n2 = [0, []] n1 = [0, []] n0 = [0, []] keys = dic.keys() for i in keys: if dic[i] == 2: n2[0] += 1 n2[1].append(i) elif dic[i] == 1: n1[0] += 1 n1[1].append(i) else: n0[0] += 1 n0[1].append(i) if n2[0] == 1 and n0[0] == 1: print n0[1][0] elif n0[0] == 1 and n2[0] == 0: print n2[1][0] elif n0[0] == 0 and n2[0] == 0: x = sorted(n1[1]) print x for i in x: print i