Implement a Trie in JavaScript, Java and Python. In the trie node, an array is used to store references to next nodes in branches.