//length of the longest suffix of word ending on word[pos].