Restore the Permutation | CodeChef