s = gets.chomp h = Hash.new(0) s.scan(/./){|i| h[i] += 1} h.key(1) ? m = h.key(1) : m = "Impossible" puts m