#include using namespace std; using ll = long long; unsigned long long xor64() { static unsigned long long x = (unsigned long long)(chrono::duration_cast( chrono::high_resolution_clock::now().time_since_epoch()).count()) * 10150724397891781847ULL; x ^= x << 7; return x ^= x >> 9; } int int_rand(int r){ return ((r * (xor64() & ((1 << 30) - 1))) >> 30); } tuple search(vector &divs, ll lcv){ if(lcm(lcm(divs.rbegin()[2], divs.rbegin()[1]), divs.rbegin()[0]) == lcv){ return make_tuple(divs.rbegin()[2], divs.rbegin()[1], divs.rbegin()[0]); } int n = divs.size(); for(int i = 0; i < 1000; i++){ int a = int_rand(n); int b = int_rand(n); while(b == a) b = int_rand(n); int c = int_rand(n); while(c == a || c == b) c = int_rand(n); if(lcm(lcm(divs[a], divs[b]), divs[c]) == lcv){ if(a > b) swap(a, b); if(b > c) swap(b, c); if(a > b) swap(a, b); return make_tuple(divs[a], divs[b], divs[c]); } } return make_tuple(-1, -1, -1); } int main(){ ios::sync_with_stdio(false); cin.tie(0); int T; cin >> T; while(T--){ ll n, l, r; cin >> n >> l >> r; vector divs; for(ll i = 1; i * i <= n; i++){ if(n % i == 0){ if(l <= i && i <= r) divs.emplace_back(i); ll v = n / i; if(l <= v && v <= r && v != i) divs.emplace_back(v); } } if(divs.size() < 3){ cout << "-1\n"; continue; } sort(divs.begin(), divs.end()); auto [A, B, C] = search(divs, n); if(A == -1){ cout << "-1\n"; }else{ cout << A << ' ' << B << ' ' << C << '\n'; } } }