trie.hpp: create a trie class with insert, root and lookup methods.