Trie generator for auto-completion [WORK IN PROGRESS]