a=gets.chomp b=a.chars.tally.key(2) c=[*?a..?z] puts c.zip(a.chars).select{|x,y| x != y}.join("to")