Sample implementation of a trie data structure