const lines = require('fs') .readFileSync('/dev/stdin', 'utf-8') .trim().split('\n').values(); const S = lines.next().value; const deck = Array(13).fill(0); for (c of S) deck[c.charCodeAt(0) - 97]++; if ((deck.reduce((a, x) => a + Number(x === 2), 0)) === 1) { deck.forEach((x, i) => { if (x === 0) { console.log(String.fromCharCode(i + 97)); } }); return; } if (deck.every(x => x === 1)) { deck.forEach((x, i) => { console.log(String.fromCharCode(i + 97)); }); return; } console.log('Impossible');