Generate random graph.