Solve perm problem