build basic trie data structure from pali words