Amazon interview question

Write function which can traverse through trie data structure.