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

Solution 1 (runtime: 62 ms):
#include <bits/stdc++.h>
using namespace std;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>

#define fast                          \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL)
#define int long long int
#define ul unsigned long long
#define dec greater<int>()
#define lower(s) transform(s.begin(), s.end(), s.begin(), ::tolower);
#define upper(s) transform(s.begin(), s.end(), s.begin(), ::toupper);
#define all(x) (x).begin(), (x).end()
#define mod 1000000007
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) { return (a.second < b.second); }

void solve()
{
    int l, r;
    cin >> l >> r;
    //int k = 31-__builtin_clz(l ^ r);//count leading zeros/find MSB index.
    int k=log2(l^r);//find MSB index
    //cout<<kk<<'\n';
    //cout<<k<<'\n';
    int a=(l | ((1<<k)-1));
    int b=a+1;
    int c=(a==l?r : l);
    cout<<a<<" "<<b<<' '<<c<<'\n';
}
signed main()
{
    fast;
    int t = 1;
    cin >> t;
    while (t--)
        solve();
}

/*You need to learn from the problem you solved.*/
/*If you got it slow, why? If you got WA, why?*/
/*What can you do to prevent it in the future?*/
/*Did you miss a critical observation?*/
/*What path of thinking would've led you there? */

Solution 2 (runtime: 78 ms):
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll long long
#define fi(i,l,n)   for(int i=l; i<n; i++)
#define fd(i,n,l)   for(int i=n; i>=l; i--)
#define gets(s) string s; cin>>s;
#define getv(v,n)   vector<ll> v(n+1); fi(i,1,n+1)    cin>>v[i];
#define all1(v)  v.begin() + 1, v.end()
#define all(v)  v.begin(), v.end()
#define seev(v,n) fr(i,1,n+1)   {cout<<v[i]<<' ';}  cout<<endl;
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vp vector<pair<ll,ll>>
#define vc vector<char>
#define vvc vector<vector<char>>

#define pb push_back
#define mp make_pair
#define mse multiset<ll>
#define se set<ll>
#define ma map<ll,ll>
#define getmat(v,n,m) vvl v(n+1,vl(m+1)); fi(i,1,n+1) {fi (j,1,m+1) cin>>v[i][j];}
#define seemat(mat) fi(i,1,n+1) {fi (j,1,m+1) cout<<v[i][j]<<' '; cout<<endl;}
#define YES cout<<"YES\n";
#define NO cout<<"NO\n";
using namespace std;
using namespace __gnu_pbds;

// Define ordered multiset with long long
 
typedef tree<long long, long long, less<long>, rb_tree_tag, tree_order_statistics_node_update> ordered_multimap;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
 
vl sieve;
void SieveOfEratosthenes(int n)
{
    // Create a boolean array "prime[0..n]" and initialize
    // all entries it as true. A value in prime[i] will
    // finally be false if i is Not a prime, else true.
    vl prime(n+1,true);
 
    for (int p = 2; p * p <= n; p++) {
        // If prime[p] is not changed, then it is a prime
        if (prime[p] == true) {
            // Update all multiples of p greater than or
            // equal to the square of it numbers which are
            // multiple of p and are less than p^2 are
            // already been marked.
            for (int i = p * p; i <= n; i += p)
                prime[i] = false;
        }
    }
 
    // Print all prime numbers
    for (int p = 2; p <= n; p++)
        if (prime[p])
            sieve.push_back(p);
}

class DisjointSet{
    private:
    vector<int> parent;

    public:
    DisjointSet(int n){
        parent.resize(n+1,-1);
    }

    int findParent(int x){
        if(parent[x] < 0) return x;
        return parent[x] = findParent(parent[x]);
    }

    void Union(int x, int z){
        int px = findParent(x);
        int pz = findParent(z);
        
        if(px == pz)    return;
        
        if(parent[px] < parent[pz]){
            parent[px] += parent[pz];
            parent[pz] = px;
        }
        else {
            parent[pz] += parent[px];
            parent[px] = pz;
        }
        
    }

    int getSize(int x){
        int px = findParent(x);
        return ((-1)*parent[px]);
    }
};

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


ll gcd(ll a, ll b){
    if (b == 0) return a;
    return gcd(b,a%b);
}


ll pwr(ll a, ll b, ll mod = 0){
    ll result = 1;
    if(mod == 0){
        while(b){
            if(b & 1) result *= a;
            a *= a;
            b = b >> 1;
        }
    }
    else {
        while(b){
            if(b & 1){
                result *= a;
                result  = result % mod;
            }
            a *= a;
            a = a % mod;
            b = b >> 1;
        }
    }
    return result;
}


ll modularinverse(ll a,ll p)// p is prime
{
    return pwr(a,p-2,p);
}

void solve(ll tc){
    int l,r;
    cin>>l>>r;

    int a,b,c;
    int curr;
    int high = 0;
    fd(i,30,0){
        curr = 1<<i;
        if((l&curr) == (r&curr)){
            high += l&curr;
            continue;
        }
        else{
            high += curr;
            a=b=c=high;
            b--;
            if(c-2 >= l) c -= 2;
            else c = a + 1;
            break;
        }
    }

    cout<<a<<' '<<b<<' '<<c<<endl;
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    
    int t=1;
    cin>>t;
    ll tc=0;
    while(t--){
        tc++;
        solve(tc);
    }
    
    return 0;
}