6. For max_ num_gen times do: