Polycarp had an array a of 3 positive integers. He wrote out the sums of all non-empty subsequences of this array, sorted them in non-decreasing order, and got an array b of 7 integers.

For example, if a = \{1, 4, 3\}, then Polycarp wrote out 1, 4, 3, 1 + 4 = 5, 1 + 3 = 4, 4 + 3 = 7, 1 + 4 + 3 = 8. After sorting, he got an array b = \{1, 3, 4, 4, 5, 7, 8\}.

Unfortunately, Polycarp lost the array a. He only has the array b left. Help him to restore the array a.

Input

The first line contains one integer t (1 ≤ t ≤ 5000) — the number of test cases.

Each test case consists of one line which contains 7 integers b_1, b_2, ..., b_7 (1 ≤ b_i ≤ 10^9; b_i ≤ b_{i+1}). 

Additional constraint on the input: there exists at least one array a which yields this array b as described in the statement.

Output

For each test case, print 3 integers — a_1, a_2 and a_3. If there can be several answers, print any of them.

Example

Input


5
1 3 4 4 5 7 8
1 2 3 4 5 6 7
300000000 300000000 300000000 600000000 600000000 600000000 900000000
1 1 2 999999998 999999999 999999999 1000000000
1 2 2 3 3 4 5


Output


1 4 3
4 1 2
300000000 300000000 300000000
999999998 1 1
1 2 2

Note

The subsequence of the array a is a sequence that can be obtained from a by removing zero or more of its elements.

Two subsequences are considered different if index sets of elements included in them are different. That is, the values of the elements don't matter in the comparison of subsequences. In particular, any array of length 3 has exactly 7 different non-empty subsequences.
1
69696868 69696868 69696868 139393736 139393736 139393736 209090604
 2
1 1 2 69696874 69696875 69696875 69696876
1 1 1 2 2 2 3
 1
1 1 2 69696880 69696881 69696881 69696882
 2
1 1 2 69696967 69696968 69696968 69696969
1 1 1 2 2 2 3
 2
1 1 2 69696868 69696869 69696869 69696870
1 2 3 4 5 6 7
 2
1 1 2 696967 696968 696968 696969
1 1 1 2 2 2 3
 2
1 1 2 69696873 69696874 69696874 69696875
1 1 1 2 2 2 3
 2
1 1 2 69696889 69696890 69696890 69696891
1 1 1 2 2 2 3
 1
1 2 3 69696875 69696876 69696877 69696878
 2
1 1 2 69696870 69696871 69696871 69696872
1 1 1 2 2 2 3
 2
1 1 2 69696881 69696882 69696882 69696883
1 1 1 2 2 2 3
 2
1 1 2 598989 598990 598990 598991
1 3 4 4 5 7 8
 2
1 1 2 69696875 69696876 69696876 69696877
1 1 1 2 2 2 3
 1
1 1 2 69696884 69696885 69696885 69696886
 1
1 1 2 69696883 69696884 69696884 69696885
 2
1 1 2 69696885 69696886 69696886 69696887
1 1 1 2 2 2 3
 2
1 1 2 69696879 69696880 69696880 69696881
1 1 1 2 2 2 3
 5
1 3 4 4 5 7 8
1 2 3 4 5 6 7
300000000 300000000 300000000 600000000 600000000 600000000 900000000
1 1 2 999999998 999999999 999999999 1000000000
1 2 2 3 3 4 5
 2
1 1 2 69696886 69696887 69696887 69696888
1 1 1 2 2 2 3
 2
1 1 2 69696869 69696870 69696870 69696871
1 1 1 2 2 2 3
 2
1 1 2 69696887 69696888 69696888 69696889
1 1 1 2 2 2 3
 2
1 1 2 69696877 69696878 69696878 69696879
1 1 1 2 2 2 3
 2
1 1 2 69696871 69696872 69696872 69696873
1 1 1 2 2 2 3
 2
1 1 2 69696882 69696883 69696883 69696884
1 1 1 2 2 2 3
 1
1 2 3 69696887 69696888 69696889 69696890
 2
1 1 2 69696872 69696873 69696873 69696874
1 1 1 2 2 2 3
 2
1 1 2 69696878 69696879 69696879 69696880
1 1 1 2 2 2 3

69696868 69696868 69696868 
 1 1 69696874
1 1 1
 1 1 69696880
 1 1 69696967
1 1 1
 1 1 69696868
1 2 4
 1 1 696967
1 1 1
 1 1 69696873
1 1 1
 1 1 69696889
1 1 1
 1 2 69696875
 1 1 69696870
1 1 1
 1 1 69696881
1 1 1
 1 1 598989
1 3 4
 1 1 69696875
1 1 1
 1 1 69696884
 1 1 69696883
 1 1 69696885
1 1 1
 1 1 69696879
1 1 1
 1 3 4
1 2 4
300000000 300000000 300000000
1 1 999999998
1 2 2
 1 1 69696886
1 1 1
 1 1 69696869
1 1 1
 1 1 69696887
1 1 1
 1 1 69696877
1 1 1
 1 1 69696871
1 1 1
 1 1 69696882
1 1 1
 1 2 69696887
 1 1 69696872
1 1 1
 1 1 69696878
1 1 1

//   package faltu;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
//import java.security.KeyStore.Entry;
import java.util.*;
import java.util.Map.Entry;

public class Main {
    static long LowerBound(long[] a2, long x) { // x is the target value or key
	  int l=-1,r=a2.length;
	  while(l+1<r) {
	    int m=(l+r)>>>1;
	    if(a2[m]>=x) r=m;
	    else l=m;
	  }
	  return r;
	}
    static int UpperBound(int a[], int x) {// x is the key or target value
	    int l=-1,r=a.length;
	    while(l+1<r) {
	       int m=(l+r)>>>1;
	       if(a[m]<=x) l=m;
	       else r=m;
	    }
	    return l+1;
    }
    public static long getClosest(long val1, long val2,long target)
	{
		if (target - val1 >= val2 - target)
		return val2;       
		else
		return val1;       
	}
    static void ruffleSort(long[] a) {
		int n=a.length;
		Random r=new Random();
		for (int i=0; i<a.length; i++) {
			long oi=r.nextInt(n), temp=a[i];
			a[i]=a[(int)oi];
			a[(int)oi]=temp;
		}
		Arrays.sort(a);
	}
    static void ruffleSort(int[] a) {
		int n=a.length;
		Random r=new Random();
		for (int i=0; i<a.length; i++) {
			int oi=r.nextInt(n), temp=a[i];
			a[i]=a[oi];
			a[oi]=temp;
		}
		Arrays.sort(a);
	}
    private int ceilIndex(int input[], int T[], int end, int s){
        int start = 0;
        int middle;
        int len = end;
        while(start <= end){
            middle = (start + end)/2;
            if(middle < len && input[T[middle]] < s && s <= input[T[middle+1]]){
                return middle+1;
            }else if(input[T[middle]] < s){
                start = middle+1;
            }else{
                end = middle-1;
            }
        }
        return -1;
    }
    public static int findIndex(long arr[], long t) 
    { 
        if (arr == null) { 
            return -1; 
        } 
        int len = arr.length; 
        int i = 0; 
        while (i < len) {
            if (arr[i] == t) { 
                return i; 
            } 
            else { 
                i = i + 1; 
            } 
        } 
        return -1; 
    }
    static long gcd(long a, long b)
    {
        if (a == 0)
            return b; 
        return gcd(b % a, a); 
    }
    static int gcd(int a, int b)
    {
        if (a == 0)
            return b; 
        return gcd(b % a, a); 
    }
    static long lcm(long a, long b)
    {
        return (a / gcd(a, b)) * b;
    }
 
    public static int[] swap(int a[], int left, int right)
    {
        int temp = a[left];
        a[left] = a[right];
        a[right] = temp;
        return a;
    }
    	public static void swap(int max0,int max1)
    {
    	int temp=max0;
    	max0=max1;
    	max1=temp;
    }
 
    	public static int[] reverse(int a[], int left, int right)
    {
 
        // Reverse the sub-array
        while (left < right) {
            int temp = a[left];
            a[left++] = a[right];
            a[right--] = temp;
        }
        return a;
    }
    	static class FastReader {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader()
        {
            br = new BufferedReader(
                new InputStreamReader(System.in));
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt() { return Integer.parseInt(next()); }
 
        long nextLong() { return Long.parseLong(next()); }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

//    *******----segement tree implement---*****
//    -------------START--------------------------
    	void buildTree (int[] arr,int[] tree,int start,int end,int treeNode)
    {
    	if(start==end)
    	{
    		tree[treeNode]=arr[start];
    		return;
    	}
    	buildTree(arr,tree,start,end,2*treeNode);
    	buildTree(arr,tree,start,end,2*treeNode+1);
    	tree[treeNode]=tree[treeNode*2]+tree[2*treeNode+1];
    }
    	void updateTree(int[] arr,int[] tree,int start,int end,int treeNode,int idx,int value)
    {
    	if(start==end)
    	{
    		arr[idx]=value;
    		tree[treeNode]=value;
    		return;
    	}
    	int mid=(start+end)/2;
    	if(idx>mid)
    	{
    		updateTree(arr,tree,mid+1,end,2*treeNode+1,idx,value);
    	}
    	else
    	{
    		updateTree(arr,tree,start,mid,2*treeNode,idx,value);
    	}
    	tree[treeNode]=tree[2*treeNode]+tree[2*treeNode+1];
    }
    	static int[][] dp;
//    	disjoint set implementation --start
        static void makeSet(int n)
        {
        	parent=new int[n];
        	rank=new int[n];
        	for(int i=0;i<n;i++)
        	{
        		parent[i]=i;
        		rank[i]=0;
        	}
        }
        static void union(int u,int v)
        {
        	u=findpar(u);
        	v=findpar(v);
        	if(rank[u]<rank[v])parent[u]=v;
        	else if(rank[v]<rank[u])parent[v]=u;
        	else 
        	{
        		parent[v]=u;
        		rank[u]++;
        	}
        }
        
    	private static int findpar(int node)
    	{	
    		if(node==parent[node])return node;
    		return parent[node]=findpar(parent[node]);
    	}
    	static int parent[];
        static int rank[];
//    	*************end
        static Long MOD=(long) (1e9+7);
        private static void solver(long[] a,int n)
        {
        	Arrays.sort(a);
        	for(int i=0;i<=2;i++)
        	{
        		System.out.print(a[i]+" ");
        		
        	}System.out.println();
        }
        public static void main(String[] args)
        {
        	FastReader s = new FastReader();
	        dp=new int[1001][1001];
	        long tt = s.nextLong();
	        while (tt-->0)
	        {
	        	int n=7;
	        	long[] a=new long[n];
	        	for(int i=0;i<n;i++)
	        	{
	        		a[i]=s.nextLong();
	        	}
	        	solver(a,n);
	        }
        }
        static long power1(long a,long b) {
    	    if(b == 0){
    	        return 1;
    	    }
    	    long ans = power(a,b/2);
    	    ans *= ans;
    	    if(b % 2!=0){
    	        ans *= a;
    	    }
    	    return ans;
    	}
        private static int lps(int m ,int n,String s1,String s2,int[][]mat)
        {
            for(int i=1;i<=m;i++)
            {
                for(int j=1;j<=n;j++)
                {
                    if(s1.charAt(i-1)==s2.charAt(j-1))mat[i][j]=1+mat[i-1][j-1];
                    else mat[i][j]=Math.max(mat[i-1][j],mat[i][j-1]);
                }
            }
            return mat[m][n];
        }
        static String lcs(String X, String Y, int m, int n)
        {
            int[][] L = new int[m+1][n+1];
       
            // Following steps build L[m+1][n+1] in bottom up fashion. Note
            // that L[i][j] contains length of LCS of X[0..i-1] and Y[0..j-1] 
            for (int i=0; i<=m; i++)
            {
                for (int j=0; j<=n; j++)
                {
                    if (i == 0 || j == 0)
                        L[i][j] = 0;
                    else if (X.charAt(i-1) == Y.charAt(j-1))
                        L[i][j] = L[i-1][j-1] + 1;
                    else
                        L[i][j] = Math.max(L[i-1][j], L[i][j-1]);
                }
            }
       
            // Following code is used to print LCS
            int index = L[m][n];
            int temp = index;
       
            // Create a character array to store the lcs string
            char[] lcs = new char[index+1];
            lcs[index] = '\u0000'; // Set the terminating character
       
            // Start from the right-most-bottom-most corner and
            // one by one store characters in lcs[]
            int i = m;
            int j = n;
            while (i > 0 && j > 0)
            {
                // If current character in X[] and Y are same, then
                // current character is part of LCS
                if (X.charAt(i-1) == Y.charAt(j-1))
                {
                    // Put current character in result
                    lcs[index-1] = X.charAt(i-1); 
                      
                    // reduce values of i, j and index
                    i--; 
                    j--; 
                    index--;     
                }
       
                // If not same, then find the larger of two and
                // go in the direction of larger value
                else if (L[i-1][j] > L[i][j-1])
                    i--;
                else
                    j--;
            }
            return String.valueOf(lcs);
            // Print the lcs
//            System.out.print("LCS of "+X+" and "+Y+" is ");
//            for(int k=0;k<=temp;k++)
//                System.out.print(lcs[k]);
        }
        static long lis(long[] aa2, int n)
        {
            long lis[] = new long[n];
            int i, j;
            long max = 0;
            for (i = 0; i < n; i++)
                lis[i] = 1;
            for (i = 1; i < n; i++)
                for (j = 0; j < i; j++)
                    if (aa2[i] >= aa2[j] && lis[i] <= lis[j] + 1)
                        lis[i] = lis[j] + 1;
            for (i = 0; i < n; i++)
                if (max < lis[i])
                    max = lis[i];
     
            return max;
        }
        static boolean isPalindrome(String str)
        {
            int i = 0, j = str.length() - 1;
            while (i < j) {
                if (str.charAt(i) != str.charAt(j))
                    return false;
                i++;
                j--;
            }
            return true;
        }
        static boolean issafe(int i, int j, int r,int c, char ch)
        {
			if (i < 0 || j < 0 || i >= r || j >= c|| ch!= '1')return false;
			else return true;
        }
        static long power(long a, long b)
        {
        	   a %=MOD;
        	    long out = 1;
        	    while (b > 0) {
        	        if((b&1)!=0)out = out * a % MOD;
        	        a = a * a % MOD;
        	        b >>= 1;
        			a*=a;
        	    }
        	    return out;
        }
        static long[] sieve;
   	 	public static void sieve()
   	    {
   	        int nnn=(int) 1e6+1;
   		    	long nn=(int) 1e6;
   		    	sieve=new long[(int) nnn];
   		    	int[] freq=new int[(int) nnn];
   		    	sieve[0]=0;
   		    	sieve[1]=1;
   		    	for(int i=2;i<=nn;i++)
   		    	{
   		    		sieve[i]=1;
   		    		freq[i]=1;
   		    	}
   		    	for(int i=2;i*i<=nn;i++)
   		    	{
   		    		if(sieve[i]==1)
   		    		{
   			    		for(int j=i*i;j<=nn;j+=i)
   			    		{
   			    			if(sieve[j]==1)
   			    			{
   			    				sieve[j]=0;
   			    			}
   			    		}
   		    		}
   		    	}
   	    }

}
class pair{
	long x,y;
	public pair(long x,long y)
	{
		this.x=x;
		this.y=y;
	}
}



