How to create the nodes automatically