Pretend the pages are sides of a cube and rotate that cube to the left or right according to the children order