For this exercise the goal was to learn the concept and usage of iterative functions. In order to solve the problem I developed an algorithm which allows me to guess the position and rotation of the next object, based on the previous iteration. Here you have two different iterations of the same principle.
Iteration 1
Iteration 2