Implement the sorted permutation problem