problem 24, added lexicographic permutation generator to utils, formatting