https://9dok.org/document/q5mrl99j-inversions-cycles-permutations.html