Solution to Exercise 10.2 - eight queen problem using permutations