s = gets.chomp t = 'abcdefghijklmnopqrstuvwxyz' s.size.times do |i| next if s[i] == t[i] puts "#{t[i]}to#{s[i]}" exit end