Loop over the iterations.