------
## 最终结论
```python
def make_good_array(t, test_cases):
    results = []
    for i in range(t):
        n, a = test_cases[i]
        total_sum = sum(a)
        xor_sum = 0
        for num in a:
            xor_sum ^= num
        
        if total_sum == 2 * xor_sum:
            results.append((0, []))
        else:
            new_element1 = xor_sum
            new_total_sum = total_sum + new_element1
            new_xor_sum = xor_sum ^ new_element1
            new_element2 = new_total_sum
            results.append((2, [new_element1, new_element2]))
    
    return results

# Example usage:
t = 3
test_cases = [
    (4, [1, 2, 3, 6]),
    (1, [8]),
    (2, [1, 1])
]

results = make_good_array(t, test_cases)
for result in results:
    s, elements = result
    print(s)
    if s > 0:
        print(' '.join(map(str, elements)))
```