C++ code to perform autosuggest, using Trie data structure, console output