Reimplement the brute force algorithm.

At the moment its not very well, its (n-1)! instat possible (n-1)!/2.