a=gets.chomp b=a.chars.tally.key(2) c=[*?a..?z].tally d=a.chars.tally e=c.reject{ |k, v| v == d[k] }.keys - [b] puts [e,b].join("to")