a script to solve the eight-queen problem