# frozen_string_literal: true def solve S.zip(('a'..'z')) .find { _1 != _2 } .then { %(#{_2}to#{_1}) } end S = gets.chomp.chars puts solve