You are given a set $S$ and $Q$ queries. Initially, $S$ is empty. In each query:
- You are given a positive integer $X$.
- You should insert $X$ into $S$.
- For each $y \in S$ before this query such that $y \neq X$, you should also insert $y \oplus X$ into $S$ ($\oplus$ denotes the XOR operation).
- Then, you should find two values $E$ and $O$: the number of elements of $S$ with an even number of $1$-s and with an odd number of $1$-s in the binary representation, respectively.
Note that a set cannot have duplicate elements, so if you try to insert into $S$ an element that is already present in $S$, then nothing happens.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains a single integer $Q$.
- Each of the next $Q$ lines contains a single integer $X$ describing a query.

-----Output-----
For each query, print a single line containing two space-separated integers $E$ and $O$.

-----Constraints-----
- $1 \le T \le 5$
- $1 \le Q, X \le 10^5$

-----Subtasks-----
Subtask #1 (30 points):
- $1 \le Q \le 1,000$
- $1 \le X \le 128$
Subtask #2 (70 points): original constraints

-----Example Input-----
1
3
4
2
7

-----Example Output-----
0 1
1 2
3 4

-----Explanation-----
Example case 1:
- Initially, the set is empty: $S = \{\}$.
- After the first query, $S = \{4\}$, so there is only one element with an odd number of $1$-s in the binary representation ("100").
- After the second query, $S = \{4,2,6\}$, there is one element with an even number of $1$-s in the binary representation ($6$ is "110") and the other two elements have an odd number of $1$-s.
- After the third query, $S = \{4,2,6,7,3,5,1\}$.

```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 = 'import math\n\ndef countSetBits(n):\n count = 0\n while (n):\n  n &= (n - 1)\n  count += 1\n\n return count\n\na = int(input())\nwhile a!=0:\n mylist = list()\n b= int(input())\n count_even = 0\n count_odd = 0\n for j in range(b):\n\n  c = int(input())\n  t=0\n  for i in range(len(mylist)):\n   if(mylist[i] == c):\n    t=1\n    break\n  if(t == 0):\n   for i in range(len(mylist)):\n    if(mylist[i] != c):\n     p = mylist[i]^c\n     q = math.log2(p)\n     if(q == int(q)):\n      count_odd+=1\n     else:\n      if(countSetBits(p)%2 == 0):\n       count_even+=1\n      else:\n       count_odd+=1\n     mylist.append(p)\n    else:\n     mylist.append(c)\n   mylist.append(c)\n   p = math.log2(c)\n   if(p == int(p)):\n    count_odd+=1\n   else:\n    if(countSetBits(c)%2 ==0):\n     count_even+=1\n    else:\n     count_odd+=1\n  print(count_even,count_odd)\n\n\n\n\n\n\n a-=1\n\n\n\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13707