public static void main(String[] args) {
	    int row = 0;
	    board[0] = -1;
	    while (row >= 0) 
	    {
	      do 
	      {
	        board[row]++; //increment the value of the column
	      } 		// while the column is less than the max queens and is safe
	      while ((board[row] < n) && notSafe(row));
	      
	      if (board[row] < n)  // if the attacking pairs is less than the number of queens
	      {
	        if (row < (n-1)) // if the counter is less than the number of queens-1
	        {
	          board[++row] = -1; //the next row queen is then set to -1
	        } 
	        else
	        {
	          printBoard();
	        }
	      } 
	      else 
	      { 
	        row--;
	      }
	    }
	  }