Vupsen and Pupsen were gifted an integer array. Since Vupsen doesn't like the number 0, he threw away all numbers equal to 0 from the array. As a result, he got an array a of length n.

Pupsen, on the contrary, likes the number 0 and he got upset when he saw the array without zeroes. To cheer Pupsen up, Vupsen decided to come up with another array b of length n such that ∑_{i=1}^{n}a_i ⋅ b_i=0. Since Vupsen doesn't like number 0, the array b must not contain numbers equal to 0. Also, the numbers in that array must not be huge, so the sum of their absolute values cannot exceed 10^9. Please help Vupsen to find any such array b!

Input

The first line contains a single integer t (1 ≤ t ≤ 100) — the number of test cases. The next 2 ⋅ t lines contain the description of test cases. The description of each test case consists of two lines.

The first line of each test case contains a single integer n (2 ≤ n ≤ 10^5) — the length of the array.

The second line contains n integers a_1, a_2, …, a_n (-10^4 ≤ a_i ≤ 10^4, a_i ≠ 0) — the elements of the array a.

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

Output

For each test case print n integers b_1, b_2, …, b_n — elements of the array b (|b_1|+|b_2|+… +|b_n| ≤ 10^9, b_i ≠ 0, ∑_{i=1}^{n}a_i ⋅ b_i=0).

It can be shown that the answer always exists.

Example

Input


3
2
5 5
5
5 -2 10 -9 4
7
1 2 3 4 5 6 7


Output


1 -1
-1 5 1 -1 -1
-10 2 2 -3 5 -1 -1

Note

In the first test case, 5 ⋅ 1 + 5 ⋅ (-1)=5-5=0. You could also print 3 -3, for example, since 5 ⋅ 3 + 5 ⋅ (-3)=15-15=0

In the second test case, 5 ⋅ (-1) + (-2) ⋅ 5 + 10 ⋅ 1 + (-9) ⋅ (-1) + 4 ⋅ (-1)=-5-10+10+9-4=0.
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Stack;
import java.util.TreeMap;
import java.util.TreeSet;

public class Main {
	int t,a,b,c,i,j,n,k,u,v,w,x,l,r,ans,pre,gcd;
	int[]p=new int[100005];
	int gcd(int a,int b) {
		if(b==0)return a;
		return gcd(b,a%b);
	}
	boolean book;
	void o() {
		if(book)out.print(" ");
		else book=true;
	}
	void run(String[]args) throws IOException{
//		Scanner in=new Scanner(System.in);
		t=in();
		while(t-->0)
		{
			n=in();
			pre=0;
			i=0;
			book=false;
			if(n%2==1) {
				a=in();
				b=in();
				c=in();
				i+=3;
				if(Math.abs(a)==Math.abs(b)&&Math.abs(b)==Math.abs(c)) {
					o();
					if(a>0)out.print(1);
					else out.print(-1);
					o();
					if(b>0)out.print(1);
					else out.print(-1);
					o();
					if(c>0)out.print(-2);
					else out.print(2);
				}else if(Math.abs(a)!=Math.abs(b)) {
					p[0]=1;
					if(a*b>0) {
						p[1]=-1;
						pre=a-b;
					}else {
						p[1]=1;
						pre=a+b;
					}
					if(pre*c>0) {
						p[2]=-1;
					}else {
						p[2]=1;
					}
					pre=Math.abs(pre);
					c=Math.abs(c);
					gcd=gcd(pre,c);
					pre/=gcd;
					c/=gcd;
					o();
					out.print(p[0]*c);
					o();
					out.print(p[1]*c);
					o();
					out.print(p[2]*pre);
				}else if(Math.abs(b)!=Math.abs(c)) {
					p[1]=1;
					if(b*c>0) {
						p[2]=-1;
						pre=b-c;
					}else {
						p[2]=1;
						pre=b+c;
					}
					if(pre*a>0) {
						p[0]=-1;
					}else {
						p[0]=1;
					}
					pre=Math.abs(pre);
					a=Math.abs(a);
					gcd=gcd(pre,a);
					pre/=gcd;
					a/=gcd;
					o();
					out.print(p[0]*pre);
					o();
					out.print(p[1]*a);
					o();
					out.print(p[2]*a);
				}else if(Math.abs(a)!=Math.abs(c)) {
					p[0]=1;
					if(c*b>0) {
						p[2]=-1;
						pre=a-c;
					}else {
						p[2]=1;
						pre=a+c;
					}
					if(pre*b>0) {
						p[1]=-1;
					}else {
						p[1]=1;
					}
					pre=Math.abs(pre);
					b=Math.abs(b);
					gcd=gcd(pre,b);
					pre/=gcd;
					b/=gcd;
					o();
					out.print(p[0]*b);
					o();
					out.print(p[1]*pre);
					o();
					out.print(p[2]*b);
				}
			}
			for(;i<n;i+=2)
			{
				a=in();
				b=in();
				p[i]=1;
				if(a*b>0) {
					p[i+1]=-1;
				}else {
					p[i+1]=1;
				}
				a=Math.abs(a);
				b=Math.abs(b);
				gcd=gcd(a,b);
				a/=gcd;
				b/=gcd;
				o();
				out.print(b*p[i]);
				o();
				out.print(a*p[i+1]);
			}
			out.println();
		}
		out.flush();
	}
	public static void main(String[]args) throws IOException {
		new Main().run(args);
	}
	StreamTokenizer in=new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
	PrintWriter out=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	double ind() throws IOException {
		in.nextToken();
		return in.nval;
	}
	int in() throws IOException {
		in.nextToken();
		return(int)in.nval;
	}
	long inl() throws IOException {
		in.nextToken();
		return(long)in.nval;
	}
	String ins()throws IOException{
		in.nextToken();
		return in.sval;
	}
	class graph{
		int[]to,nxt,head;
		int cnt;
		void init(int n) {
			cnt=1;
			for(int i=1;i<=n;i++)
			{
				head[i]=0;
			}
		}
		public graph(int n) {
			to=new int[n<<1];
			nxt=new int[n<<1];
			head=new int[n];
			cnt=1;
		}
		void add(int u,int v) {
			to[cnt]=v;
			nxt[cnt]=head[u];
			head[u]=cnt++;
		}
	}
}
