Find the Index of Permutation