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

import java.io.*;
import java.util.*;
public class Codeforces1 {
    public static void main(String[] args)throws IOException {
        FastReader sc = new FastReader();
        BufferedWriter output = new BufferedWriter(new OutputStreamWriter(System.out));
        //t -> test cases;
        long t = sc.nextLong();
        while(t-->0){
            int b[]= new int[7];
            int sum = 0;
            for(int i=0; i<7; i++){
                b[i]=sc.nextInt();
                if(i<2){
                    sum+=b[i];
                }
            }
            output.write(b[0]+" "+b[1]+" "+(b[6]-sum)+"\n");

        }
        output.flush();
    }

    //Max Sliding Window
    static ArrayList<Integer> findKMaxElement(int[] arr, int k, int n)
    {
        // creating the max heap ,to get max element always
        PriorityQueue<Integer> queue = new PriorityQueue<>(
            Collections.reverseOrder());
 
        ArrayList<Integer> res = new ArrayList<>();
        int i = 0;
 
        for (; i < k; i++)
            queue.add(arr[i]);
 
        // adding the maximum element among first k elements
        res.add(queue.peek());
 
        // removing the first element of the array
        queue.remove(arr[0]);
 
        // iterarting for the next elements
        for (; i < n; i++) {
 
            // adding the new element in the window
            queue.add(arr[i]);
 
            // finding & adding the max element in the
            // current sliding window
            res.add(queue.peek());
 
            // finally removing the first element from front
            // end of queue
            queue.remove(arr[i - k + 1]);
        }
        return res;
        // this code is Contributed by Pradeep Mondal P
    }


    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;
        }
    }
    //Number of bits
    static int numberOfBits(int n){
        return (int)(Math.log(n)/Math.log(2)+1);
    }
    
    //GCD of a Two number
    static long GCD(long a, long b){
        if(b==0)
        return a;
        return GCD(b, a%b);
    }

    //No of factors in factorial n i.e. (n!)
    static long factors(long n, long b){
        long count =0;
        int power = 1;
        while(n>=b){
            count+=n/b;
            b=(long)Math.pow(b, ++power);
        }
        return count;
    }
    
    //prime numbers in a range from 2 to n
    static boolean[] primeUptoN(int n){
        boolean arr[]= new boolean[n];
        return arr;
    }

    //Round off
    static double roundOff(double value, int digit){
        double mul = Math.pow(10.0, digit);
        value=Math.round((value*mul)/mul);
        return value;
    }
}
/*class Pair{
    long data1;
    long data2;
    public Pair(long data1, long data2){
        this.data1=data1;
        this.data2=data2;
    }
}

class SortByData1 implements Comparator<Pair>{
    public int compare(Pair a, Pair b){
        int result = 0;
        if(a.data1>b.data1){
            result=1;
        }else if(b.data1>a.data1){
            result=-1;
        }
        return result;
    }
}*/