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


 //   * * * the goal is to be worlds best * * *   //
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.util.*;

  
 
 public class A {
     static class Pair implements Comparable<Pair>{
         int a;
         int b;
 
         Pair(int a , int b){
             this.a = a;
             this.b = b;
         }
 
         public int compareTo(Pair o){
             return this.a - o.a;
         }
     }
     public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        int t = sc.nextInt();
        while(t-->0){
            int b[] = sc.readArray(7);
            for(int i = 0; i < 3; i++){
                System.out.print(b[i] + " ");
            }
            System.out.println();
        }
     }
    static long sum(long n){
        long temp = n;
        long sum = 0;
        while(temp > 0){
            sum += temp % 10;
            temp /= 10;
        }

        return sum;
     }
     // Use this instead of Arrays.sort() on an array of ints. Arrays.sort() is n^2
     // worst case since it uses a version of quicksort. Although this would never
     // actually show up in the real world, in codeforces, people can hack, so
     // this is needed.
     static void ruffleSort(int[] a) {
         //ruffle
         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;
         }
         
         //then sort
         Arrays.sort(a);
     }
     
     // Use this to input code since it is faster than a Scanner
     static class FastScanner {
         BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st=new StringTokenizer("");
         String next() {
             while (!st.hasMoreTokens())
                 try {
                     st=new StringTokenizer(br.readLine());
                 } catch (IOException e) {
                     e.printStackTrace();
                 }
             return st.nextToken();
         }
         
         int nextInt() {
             return Integer.parseInt(next());
         }
 
         double nextDouble() {
             return Double.parseDouble(next());
         }
  
         String str = "";
  
         String nextLine() {
             try {
                 str = br.readLine();
             } catch (IOException e) {
                 e.printStackTrace();
             }
             return str;
         }
  
         int[] readArray(int n) {
             int[] a = new int[n];
             for (int i = 0; i < n; i++)
                 a[i] = nextInt();
             return a;
         }
  
         long[] readLongArray(int n) {
             long[] a = new long[n];
             for (int i = 0; i < n; i++)
                 a[i] = nextLong();
             return a;
         }
         long nextLong() {
             return Long.parseLong(next());
         }
     }
     // use this to find the index of any element in the array +1 /// 
     // returns an array that corresponds to the index of the i+1th in the array a[]
     // runs only for array containing different values enclosed btw 0 to n-1
     static int[] indexOf(int[] a) {
         int[] toRet=new int[a.length];
         for (int i=0; i<a.length; i++) {
             toRet[a[i]]=i+1;
         }
         return toRet;
     }
 
     static long gcd(long n, long l) {
         if (l==0) return n;
         return gcd(l, n%l);
     }
 
     //generates all the prime numbers upto n
     static void sieveOfEratosthenes(int n , ArrayList<Integer> al)
     {
         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] == true) 
             {
                 for (int i = p * p; i <= n; i += p)
                     prime[i] = false;
             }
         }
         for (int i = 2; i <= n; i++)
         {
             if (prime[i] == true)
                 al.get(i);
         }
     }
     static final int mod = 100000000 + 7;
     static final int max_val = 2147483647;
     static final int min_val = max_val + 1;
     
     //fastPow
     static long fastPow(long base, long exp) {
         if (exp==0) return 1;
         long half=fastPow(base, exp/2);
         if (exp%2==0) return mul(half, half);
         return mul(half, mul(half, base));
     }
 
     //multiply two long numbers
     static long mul(long a, long b) {
         return a*b%mod;
     }
 
     static int nCr(int n, int r)
     {
            return fact(n) / (fact(r) *
                 fact(n - r));
     }
     
     // Returns factorial of n
     static int fact(int n)
     {
         int res = 1;
         for (int i = 2; i <= n; i++)
             res = res * i;
         return res;
     }
      
     // to generate the lps array
     // lps means longest preffix that is also a suffix
     static void generateLPS(int lps[] , String p){
         int l = 0;
         int r = 1;
    
         while(l < p.length() && l < r && r < p.length()){
             if(p.charAt(l) == p.charAt(r)){
                 lps[r] = l + 1;
                 l++;
                 r++;
             }
             else{
                 if(l > 0)
                     l = lps[l - 1];
                 else
                     r++;    
             }
         }
     }
      
 
     //count sort --> it runs in O(n) time but compromises in space
     static ArrayList<Integer> countSort(int a[]){
         int max = Integer.MIN_VALUE;
         for(int i=0;i<a.length;i++){
             max = Math.max(max , a[i]);
         }
 
         int posfre[] = new int[max+1];
         boolean negPres = false;
         for(int i=0;i<a.length;i++){
             if(a[i]>=0){
                 posfre[a[i]]++;
             }
             else{
                 negPres = true;
             }
         }
         ArrayList<Integer> res = new ArrayList<>();
         if(negPres){
             int min = Integer.MAX_VALUE;
             for(int i=0;i<a.length;i++){
                 min = Math.min(min , a[i]);
             }
 
             int negfre[] = new int[-1*min+1];
             for(int i=0;i<a.length;i++){
                 if(a[i]<0){
                     negfre[-1*a[i]]++;
                 }
             }
 
             for(int i=min;i<0;i++){
                 for(int j=0;j<negfre[-1*i];j++){
                     res.add(i);
                 }
             }
             for(int i=0;i<=max;i++){
                 for(int j=0;j<posfre[i];j++){
                     res.add(i);
                 }
             }
             return res;
         }
         for(int i=0;i<=max;i++){
             for(int j=0;j<posfre[i];j++){
                 res.add(i);
             }
         }
         return res;
     }
 
     // returns the index of the element which is just smaller than or
     // equal to the tar in the given arraylist 
     static int lowBound(ArrayList<Integer> ll,long tar ,int l,int r){
         if(l>r) return l;
 
         int mid=l+(r-l)/2;
 
         if(ll.get(mid)>=tar){
             return lowBound(ll,tar,l,mid-1);
         }
 
         return lowBound(ll,tar,mid+1,r);
     }
 
     // returns the index of the element which is just greater than or
     // equal to the tar in the given arraylist 
     static int upBound(ArrayList<Integer> ll,long tar,int l ,int r){
         if(l>r) return l;
 
         int mid=l+(r-l)/2;
 
         if(ll.get(mid)<=tar){
             return upBound(ll,tar,l,mid-1);
         }
 
         return upBound(ll,tar,mid+1 ,r);
     }
 
     static void swap(int i , int j , int a[]){
         int x = a[i];
         int y = a[j];
         a[j] = x;
         a[i] = y;
     }
     // a -> z == 97 -> 122
 
     // String.format("%.9f", ans) ,--> to get upto 9 decimal places , (ans is double)
     
     // write 
 }
 