throwing exception if the same key is added to a Trie more than once