Solving scrabble wordplay problem