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