Trie for idf structure