Solve the n queens problem using back tracking.