orginalString = "abcdefghijklmnopqrstuvwxyz" replaceString = gets.chomp 26.times do |index| str1 = orginalString[index] str2 = replaceString[index] if str1 != str2 puts str1 + "to" + str2 exit end end