recursive trie