fully functional printTrie, havent tested printSubTrie but it should work
almost at the finish line need only acount for printTrie condition and do diff