You are given array a_1, a_2, …, a_n, consisting of non-negative integers.

Let's define operation of "elimination" with integer parameter k (1 ≤ k ≤ n) as follows:

  * Choose k distinct array indices 1 ≤ i_1 < i_2 < … < i_k ≤ n. 
  * Calculate x = a_{i_1} ~ \& ~ a_{i_2} ~ \& ~ … ~ \& ~ a_{i_k}, where \& denotes the [bitwise AND operation](https://en.wikipedia.org/wiki/Bitwise_operation#AND) (notes section contains formal definition). 
  * Subtract x from each of a_{i_1}, a_{i_2}, …, a_{i_k}; all other elements remain untouched. 



Find all possible values of k, such that it's possible to make all elements of array a equal to 0 using a finite number of elimination operations with parameter k. It can be proven that exists at least one possible k for any array a.

Note that you firstly choose k and only after that perform elimination operations with value k you've chosen initially.

Input

Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 10^4). Description of the test cases follows.

The first line of each test case contains one integer n (1 ≤ n ≤ 200 000) — the length of array a.

The second line of each test case contains n integers a_1, a_2, …, a_n (0 ≤ a_i < 2^{30}) — array a itself.

It's guaranteed that the sum of n over all test cases doesn't exceed 200 000.

Output

For each test case, print all values k, such that it's possible to make all elements of a equal to 0 in a finite number of elimination operations with the given parameter k.

Print them in increasing order.

Example

Input


5
4
4 4 4 4
4
13 7 25 19
6
3 5 3 1 7 1
1
1
5
0 0 0 0 0


Output


1 2 4
1 2
1
1
1 2 3 4 5

Note

In the first test case:

  * If k = 1, we can make four elimination operations with sets of indices \{1\}, \{2\}, \{3\}, \{4\}. Since \& of one element is equal to the element itself, then for each operation x = a_i, so a_i - x = a_i - a_i = 0. 
  * If k = 2, we can make two elimination operations with, for example, sets of indices \{1, 3\} and \{2, 4\}: x = a_1 ~ \& ~ a_3 = a_2 ~ \& ~ a_4 = 4 ~ \& ~ 4 = 4. For both operations x = 4, so after the first operation a_1 - x = 0 and a_3 - x = 0, and after the second operation — a_2 - x = 0 and a_4 - x = 0. 
  * If k = 3, it's impossible to make all a_i equal to 0. After performing the first operation, we'll get three elements equal to 0 and one equal to 4. After that, all elimination operations won't change anything, since at least one chosen element will always be equal to 0. 
  * If k = 4, we can make one operation with set \{1, 2, 3, 4\}, because x = a_1 ~ \& ~ a_2 ~ \& ~ a_3 ~ \& ~ a_4 = 4. 



In the second test case, if k = 2 then we can make the following elimination operations:

  * Operation with indices \{1, 3\}: x = a_1 ~ \& ~ a_3 = 13 ~ \& ~ 25 = 9. a_1 - x = 13 - 9 = 4 and a_3 - x = 25 - 9 = 16. Array a will become equal to [4, 7, 16, 19]. 
  * Operation with indices \{3, 4\}: x = a_3 ~ \& ~ a_4 = 16 ~ \& ~ 19 = 16. a_3 - x = 16 - 16 = 0 and a_4 - x = 19 - 16 = 3. Array a will become equal to [4, 7, 0, 3]. 
  * Operation with indices \{2, 4\}: x = a_2 ~ \& ~ a_4 = 7 ~ \& ~ 3 = 3. a_2 - x = 7 - 3 = 4 and a_4 - x = 3 - 3 = 0. Array a will become equal to [4, 4, 0, 0]. 
  * Operation with indices \{1, 2\}: x = a_1 ~ \& ~ a_2 = 4 ~ \& ~ 4 = 4. a_1 - x = 4 - 4 = 0 and a_2 - x = 4 - 4 = 0. Array a will become equal to [0, 0, 0, 0]. 



Formal definition of bitwise AND:

Let's define bitwise AND (\&) as follows. Suppose we have two non-negative integers x and y, let's look at their binary representations (possibly, with leading zeroes): x_k ... x_2 x_1 x_0 and y_k ... y_2 y_1 y_0. Here, x_i is the i-th bit of number x, and y_i is the i-th bit of number y. Let r = x ~ \& ~ y is a result of operation \& on number x and y. Then binary representation of r will be r_k ... r_2 r_1 r_0, where:

$$$ r_i = \begin{cases} 1, ~ if ~ x_i = 1 ~ and ~ y_i = 1 \\\ 0, ~ if ~ x_i = 0 ~ or ~ y_i = 0 \end{cases} $$$
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class Solve {

	static long MOD = 998244353L;
	static long INF = 1000_000_000_000_000L + 100;
	static boolean isPrime[];

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner();
		PrintWriter pw = new PrintWriter(System.out);

		int t = sc.nextInt();
		while (t-- > 0) {
			int n = sc.nextInt();
			int a[] = sc.nextIntArray(n);

			int[] freq = new int[32];
			for (int i = 0; i < n; i++) {
				int element = a[i];
				String binary = Integer.toBinaryString(element);
				for (int j = 0; j < binary.length(); j++)
					if (binary.charAt(j) == '1')
						freq[j]++;

			}
			ArrayList<Integer> ans = new ArrayList<Integer>();
			for (int k = 1; k <= n; k++) {
				boolean ok = true;

				for (int i = 0; i <= 31; i++) {
					if (freq[i] % k != 0) {
						ok = false;

					}

				}
				if (ok) {
					ans.add(k);
				}

			}

			for (int i : ans)
				pw.print(i + " ");

			pw.println();

		}
		pw.flush();

	}

	static int LowerBound(int a[], int x, int start) { // x is the target value or key
		int ans = -1;

		int l = start, r = a.length;
		while (l + 1 < r) {
			System.out.println("lolk");

			int m = (l + r) >>> 1;
			if (a[m] >= x) {
				ans = m;
				r = m;
			} else
				l = m;
		}
		return ans;
	}

	static int UpperBound(int a[], int x, int start) {// x is the key or target value
		int ans = -1;

		int l = start, r = a.length;
		while (l + 1 < r) {
			int m = (l + r) >>> 1;
			if (a[m] <= x) {
				ans = m;
				l = m;
			} else
				r = m;
		}
		return ans;
	}

	static public boolean[] sieve(int n) {
		boolean prime[] = new boolean[n + 1];
		for (int i = 0; i <= n; i++)
			prime[i] = true;

		for (int p = 2; p * p <= n; p++) {
			// If prime[p] is not changed, then it is a
			// prime
			if (prime[p] == true) {
				// Update all multiples of p
				for (int i = p * p; i <= n; i += p)
					prime[i] = false;
			}
		}
		return prime;

	}

	public static ArrayList<Integer> primeFactors(int n) {
		ArrayList<Integer> set = new ArrayList<Integer>();

		// Print the number of 2s that divide n
		while (n % 2 == 0) {
			n /= 2;
			set.add(2);
		}

		// n must be odd at this point. So we can
		// skip one element (Note i = i +2)
		for (int i = 3; i * i <= n; i += 2) {
			// While i divides n, print i and divide n
			while (n % i == 0) {
				n /= i;
				set.add(i);
			}
		}

		if (n > 1)
			set.add(n);

		return set;

	}

	static int gcd(int a, int b) {
		if (a == 0)
			return b;
		if (b == 0)
			return a;

		return gcd(b, a % b);

	}

	public static int[] swap(int data[], int left, int right) {

		// Swap the data
		int temp = data[left];
		data[left] = data[right];
		data[right] = temp;

		// Return the updated array
		return data;
	}

	public static long[] euclidExtended(long a, long b) {
		if (b == 0) {
			long ar[] = new long[] { 1, 0 };
			return ar;
		}
		long ar[] = euclidExtended(b, a % b);
		long temp = ar[0];
		ar[0] = ar[1];
		ar[1] = temp - (a / b) * ar[1];
		return ar;
	}

	public static long modInverse(long a, long m) {
		long ar[] = euclidExtended(a, m);
		return ((ar[0] % m) + m) % m;
	}

	// Fermat Theorem
	public static long ncr(int n, int r, long[] fact) {
		if (n == r)
			return 1;
		if (r == 1)
			return n;
		if (n == 0 || r == 0)
			return 1;
		return (fact[n] * modInverse(((long) fact[n - r]) * fact[r], MOD)) % MOD;
	}

	static void sort(int[] a) {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}

}

class Pair {
	int x, y;

	Pair(int x, int y) {
		this.x = x;
		this.y = y;
	}

}

class SegTree {
	int leftmost, rightmost, sum;
	SegTree lChild, rChild;

	public SegTree(int leftmost, int rightmost) {
		this.leftmost = leftmost;
		this.rightmost = rightmost;
	}

	public void update(int index, int val) {
		sum++;
		if (leftmost == rightmost) {
			return;
		}
		if (lChild == null)
			makeKids();
		if (index <= lChild.rightmost)
			lChild.update(index, val);
		else
			rChild.update(index, val);
	}

	public void makeKids() {
		int mid = (leftmost + rightmost) / 2;
		lChild = new SegTree(leftmost, mid);
		rChild = new SegTree(mid + 1, rightmost);
	}

	public int query(int l, int r) {
		if (l <= leftmost && r >= rightmost)
			return sum;
		if (l > rightmost || r < leftmost)
			return 0;
		if (lChild == null)
			return 0;
		return lChild.query(l, r) + rChild.query(l, r);
	}
}

class UnionFind {
	int[] p, rank, setSize;
	int numSets;

	public UnionFind(int N) {
		p = new int[numSets = N];
		rank = new int[N];
		setSize = new int[N];
		for (int i = 0; i < N; i++) {
			p[i] = i;
			setSize[i] = 1;
		}
	}

	public int findSet(int i) {
		return p[i] == i ? i : (p[i] = findSet(p[i]));
	}

	public boolean isSameSet(int i, int j) {
		return findSet(i) == findSet(j);
	}

	public void unionSet(int i, int j) {
		if (isSameSet(i, j))
			return;
		numSets--;
		int x = findSet(i), y = findSet(j);
		if (rank[x] > rank[y]) {
			p[y] = x;
			setSize[x] += setSize[y];
		} else {
			p[x] = y;
			setSize[y] += setSize[x];
			if (rank[x] == rank[y])
				rank[y]++;
		}
	}

	public int numDisjointSets() {
		return numSets;
	}

	public int sizeOfSet(int i) {
		return setSize[findSet(i)];
	}
}

class Scanner {
	BufferedReader br;
	StringTokenizer st;

	Scanner() {
		br = new BufferedReader(new InputStreamReader(System.in));
	}

	String next() throws IOException {
		while (st == null || !st.hasMoreElements())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(next());
	}

	int[] nextIntArray(int n) throws NumberFormatException, IOException {
		int a[] = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = Integer.parseInt(next());
		return a;
	}

	long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(next());
	}

	long[] nextLongArray(int n) throws NumberFormatException, IOException {
		long a[] = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = Long.parseLong(next());
		return a;
	}

	double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(next());
	}
}