use mark solution for permutation