Implement suffix trie using array, including methods of build suffix trie, search substring, print all nodes. Code in Java, JavaScript and Python.