protected static String getWord(final Map<Integer, Set<String>> words, int startIndex, int length) {
        Set<String> wordsByIndex = words.get(startIndex);
        if (wordsByIndex == null || wordsByIndex.isEmpty())
            return null;
        for (String word : wordsByIndex)
            if (word.length() == length)
                return word;
        return null;
    }