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

Solution 1 (runtime: 62 ms):
// Just a good programmer with great habits :)
#include <bits/stdc++.h>
using namespace std;

#define int long long
#define endl '\n'
#define M 1000000007
typedef vector<int> vi;
typedef pair<int, int> pii;

#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define bpc(x) __builtin_popcountll(x)
#define read(a) fori(i,0,n) cin >> a[i];
#define print(a) fori(i,0,n) cout << a[i] << " "; cout << endl;
#ifdef DEBUG
#define debug(x) cerr << #x << ' = ' << x << endl
#else
#define debug(x)
#endif

#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(0);

#define fori(i, a, b) for (int i = (a); i < (b); ++i)
#define pyy cout << "YES" << endl
#define pnn cout << "NO" << endl

// Modular Operations
int madd(int a, int b) {
    return (a + b) % M;
}

int msub(int a, int b) {
    return (((a - b) % M) + M) % M;
}

int mmul(int a, int b) {
    return ((a % M) * (b % M)) % M;
}

int exp(int base, int exponent) {
    if(exponent == 0) {
        return 1;
    }
    if(exponent % 2 == 0) {
        int half = exp(base, exponent / 2);
        return half * half;
    } else {
        return base * exp(base, exponent - 1);
    }
}

// Conversion & Prime Checking
string dectobin(int num);
int bintodec(string n);
vector<bool> sieve(int n);
bool is_prime(int n);

vector<bool> sieve(int n) {
    vector<bool> is_prime(n, 1);
    is_prime[0] = is_prime[1] = false;
    for (int i = 2; i < n; i++) {
        if (is_prime[i]) {
            for (int j = 2 * i; j < n; j += i) {
                is_prime[j] = false;
            }
        }
    }
    return is_prime;
}

bool is_prime(int n) {
    if (n < 2) return false;
    for (int i = 2; i * i <= n; i++) {
        if (n % i == 0) return false;
    }
    return true;
}

int bintodec(string n) {
    int dec_value = 0, base = 1, len = n.length();
    for (int i = len - 1; i >= 0; i--) {
        if (n[i] == '1') dec_value += base;
        base *= 2;
    }
    return dec_value;
}

string dectobin(int num) {
    string str1;
    while (num) {
        str1 += (num & 1) ? '1' : '0';
        num >>= 1;
    }
    reverse(str1.begin(), str1.end());
    return str1;
}

void solve() {
    int l, r;
    cin >> l >> r;
    int ans = 0;
    int a, b, c;
    for (int i = 30; i >= 0; i--)
    {
        int b1 = 0;
        int b2 = 0;
        if (l & (1ll << i))
        {
            b1 = 1;
        }
        if (r & (1ll << i))
        {
            b2 = 1;
        }
        if (b1 == b2)
        {
            ans += b1 * (1ll << i);
        }
        else
        {
            a = ans + (1ll << i);
            b = a - 1;
            break;
        }
    }
    for (int i = l; i <= r; i++)
    {
        if (i != a && i != b)
        {
            c = i;
            break;
        }
    }
    cout << a << " " << b << " " << c << endl;
}

int32_t main() {
    fast_cin();
    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}

Solution 2 (runtime: 61 ms):
#include <bits/stdc++.h>
#define LL long long
using namespace std;
 
struct three{
    LL a, b, c;
};

three compute(LL a, LL b){
    LL p = pow(2, floor(log2(b))) - 1;

    if(p >= a){
        LL third = a;
        if(a == p) third = b;
        return {p, p+1, third};
    }
    else{
        three x = compute(a-(p+1), b-(p+1));
        return{x.a + p + 1, x.b + p + 1, x.c + p + 1};
    }
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
 
    int t;
    cin >> t;
    for (int i = 0; i < t; i++)
    {
        LL l, r;
        cin >> l >> r;

        three ans = compute(l, r);

        // int k = int(pow(2, floor(log2(r)) + 1) - 1) ^ r;

        cout << ans.a << " " << ans.b << " " << ans.c << '\n';
    }
}