Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 1):
#include <algorithm>
#include <climits>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_set>
#include <vector>

using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll, ll> PI;
typedef vector<PI> vii;
#define F first
#define S second
#define int ll
#define MP make_pair
#define PB push_back
#define tv takeVector
#define PV printVector
#define all(x) x.begin(), x.end()
#define FOR(i, a, b) for (ll i = a; i < (b); i++)
#define F0Rd(i, n) for (int i = n - 1; i >= 0; i--)
#define FORd(i, a, n) for (int i = n - 1; i >= a; i--)
#define F0R(i, b) for (ll i = 0; i < (b); i++)
#define iter(item, list) for (auto item : list)
#define SQ(a) (a) * (a)
const char nl = '\n';
const int MOD = 1e9 + 7;
const int mod = MOD;
void takeVector(vector<ll> &a) {
  for (auto &i : a) {
    cin >> i;
  }
}
void printVector(vector<int> arr) {
  FOR(i, 0, arr.size()) { cout << arr[i] << " "; }
  cout << endl;
}
void printVector(vector<PI> a) {
  for (auto i : a) {
    cout << i.F << " " << i.S << nl;
  }
}
const int MAX_N = 200005;
int MODpow(int x, int n, ll m) {
  if (n == 0) {
    return 1 % m;
  }
  if (n & 1) {
    ll u = MODpow(x, n - 1, m);
    return (x % m) * (u % m) % m;
  } else {
    ll u = MODpow(x, n / 2, m) % m;
    return (u * u) % m;
  }
}
string s, t;
bool multi = true;
int n, b, m, q, l, k, r, x, y, z, w;
int ans;
void solve() {
    cin>>l>>r;
    int num = 1;
    while(num<<1LL <= r){
        num<<=1LL;
    }
    FOR(i,l,r+1){
        if(i != num && i != num-1){
            cout<<num<<" "<<num-1<<" "<<i<<nl;
            break;
        }
    }
}
signed main() {

#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  if (multi)
    cin >> t;
  while (t--)
    solve();

  return 0;
}


Submission (verdict: Accepted):
#include <algorithm>
#include <climits>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_set>
#include <vector>

using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll, ll> PI;
typedef vector<PI> vii;
#define F first
#define S second
#define int ll
#define MP make_pair
#define PB push_back
#define tv takeVector
#define PV printVector
#define all(x) x.begin(), x.end()
#define FOR(i, a, b) for (ll i = a; i < (b); i++)
#define F0Rd(i, n) for (int i = n - 1; i >= 0; i--)
#define FORd(i, a, n) for (int i = n - 1; i >= a; i--)
#define F0R(i, b) for (ll i = 0; i < (b); i++)
#define iter(item, list) for (auto item : list)
#define SQ(a) (a) * (a)
const char nl = '\n';
const int MOD = 1e9 + 7;
const int mod = MOD;
void takeVector(vector<ll> &a) {
  for (auto &i : a) {
    cin >> i;
  }
}
void printVector(vector<int> arr) {
  FOR(i, 0, arr.size()) { cout << arr[i] << " "; }
  cout << endl;
}
void printVector(vector<PI> a) {
  for (auto i : a) {
    cout << i.F << " " << i.S << nl;
  }
}
const int MAX_N = 200005;
int MODpow(int x, int n, ll m) {
  if (n == 0) {
    return 1 % m;
  }
  if (n & 1) {
    ll u = MODpow(x, n - 1, m);
    return (x % m) * (u % m) % m;
  } else {
    ll u = MODpow(x, n / 2, m) % m;
    return (u * u) % m;
  }
}
string s, t;
bool multi = true;
int n, b, m, q, l, k, r, x, y, z, w;
int ans;
void solve() {
    cin>>l>>r;
    int k = 31 - __builtin_clz(l^r);
    int x = l |( (1<<k) - 1);
    y = x+1;
    z = (x == l ? r : l);
    cout<<x<<" "<<y<<" "<<z<<nl;
}
signed main() {

#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  if (multi)
    cin >> t;
  while (t--)
    solve();

  return 0;
}