public int totalNQueens(int n) {
        String []board= new String[n];
        char[] init = new char[n];
        Arrays.fill(init, '.');
        for (int i =0; i < n ;i++ ) {
            board[i]= new String(init,0,n);
        }
        nextQueens(board,0,n);
        return list.size();
    }