Rearange the shapes to fit in the space