strs = gets.chomp.split("").map(&:to_s) list = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m"] diff = list - strs.uniq if diff.length > 1 puts "Inpossible" elsif diff.length == 0 puts strs.sort else puts diff end