Function for generating 9 node network