Constructs a permutation that preserves the original order.
The permutation to construct.
The dimension of the matrix.