In the first step the corner elements shift one side ACW, the middle-left and the middle-right elements interchange places, while the central element remains constant. In the second step, the element at the top diagonal shifts to the middle and middle element shifts to the place of lower diagonal.
In the first step, the uppermost and the lowermost elements interchange places while the remaining elements shift one step upward in a cyclic order. In the next step, the elements of the upper pair interchange places while the remaining two elements of the upper pair interchange places. The remaining two elements are replaced by new ones and the elements of the lower pair also interchange places.