arrange the order that the balls are printed in the cells