Implemented insert() in the Trie