Alexandra has an even-length array $a$, consisting of $0$s and $1$s. The elements of the array are enumerated from $1$ to $n$. She wants to remove at most $\frac{n}{2}$ elements (where $n$ — length of array) in the way that alternating sum of the array will be equal $0$ (i.e. $a_1 - a_2 + a_3 - a_4 + \dotsc = 0$). In other words, Alexandra wants sum of all elements at the odd positions and sum of all elements at the even positions to become equal. The elements that you remove don't have to be consecutive.

For example, if she has $a = [1, 0, 1, 0, 0, 0]$ and she removes $2$nd and $4$th elements, $a$ will become equal $[1, 1, 0, 0]$ and its alternating sum is $1 - 1 + 0 - 0 = 0$.

Help her!


-----Input-----

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10^3$). Description of the test cases follows.

The first line of each test case contains a single integer $n$ ($2 \le n \le 10^3$, $n$ is even)  — length of the array.

The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($0 \le a_i \le 1$)  — elements of the array.

It is guaranteed that the sum of $n$ over all test cases does not exceed $10^3$.


-----Output-----

For each test case, firstly, print $k$ ($\frac{n}{2} \leq k \leq n$) — number of elements that will remain after removing in the order they appear in $a$. Then, print this $k$ numbers. Note that you should print the numbers themselves, not their indices.

We can show that an answer always exists. If there are several answers, you can output any of them. 


-----Example-----
Input
4
2
1 0
2
0 0
4
0 1 1 1
4
1 1 0 0

Output
1
0
1
0
2
1 1
4
1 1 0 0



-----Note-----

In the first and second cases, alternating sum of the array, obviously, equals $0$.

In the third case, alternating sum of the array equals $1 - 1 = 0$.

In the fourth case, alternating sum already equals $1 - 1 + 0 - 0 = 0$, so we don't have to remove anything.

Difficulty: interview

Starter code:

Solutions:
def solve():
    n = int(input())
    lst = list(map(int,input().split()))
    if sum(lst) <= n // 2:
        print(n//2)
        print("0 " * (n // 2))
    else:
        print(n//2 + (n // 2) % 2)
        print("1 " * (n//2 + (n // 2) % 2))
for i in range(int(input())):
    solve()

t = int(input())
for _ in range(t):
    n = int(input())
    l = list(map(int,input().split()))
    o = 0
    z = 0
    for i in range(n):
        if(l[i]): o+=1
        else: z+=1
    if(o>z):
        o-=o%2
        print(o)
        for i in range(o):
            print(1, end =" ")
    else:
        print(z)
        for i in range(z):
            print(0, end=" ")
    print()

#OM GANESHAY NAMH
#GANPATI BAPPA MORYA
import math,queue,heapq 
import sys 
sys.setrecursionlimit(10**6)
fastinput=sys.stdin.readline
fastout=sys.stdout.write
t=int(fastinput()) 
while t:
    t-=1
    n=int(fastinput()) 
    a=list(map(int,fastinput().split()))  
    c=a.count(1) 
    if c==0 or c==n:
        print(n)
        print(*a) 
    elif c<=n//2:
        print(n-c)
        print('0 '*(n-c)) 
    else:
        if c%2==0:
            print(c)
            print('1 '*c) 
        else:
            c-=1 
            print(c) 
            print('1 '*c)

t = int(input())
for _ in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    res = []
    for i in range(n // 2):
        if a[i * 2] == 1 and a[i * 2 + 1] == 1:
            res.append(1)
            res.append(1)
        elif a[i * 2] == 0 and a[i * 2 + 1] == 0:
            res.append(0)
            res.append(0)
        else:
            res.append(0)
    print(len(res))
    print(*res)

import sys
input = sys.stdin.readline

t=int(input())
for tests in range(t):
    n=int(input())
    A=list(map(int,input().split()))

    ZERO=A.count(0)
    if ZERO>=n//2:
        print(ZERO)
        print(*[0]*ZERO)
    else:
        ONE=n-ZERO
        print(ONE//2*2)
        print(*[1]*(ONE//2*2))

    


for _ in range(int(input())):
    n = int(input())
    arr = list(map(int, input().split()))

    a = arr.count(0)
    b = arr.count(1)

    if b > n // 2:
        print(b - b % 2)
        print(*[1 for _ in range(b - b % 2)])
    elif b == n // 2:
        print(a)
        print(*[0 for _ in range(a)])
    else:
        print(a - a % 2)
        print(*[0 for _ in range(a - a % 2)])


for i in ' '*(int(input())):
    n=int(input())
    L=list(map(int,input().split()))
    s=sum(L)
    if s*2>n:
        if (n//2)%2:
            print(n//2+1)
            for i in ' '*(n//2+1):print(1,end=' ')
        else:
            print(n//2)
            for i in ' '*(n//2):print(1,end=' ')
    else:
        print(n//2)
        for i in ' '*(n//2):print(0,end=' ')
    print()

from math import log2, ceil

def readGenerator():
    while True:
        tokens = input().split(' ')
        for t in tokens:
            yield t

reader = readGenerator()

def readWord():
    return next(reader)

def readInt():
    return int(next(reader))

def readFloat():
    return float(next(reader))

def readLine():
    return input()

def solve(a):
    v0, v1 = 0, 0
    for i in a:
        if i == 0:
            v0 += 1
        else:
            v1 += 1

    if v1 > v0:
        if v1 % 2 != 0:
            v1 -= 1
        print(v1)
        return '1 ' * v1
    print(v0)
    return '0 ' * v0


tests = readInt()

for i in range(tests):
    n = readInt()
    a = [readInt() for _ in range(n)]
    print(solve(a))

def solve():
    n = int(input())
    a = list(map(int, input().split()))
    if a.count(0) >= n // 2:
        print(n // 2)
        print(' '.join('0' * (n // 2)))
    else:
        m = n // 2
        if m % 2 == 1:
            m += 1
        print(m)
        print(' '.join('1' * (m)))
t = int(input())
for _ in range(t):
    solve()

t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(j) for j in input().split()]

	o = arr.count(1)
	z = arr.count(0)

	if o > z:
		if (n-z)%2 == 1:
			print(n-z-1)
			print(*([1]*(n-z-1)))
		else:
			print(n-z)
			print(*([1]*(n-z)))
	else:
		print(n-o)
		print(*([0]*(n-o)))

for _ in range(int(input())):
    n = int(input())
    l = list(map(int,input().split()))
    one = l.count(1)
    zero = n-one
    if zero>=n//2:
        print(zero)
        print(*[0]*zero)
    else:
        one -= one%2
        print(one)
        print(*[1]*one)


from sys import stdin

tt = int(stdin.readline())

for loop in range(tt):

    n = int(stdin.readline())
    a = list(map(int,stdin.readline().split()))

    z = 0
    o = 0
    ans = []

    for i in a:
        if i == 0:
            z += 1
        else:
            o += 1

        if z == 2:
            z = 0
            o = 0
            ans.append(0)
            ans.append(0)

        elif o == 2:
            z = 0
            o = 0
            ans.append(1)
            ans.append(1)

    if z > 0:
        ans.append(0)
    
    print(len(ans))
    print(*ans)


for _ in range(int(input())):
    n=int(input())
    a=list(map(int,input().split()))
    if a.count(0)>=n//2:
        print(n//2)
        print(*[0]*(n//2))
    else:
        if (n//2)%2==0:
            print(n//2)
            print(*[1]*(n//2))
        else:
            print(n//2+1)
            print(*[1]*(n//2+1))


import sys

def input():
	return sys.stdin.readline().rstrip()

def input_split():
	return [int(i) for i in input().split()]

testCases = int(input())
answers = []
for _ in range(testCases):
	#take input
	n = int(input())
	arr = input_split()

	s = sum(arr)

	if s <= n//2:
		ans = [0]*(n//2)
	else:
		#num of ones is greater than equal to n//2
		if n%4 == 0:
			ans = [1]*(n//2)
		else:
			ans = [1]*((n//2) + 1)
		# ans = [1]*()

	answers.append(ans)
for ans in answers:
	print(len(ans))
	print(*ans, sep = ' ')