Karlsson has recently discovered a huge stock of berry jam jars in the basement of the house. More specifically, there were $2n$ jars of strawberry and blueberry jam.

All the $2n$ jars are arranged in a row. The stairs to the basement are exactly in the middle of that row. So when Karlsson enters the basement, he sees exactly $n$ jars to his left and $n$ jars to his right.

For example, the basement might look like this: [Image] 

Being the starightforward man he is, he immediately starts eating the jam. In one minute he chooses to empty either the first non-empty jar to his left or the first non-empty jar to his right.

Finally, Karlsson decided that at the end the amount of full strawberry and blueberry jam jars should become the same.

For example, this might be the result: [Image] He has eaten $1$ jar to his left and then $5$ jars to his right. There remained exactly $3$ full jars of both strawberry and blueberry jam. 

Jars are numbered from $1$ to $2n$ from left to right, so Karlsson initially stands between jars $n$ and $n+1$.

What is the minimum number of jars Karlsson is required to empty so that an equal number of full strawberry and blueberry jam jars is left?

Your program should answer $t$ independent test cases.


-----Input-----

The first line contains one integer $t$ ($1 \le t \le 1000$) — the number of test cases.

The first line of each test case contains a single integer $n$ ($1 \le n \le 10^5$).

The second line of each test case contains $2n$ integers $a_1, a_2, \dots, a_{2n}$ ($1 \le a_i \le 2$) — $a_i=1$ means that the $i$-th jar from the left is a strawberry jam jar and $a_i=2$ means that it is a blueberry jam jar.

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


-----Output-----

For each test case print the answer to it — the minimum number of jars Karlsson is required to empty so that an equal number of full strawberry and blueberry jam jars is left.


-----Example-----
Input
4
6
1 1 1 2 2 1 2 1 2 1 1 2
2
1 2 1 2
3
1 1 1 1 1 1
2
2 1 1 1

Output
6
0
6
2



-----Note-----

The picture from the statement describes the first test case.

In the second test case the number of strawberry and blueberry jam jars is already equal.

In the third test case Karlsson is required to eat all $6$ jars so that there remain $0$ jars of both jams.

In the fourth test case Karlsson can empty either the second and the third jars or the third and the fourth one. The both scenarios will leave $1$ jar of both jams.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'q = int(input())\nfor rwier in range(q):\n\tn = int(input())\n\tl = list(map(int,input().split()))\n\tj = l.count(1)\n\td = l.count(2)\n\tpr = [0] * n\n\tle = [0] * n\n\tpr[0] = (1 if l[n] == 1 else -1)\n\tle[0] = (1 if l[n-1] == 1 else -1)\n\tfor i in range(1, n):\n\t\tpr[i] = pr[i-1] + (1 if l[n+i] == 1 else -1)\n\t\tle[i] = le[i-1] + (1 if l[n-i-1] == 1 else -1)\n\t#print(pr,le)\n\tif j - d < 0:\n\t\tfor i in range(n):\n\t\t\tpr[i] = -pr[i]\n\t\t\tle[i] = -le[i]\n\tab = abs(j-d)\n\tif ab == 0:\n\t\tprint(0)\n\telse:\n\t\t#suma = abs\n\t\tnajwp = [123456789] * (2*n+1)\n\t\tnajwl = [123456789] * (2*n+1)\n\t\tle = [0] + le\n\t\tpr = [0] + pr\n\t\tfor i in range(n+1):\n\t\t\tif pr[i] >= 0 and najwp[pr[i]] == 123456789:\n\t\t\t\tnajwp[pr[i]] = i\n\t\t\tif le[i] >= 0 and najwl[le[i]] == 123456789:\n\t\t\t\tnajwl[le[i]] = i\n\t\twyn = 41343443143\n\t\tfor i in range(ab+1):\n\t\t\tif najwp[i] + najwl[ab-i] < wyn:\n\t\t\t\twyn = najwp[i] +najwl[ab-i]\n\t\tprint(wyn)\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13881