Problem: 2057C - Trip to the Olympiad
Language: c++17 

Solution 1 (runtime: 62 ms):
#include "bits/stdc++.h"
using namespace std;
using ll = long long;

void solve() {
    int l, r; cin >> l >> r;
    
    int a = 0, b = 0, c = 0;
    for (int i = 29; i >= 0; i--) {
        if ((l ^ r) >> i & 1) {
            b |= 1 << i;
            a |= (1 << i) - 1;
            break;
        } else {
            a |= l & (1 << i);
            b |= l & (1 << i);
        }
    }
    
    c = l;
    while (c == a || c == b) {
        c++;
    }
    
    std::cout << a << " " << b << " " << c << "\n";
}
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int t;
    cin >> t;
    
    while (t--) {
        solve();
    }
    
    return 0;
}

Solution 2 (runtime: 62 ms):
// ---------------------------------
// READ { WHOLE } QUESTION PROPERLY. |
// ---------------------------------
// --------------------------------------------
// READ QUESTION CAREFULLY IN EDUCATIONAL ROUND
// --------------------------------------------
// understand question properly and have patience if not able to understand question in first time.
// -----------------------------------------------
// | VERY IMPORTANT : OBSERVE TESTCASES PROPERLY. |
// -----------------------------------------------
// understand question properly and fast.
// don't do faasam faas if you know its easy question or you have to face a lot of repurcussion.
// don't do stupidness in div 4 be calm and do it.
// if not able to do find out solution of any question jump to another question.
// Keep Precomputation in mind if it can be used.
// If questions are done early don't be happy try next question very seriously

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef double dd;
typedef float fl;

const ll N = 1e6+7;

vector<ll> binary(ll n){
    vector<ll> v(31,0);
    ll i=0;
    while(n!=0){
        v[i]=(n%2);
        n=n/2;
        i++;
    }
       // reverse(v.begin(),v.end());
    return v;
}

ll power(ll a,ll b){
    ll ans=1;
    while(b){
        if(b&1) ans=ans*a;
        a=a*a;
        b>>=1;
    }
    return ans;
}

vector<bool> isPrime(N,1);

bool sortbysec(const pair<int,int> &a,const pair<int,int> &b){
        return a.second<b.second;
}

int main(){
//   isPrime[0]=isPrime[1]=false;
//   for(int i=2;i*i < N;i++){
//       if(isPrime[i]==true){
//           for(int j=2*i;j<N;j+=i){
//               isPrime[j]=false;
//           }
//       }
//   }

    ios_base::sync_with_stdio(false); cin.tie(0), cout.tie(0);

    int t=1;
    cin >> t;
    while(t--){
        ll l,r;
        cin>>l>>r;
        ll a=0,b=0,c=r;
        vector<ll> binl=binary(l);
        vector<ll> binr=binary(r);
        ll idx=0;
        for(ll i=30;i>=0;i--){
            if(binl[i]!=binr[i]){
               a+=(1<<i);
               idx=i;
               break;
            }
            else{
                a+=(1<<i)*binr[i];
                b+=(1<<i)*binr[i];
            }
        }
        for(ll i=idx-1;i>=0;i--){
            b+=(1<<i);
        }
        if(c==a){
            c--;
        }
        if(c==b){
            c--;
        }
        cout<<a<<" "<<b<<" "<<c<<"\n";
        

    }
    return 0;
}