inverse function

Inverse of a permutation