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

Solution 1 (runtime: 77 ms):
/*
lavanyagpt28
*/

#include <bits/stdc++.h>
 //#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//#pragma GCC optimize("O3")

using namespace std;
//using namespace __gnu_pbds;

/*template<typename T> using ordered_set = tree <T, null_type, less <T>, rb_tree_tag, tree_order_statistics_node_update>;
template<typename T> using MinPriorityQueue = priority_queue <T, vector <T>, greater <T>>;/*

/*#ifdef HOME
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template < typename Arg1 >
void __f(const char* name, Arg1&& arg1) {
    cout << name << " : " << arg1 << std :: endl;
}
template < typename Arg1, typename... Args >
void __f(const char* names, Arg1&& arg1, Args&&... args) {
    const char* comma = strchr(names + 1, ',');
    int len = comma - names;
    for (int i = 0; i < len; ++i) {
        cout << names[i];
    }
    cout <<  " : " << arg1 << " | ";
    __f(comma + 1, args...);
}
#else
#define trace(...)
#endif*/

typedef double db;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef complex<double> com;

#define eb emplace_back
#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define unique_sort(x) (sort(x.begin(), x.end()), x.resize(distance(x.begin(), unique(x.begin(), x.end()))))
#define fast_io() ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

const ll LINF = LLONG_MAX, SZ = 1e3, MOD = 1e9 + 7, N = 1e5 + 5, M = 1e3 + 5, LG = 21;
const int INF = INT_MAX;
const db PI = acos(-1), EPS = 1e-6;
//mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count());

void test() {
    int l, r;
    cin >> l >> r;
    // find the first bit where l and r differ
    int k = -1;
    for(int i = 30; i >= 0; i--){
        int bit1 = (l >> i) & 1;
        int bit2 = (r >> i) & 1;
        if(bit1 != bit2){
            k = i;
            break;
        }
    }
    int first = l | ((1 << k)-1);
    int second = first + 1;
    int third;
    if(first - 1 >= l){
        third = first-1;
    }
    else{
        third = second + 1;
    }
    cout << first << " " << second << " " << third << endl;
}

int main() {
    fast_io();
   // #ifdef HOME
 //       freopen("input.txt", "r", stdin);
   //     freopen("output.txt", "w", stdout);
  //  #endif
//    cout << fixed << setprecision(15);
    int t = 1;
    cin >> t;
    for (int i = 0; i < t; ++i) {
        test();
    }
 //   #ifdef HOME
 //       cout << "Time: " << (int)(clock() * 1000. / CLOCKS_PER_SEC) << "ms";
//    #endif
    return 0;
}

Solution 2 (runtime: 61 ms):
//****************************Template Begins****************************//

// Header Files
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<utility>
#include<set>
#include<unordered_set>
#include<list>
#include<iterator>
#include<deque>
#include<queue>
#include<stack>
#include<set>
#include<bitset>
#include<random>
#include<map>
#include<unordered_map>
#include<stdio.h>
#include<complex>
#include<math.h>
#include<cstring>
#include<chrono>
#include<string>
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
// Header Files End

using namespace std;
using namespace __gnu_pbds;
template<class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update> ;

template<class key, class value, class cmp = std::less<key>>
using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;

#define DIVYA ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define umap unordered_map
#define uset unordered_set
#define lb lower_bound
#define ub upper_bound
#define fo(i,a,b) for(i=a;i<=b;i++)
#define all(v) (v).begin(),(v).end()
#define all1(v) (v).begin()+1,(v).end()
#define allr(v) (v).rbegin(),(v).rend()
#define allr1(v) (v).rbegin()+1,(v).rend()
#define sort0(v) sort(all(v))
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
#define sz(x) (ll)x.size()
#define pb push_back
#define ppb pop_back
#define mkp make_pair
#define inf 1000000000000000005
const ll mod = 998244353;


ll inv(ll i) {if (i == 1) return 1; return (mod - ((mod / i) * inv(mod % i)) % mod) % mod;}

ll mod_mul(ll a, ll b) {a = a % mod; b = b % mod; return (((a * b) % mod) + mod) % mod;}

ll mod_add(ll a, ll b) {a = a % mod; b = b % mod; return (((a + b) % mod) + mod) % mod;}

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

ll ceil_div(ll a, ll b) {return a % b == 0 ? a / b : a / b + 1;}

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


/*---------------------------------------------------------------------------------------------------------------------*/



/**
 *  read the problem statement very carefully
 *  look at the constraints
 *  key  observations
 *  think carefully and come up with a solution
 *  think about corner cases
 *  design test cases and verify your solution
 *  clean implementation
 *
 **/










void solve() {

	/****
	 *  focus on understanding the problem
	 *  don't directly jump on the solution
	 *  don't assume anything
	 *  read and understand the problem with fresh mind
	 *  focus more on analysis of the problem
	 *  more the analysis and understanding of the problem,
	 *  less time it will take to write working solution
	 **/

	/***
	 *
	 *
	 *
	 *
	 *
	 *
	 *
	 * */



	ll L, R;

	cin >> L >> R;

	ll a, b, c;

	for (ll i = 31; i >= 0; i--) {

		ll msbL = L & (1 << i);
		ll msbR = R & (1 << i);

		if (!msbL && msbR) {


			a = L | ((1 << i) - 1);
			b = a + 1;
			c = (a == L ? R : L);
			break;
		}

	}

	// ll ans = (a ^ b) + (b ^ c) + (c ^ a);

	// cout << ans << "\n";




	cout << a << " " << b << " " << c << "\n";










}




















signed main() {

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);




	ll t;

	// t = 1;

	cin >> t;



	while (t--) {
		solve();
	}


}






/***
 *
 *
 *
 *
 *
 *
 */