Words near treewidth in the dictionary