Solution to the 8 queens problem