GetPossibleWordsForRow2 works well with O(N) time.