l = gets all = (?a..?z).to_a pairs = all.zip(l.chars) puts pairs.find { |a, b| a != b }.join('to')