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

Solution 1 (runtime: 62 ms):
//#pragma GCC optimize("O3,unroll-loops")
//#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")

#include "bits/stdc++.h"

#define ll long long
#define pb push_back

using namespace std;

void setIO(string name = ""){
    cin.tie(0)->sync_with_stdio(0);
    if ((ll)(name.size())){
        freopen((name + ".in").c_str(), "r", stdin);
        freopen((name + ".out").c_str(), "w", stdout);
    }
}


template<typename T1, typename T2>
istream& operator>>(istream &istream, pair<T1, T2> &p) { return (istream >> p.first >> p.second); }
template<typename T>
istream& operator>>(istream &istream, vector<T> &v) { for (auto &it : v) cin >> it; return istream; }
template<typename T1, typename T2>
ostream& operator<<(ostream &ostream, const pair<T1, T2> &p) { return (ostream << p.first << " " << p.second << '\n'); }
template<typename T>
ostream& operator<<(ostream &ostream, const vector<T> &c) { for (auto &it : c) cout << it << " "; return ostream; }

class DisjointSets {
private:
    vector<int> parents;
    vector<int> sizes;

public:
    DisjointSets(int size) : parents(size), sizes(size, 1) {
        for (int i = 0; i < size; i++) { parents[i] = i; }
    }
    int find(int x) {
        return parents[x] == x ? x : (parents[x] = find(parents[x]));
    }
    bool unite(int x, int y) {
        int x_root = find(x);
        int y_root = find(y);
        if (x_root == y_root) { return false; }

        if (sizes[x_root] < sizes[y_root]) { swap(x_root, y_root); }
        sizes[x_root] += sizes[y_root];
        parents[y_root] = x_root;
        return true;
    }
    bool connected(int x, int y) { return find(x) == find(y); }
};

ll modPow(ll a, ll b, ll m) {ll res = 1; while (b > 0) {if (b & 1)res = (res * a) % m; a = (a * a) % m; b = b >> 1;} return res;}
ll modInv(ll x, ll m) {return modPow(x, m-2, m);}
bool isPrime(ll n) { if(n < 2) return false; for(ll k = 2; k * k <= n; k++) if(n % k == 0) return false; return true; }

vector<int> KMP(const string &s) {
    int n = (int)s.size();
    vector<int> pi_s(n);
    for (int i = 1, j = 0; i < n; i++) {
        while (j > 0 && s[j] != s[i]) { j = pi_s[j - 1]; }
        if (s[i] == s[j]) { j++; }
        pi_s[i] = j;
    }
    return pi_s;
}


ll binom(ll N, ll K, ll MOD, vector<ll> &factorial){
    return (factorial[N] * (modInv(factorial[K], MOD)%MOD * modInv(factorial[N-K], MOD)%MOD)%MOD)%MOD;
}

const ll MOD = 998244353;
const int INF = INT32_MAX;
const int MAXN = 3e5+5;

void solve() {
    int l, r;
    cin >> l >> r;
    int idk = 32-__builtin_clz(r^l);
    int a = l | ((1 << (idk-1))-1);
    int b = a+1;
    for (int i=l; i<=r; i++){
        if (i != a && i != b){
            cout << a << ' ' << b << ' ' << i << endl;
            return;
        }
    }

}

int main() {
    setIO();
    int T = 1;
    cin >> T;
    while(T--){
        solve();
    }
}


Solution 2 (runtime: 62 ms):
#include<bits/stdc++.h>
using namespace std;
int t;
int main(){
	scanf("%d",&t);
	while(t--){
		int l,r;
		scanf("%d%d",&l,&r);
		int p;
		for(int i = 30;i >= 0;--i)
			if((l & (1 << i)) != (r & (1 << i))){
				p = i;
				break;
			}
		int x = (l >> p) << p;
		int a = x + (1 << p),b = x + (1 << p) - 1;
		if(b == l)
			printf("%d %d %d\n",a,b,r);
		else
			printf("%d %d %d\n",l,a,b);
	}
}