Problem 24, lexicographic permutation finder was simple