Implement searching shortest unique prefix using Trie.