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.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
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.PriorityQueue;
import java.util.Queue;
import java.util.Set;
import java.util.stream.Stream;

public class CasimirString {
	
	static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

	
	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub

		int cases = Integer.parseInt(reader.readLine());
    	
    	while(cases-- > 0) {
    		
    		String[] firstLine = reader.readLine().split(" ");
    		int n = Integer.parseInt(firstLine[0]);
    		
    		Integer[] arr = convertToIntArray(reader.readLine().split(" "));
    		List<Integer> ans = new ArrayList<>();
    		
    		if(arr.length%2 == 0) {
    			ans.addAll(func(arr, 0));
    		}else {
    			
    			int a1 = arr[0]+arr[1];
    			int a2 = arr[1]+arr[2];
    			int a3 = arr[0]+arr[2];
    			
    			//System.out.println(a1 + " " + a2 + " " + a3);
    			
    			if(a1 != 0) {
    				if((a1 > 0 && arr[2] > 0) || (a1<0 && arr[2]<0)) {
    					ans.add(-1*arr[2]);
    					ans.add(-1*arr[2]);
    					ans.add(a1);
    				}else {
    					ans.add(Math.abs(arr[2]));
    					ans.add(Math.abs(arr[2]));
    					ans.add(Math.abs(a1));
    				}
    			}else if(a2 != 0) {
    				
    				if((a2 > 0 && arr[0] > 0) || (a2<0 && arr[0]<0)) {
    					ans.add(a2);
    					ans.add(-1*arr[0]);
    					ans.add(-1*arr[0]);
    				}else {
    					ans.add(Math.abs(a2));
    					ans.add(Math.abs(arr[0]));
    					ans.add(Math.abs(arr[0]));
    				}
    				
    			}else if(a3 != 0) {
    				
    				if((a3 > 0 && arr[1] > 0) || (a3<0 && arr[1]<0)) {
    					ans.add(-1*arr[1]);
    					ans.add(a1);
    					ans.add(-1*arr[1]);
    				}else {
    					ans.add(Math.abs(arr[1]));
    					ans.add(Math.abs(a3));
    					ans.add(Math.abs(arr[1]));
    				}
    				
    			}
    			
    			ans.addAll(func(arr, 3));
    			
    		}
    		
    		for(int num: ans) {
    			out.append(num + " ");
    		}
    		out.append("\n");
    	}
    	
    	out.flush();
	
	}
	
	public static List<Integer> func(Integer[] arr, int index) {
		
		List<Integer> list = new ArrayList<>();
		for(int i=index;i<arr.length;i+=2) {
			
			if((arr[i] > 0 && arr[i+1] > 0) || (arr[i] < 0 && arr[i+1] < 0)) {
				list.add(-1*arr[i+1]);
				list.add(arr[i]);
			}else {
				list.add(Math.abs(arr[i+1]));
				list.add(Math.abs(arr[i]));
			}
			
		}
		return list;
		
	}
	

	public static Integer[] convertToIntArray(String[] str) {
		Integer[] arr = new Integer[str.length];
	    for(int i=0;i<str.length;i++) {
	    	arr[i] = Integer.parseInt(str[i]);
	    }
	    return arr;
	}
	
	public static Long[] convertToLongArray(String[] str) {
		Long[] arr = new Long[str.length];
	    for(int i=0;i<str.length;i++) {
	    	arr[i] = Long.parseLong(str[i]);
	    }
	    return arr;
	}
	
	public static void printYes() throws IOException {
		out.append("YES" + "\n");
	}
	
	public static void printNo() throws IOException {
		out.append("NO" + "\n");
	}
	
	public static void printNumber(long num) throws IOException {
		out.append(num + "\n");
	}
	
	public static long hcf(long a, long b) {
		if(b==0) return a;
		return hcf(b, a%b);
	}
	
	public static int findSet(int[] parent, int[] rank, int v) {
        if(v==parent[v]) {
            return v;
        }
        parent[v] = findSet(parent, rank, parent[v]);
        return parent[v];
    }
    
    public static void unionSet(int[] parent, int[] rank, int a, int b) {
        
        a = findSet(parent, rank, a);
        b = findSet(parent, rank, b);
        
        if(a == b) {
            return;
        }
        
        if(rank[a] < rank[b]) {
            int temp = a;
            a = b;
            b = temp;
        }
        
        parent[b] = a;
        if(rank[a] == rank[b]) {
            rank[a]++;
        }
        
    }
    
    public static void makeSet(int[] parent, int[] rank, int v) {
        parent[v] = v;
        rank[v] = 0;
    }

}
