import sequtils,strutils,algorithm,tables template get*():string = stdin.readLine().strip() let s = stdin.readLine.sorted(cmp) if s.join("") == "abcdefghijklm": echo s.join("\n") elif s[0] < 'a' or s[^1] > 'm' or s.toCountTable().len < 12: echo "Impossible" else: echo toSeq(s.toCountTable().pairs).sortedByIt(it[1])[^1][0]