#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(){
int t;
long long int f,i,k;
cin >> t;
while(t--){
bool found = false;
bool dont = false;
cin >> f;
if((f%2==1) || (f<=0) || (f>=pow(2,30))){
cout << -1 << endl;
continue;
}
for(long long int p=2; p<=pow(2,30); p<<=1){
if(p==f){
dont = true;
}
}
if(!dont){
for(i=29; i>=0; i--){
k = pow(2,i+1);
if(((f%k) == 0) && (f!=k) && (pow(2,i)!=(f/2) - pow(2,i))){
found = true;
break;
}
}
}
if(found){
cout << 0 << ' ' << pow(2,i) << ' ' << (f/2) - pow(2,i) << endl;
}else{
cout << -1 << endl;
}
}
}
Hey @ashan_817 
Can You Please share the link of problem statement .