------
## 最终结论
To solve the problem of making an array non-decreasing using at most 2n operations, we can follow these steps:

1. **Read Input**: First, we read the number of test cases and for each test case, we read the array.

2. **Calculate MEX**: We need a function to calculate the MEX (Minimum Excluded Value) of an array. This is the smallest non-negative integer that is not present in the array.

3. **Transform Array**: For each test case, we will transform the array into a non-decreasing sequence by performing operations where we replace an element with the current MEX until the array becomes non-decreasing.

4. **Output Results**: Finally, we output the number of operations performed and their respective indices for each test case.

Here's how you can implement this in Python:

```python
def read_input():
    import sys
    input = sys.stdin.read
    data = input().splitlines()
    
    t = int(data[0])  # number of test cases
    index = 1
    test_cases = []
    
    for _ in range(t):
        n = int(data[index])  # length of the array
        array = list(map(int, data[index + 1].split()))  # elements of the array
        test_cases.append((n, array))
        index += 2
    
    return test_cases

def calculate_mex(array):
    n = len(array)
    present = [False] * (n + 1)
    
    for num in array:
        if 0 <= num <= n:
            present[num] = True
    
    for mex in range(n + 1):
        if not present[mex]:
            return mex

def make_non_decreasing(test_cases):
    results = []
    
    for n, array in test_cases:
        operations = []
        
        while True:
            current_mex = calculate_mex(array)
            
            if current_mex < n:
                # If MEX is within bounds, replace that index with MEX
                if array[current_mex] != current_mex:
                    operations.append(current_mex + 1)  # Store index (1-based)
                    array[current_mex] = current_mex
                else:
                    # Find first incorrect position to replace
                    for i in range(n):
                        if array[i] != i:
                            operations.append(i + 1)
                            array[i] = current_mex
                            break
            else:
                # If MEX is out of bounds, find any incorrect position to replace
                found_incorrect_position = False
                for i in range(n):
                    if i > 0 and array[i] < array[i - 1]:
                        operations.append(i + 1)
                        array[i] = current_mex
                        found_incorrect_position = True
                        break
                
                if not found_incorrect_position:
                    break
        
        results.append((len(operations), operations))
    
    return results

def output_results(results):
    for k_ops, ops in results:
        print(k_ops)
        if ops:
            print(' '.join(map(str, ops)))
        else:
            print()  # Print an empty line if no operations were performed

# Main execution code (uncomment when running locally or during testing)
# test_cases = read_input()
# results = make_non_decreasing(test_cases)
# output_results(results)
```

This code reads input directly from standard input (as typically expected in competitive programming). It calculates the required transformations to make each provided list non-decreasing by making use of MEX values and outputs both the number of operations and their indices.