algorithm discrete crossword of dice letters in color