Help me in solving XOR_ORDER problem

My issue

No matter whatever code i have written it is howing error in hidden test case, please solve it

My code


#include<bits/stdc++.h>
using namespace std;
#define int long long int

signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int tt;
    cin >> tt;
    while(tt--){
       int a, b, c, x = 0;
       cin >> a >> b >> c; bool found = false;
       for(int i = 30; i >= 0; i--){
           if((a >> i) & 1){
              x |= (1 << i);
           }
           int xx = a ^ x, yy = b ^ x, zz = c ^ x;
           if(xx < yy and xx < zz and yy < zz){
               found = true;
               break;
           }
       }
       if(found)cout << x << '\n';
       else cout << "-1" << '\n';
    }
    return 0;
}

Learning course: Additional practice problems
Problem Link: https://www.codechef.com/learn/course/kl-daa-practice/KLDAAPR01/problems/XOR_ORDER