Cyclic permutation of integer