insert and print inserted trie words functional