Polycarp has $n$ different binary words. A word called binary if it contains only characters '0' and '1'. For example, these words are binary: "0001", "11", "0" and "0011100".

Polycarp wants to offer his set of $n$ binary words to play a game "words". In this game, players name words and each next word (starting from the second) must start with the last character of the previous word. The first word can be any. For example, these sequence of words can be named during the game: "0101", "1", "10", "00", "00001".

Word reversal is the operation of reversing the order of the characters. For example, the word "0111" after the reversal becomes "1110", the word "11010" after the reversal becomes "01011".

Probably, Polycarp has such a set of words that there is no way to put them in the order correspondent to the game rules. In this situation, he wants to reverse some words from his set so that:  the final set of $n$ words still contains different words (i.e. all words are unique);  there is a way to put all words of the final set of words in the order so that the final sequence of $n$ words is consistent with the game rules. 

Polycarp wants to reverse minimal number of words. Please, help him.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 10^4$) — the number of test cases in the input. Then $t$ test cases follow.

The first line of a test case contains one integer $n$ ($1 \le n \le 2\cdot10^5$) — the number of words in the Polycarp's set. Next $n$ lines contain these words. All of $n$ words aren't empty and contains only characters '0' and '1'. The sum of word lengths doesn't exceed $4\cdot10^6$. All words are different.

Guaranteed, that the sum of $n$ for all test cases in the input doesn't exceed $2\cdot10^5$. Also, guaranteed that the sum of word lengths for all test cases in the input doesn't exceed $4\cdot10^6$.


-----Output-----

Print answer for all of $t$ test cases in the order they appear.

If there is no answer for the test case, print -1. Otherwise, the first line of the output should contain $k$ ($0 \le k \le n$) — the minimal number of words in the set which should be reversed. The second line of the output should contain $k$ distinct integers — the indexes of the words in the set which should be reversed. Words are numerated from $1$ to $n$ in the order they appear. If $k=0$ you can skip this line (or you can print an empty line). If there are many answers you can print any of them.


-----Example-----
Input
4
4
0001
1000
0011
0111
3
010
101
0
2
00000
00001
4
01
001
0001
00001

Output
1
3 
-1
0

2
1 2

```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 = 'N = int(input())\n\ndef ceildiv(x, y):\n    if x % y == 0:\n        return x // y\n    else:\n        return x // y + 1\n\nfor _ in range(N):\n    doms = []\n    oc, zc = 0, 0\n    n = int(input())\n\n    used = set()\n    fulls = dict()\n\n    for i in range(n):\n        d = input()\n        used.add(d)\n        if d[0] != d[-1]:\n            fulls[i] = d\n            doms.append((i, (d[0], d[-1])))\n        else:\n            if d[0] == \'0\':\n                zc = 1\n            else:\n                oc = 1\n\n    if len(doms) == 0:\n        if zc == 1 and oc == 1:\n            print(-1)\n        else:\n            print(0)\n    else:\n        # print(doms)\n\n        _01 = 0\n        _10 = 0\n\n        _01_indexes = []\n        _10_indexes = []\n\n\n        for dom in doms:\n            if dom[1] == (\'0\', \'1\'):\n                _01 += 1\n                _01_indexes.append(dom[0])\n            else:\n                _10 += 1\n                _10_indexes.append(dom[0])\n\n        if _10 < _01:\n            _01, _10 = _10, _01\n            _01_indexes, _10_indexes = _10_indexes, _01_indexes\n\n        _10_indexes = [x for x in _10_indexes if fulls[x][::-1] not in used] \n\n        need = ceildiv(_10-_01-1, 2)\n        if len(_10_indexes) >= need:\n            print(need)\n            print( \' \'.join(list([str(x+1) for x in _10_indexes[:need]])) )\n        else:\n            print(-1)\n\n    # print("===")\n        # print(ceil(abs(doms.count((\'0\', \'1\')) - doms.count((\'1\', \'0\'))) - 1, 2))\n\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13743