import core.bitop; import std.algorithm; import std.array; import std.ascii; import std.container; import std.conv; import std.format; import std.math; import std.random; import std.range; import std.stdio; import std.string; import std.typecons; void main() { string s = readln.chomp; int[char] cnt; foreach (c; s) { cnt[c]++; } int two = 0; int one = 0; char trg; foreach (k, v; cnt) { switch (v) { case 1: ++one; trg = k; break; case 2: ++two; default: } } bool yes = cnt.keys.length == 7 && two == 6 && one == 1; if (yes) { writeln = trg; } else { writeln = "Impossible"; } }