For this Question: For a given positive integer N, determine if there exist three <b>positive</b> integers a, b and c such that the following two conditions hold:

1. a + b + c = N
2. a ^ b ^ c = 0 where ^ denotes the bitwise XOR operation.

If there exist such a triple (a, b, c), print the lexicographically smallest one.
Else, print -1.The first line of input contains a single integer, T.
T lines follow, each containing a single integer, N.

<b>Constraints:</b>

1 <= T <= 10<sup>3</sup>
3 <= N <= 10<sup>18</sup>For each test, in a new line, print the lexicographically smallest triple (a, b, c) if it exists, else print -1.Sample Input:
3
3
6
12

Sample Output:
-1
1 2 3
2 4 6, I have written this Solution Code: 



import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

import static java.lang.Math.*;
import static java.lang.System.out;

public class Main {


    void solve(){
        long n= in.nextLong();
        if(n%2==1){
            sb.append(-1).append("\n");
        }
        else{
            long cnt=0;
            n=n/2;
            while(n%2==0){
                cnt++;
                n=n>>1;
            }
            long x=(1L<<cnt);
            long y=(1L<<cnt);
            long z=0;
            while(n!=0){
                n=n>>1;
                cnt++;
                if((n&1)==1){
                    y+=(1L<<cnt);
                    z+=(1L<<cnt);
                }
            }
            long[] a= new long[3];
            a[0]=x;
            a[1]=y;
            a[2]=z;
            sort(a);
            if(a[0]!=0){
                sb.append(a[0]).append(" ");
                sb.append(a[1]).append(" ");
                sb.append(a[2]).append("\n");
            }
            else{
                sb.append(-1).append("\n");
            }
        }
    }






    FastReader in;
    StringBuffer sb;
    public static void main(String[] args) {
        new Main().run();
    }
    void run(){
        in= new FastReader();
        start();
    }
    void start(){
        sb= new StringBuffer();
         for(int t=in.nextInt();t>0;t--) {
            solve();
         }
        out.print(sb);
    }


    void swap( int i , int j) {
        int tmp  = i;
        i = j;
        j = tmp;
    }
    long power(long x, long y, long p) {
        long res = 1;
        x = x % p;
        while (y > 0) {
            if (y % 2 == 1)
                res = (res * x) % p;

            y = y >> 1;
            x = (x * x) % p;
        }
        return res;
    }

    int lower_bound(long[] a, long x) {
        int l=-1,r=a.length;
        while(l+1<r) {
            int m=(l+r)>>>1;
            if(a[m]>=x) r=m;
            else l=m;
        }
        return r;
    }
    int upper_bound(long[] arr, int key) {
        int i=0, j=arr.length-1;
        if (arr[j]<=key) return j+1;
        if(arr[i]>key) return i;
        while (i<j){
            int mid= (i+j)/2;
            if(arr[mid]<=key){
                i= mid+1;
            }else{
                j=mid;
            }
        }
        return i;
    }
    void sort(long[] A){
        int n = A.length;
        Random rnd = new Random();
        for(int i=0; i<n; ++i){
            long tmp = A[i];
            int randomPos = i + rnd.nextInt(n-i);
            A[i] = A[randomPos];
            A[randomPos] = tmp;
        }
        Arrays.sort(A);
    }
    int[] intArr(int n){
        int[] res= new int[n];
        for(int i=0;i<n;i++){
            res[i]= in.nextInt();
        }
        return res;
    }
    long[] longArr(int n){
        long[] res= new long[n];
        for(int i=0;i<n;i++){
            res[i]= in.nextLong();
        }
        return res;
    }



























    boolean isDigitSumPalindrome(long N) {

        long sum= sumOfDigits(String.valueOf(N));
        long rev=0;
        long org= sum;
        while (sum!=0){
            long d= sum%10;
            rev = rev*10 +d;
            sum /= 10;
        }
        return org == rev;
    }
    long sumOfDigits(String n){
        long sum= 0;
        for (char c: n.toCharArray()){
            sum += Integer.parseInt(String.valueOf(c));
        }
        return sum;
    }
    long[] revArray(long[] arr) {
        int n= arr.length;
        int i=0, j=n-1;
        while (i<j){
            long temp= arr[i];
            arr[i]= arr[j];
            arr[j]= temp;
            i++;
            j--;
        }
        return arr;
    }
    long gcd(long a, long b){
        if (b==0)
            return a;
        return gcd(b, a%b);
    }
    long lcm(long a,long b){
        return (a*b)/gcd(a,b);
    }
    static class Pair implements Comparable<Pair>{
        long first;
        long second;
        Pair(long x, long y){
            this.first=x;
            this.second=y;
        }

        @Override
        public int compareTo(Pair o) {
            return 0;
        }
    }










    public 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 (Exception e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt(){
            return Integer.parseInt(next());
        }
        long nextLong(){
            return Long.parseLong(next());
        }
        double nextDouble(){
            return Double.parseDouble(next());
        }
        float nextFloat(){
            return Float.parseFloat(next());
        }
        String nextLine(){
            String str="";
            try{
                str=br.readLine();
            }catch (Exception e){
                e.printStackTrace();
            }
            return str;
        }
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?