Implement R-way trie