#include using namespace std; #define int long long #define rep(i, n) for(int i = 0; i < (int)(n); ++i) int solve(void) { int N, Li, Ri; cin >> N >> Li >> Ri; vector d; for(int i = 1; i * i <= N; ++i) { if(N % i) continue; d.push_back(i); if(N != i * i) d.push_back(N / i); } vector nd; for(auto x : d) if(Li <= x and x <= Ri) nd.push_back(x); sort(nd.begin(), nd.end()); const int L = nd.size(); vector T; for(int i = 2; i * i <= N; ++i) { int cnt = 1; while(N % i == 0) { N /= i; cnt *= i; } if(cnt != 1) T.push_back(cnt); } const int M = T.size(); vector bit(L, 0); rep(i, L) rep(j, M) if(nd[i] % T[j] == 0) bit[i] |= (1 << j); map mp1; rep(i, L) if(!mp1.count(bit[i])) mp1[bit[i]] = nd[i]; map> mp2; for(auto [val, a] : mp1) rep(i, L) if(a < nd[i]) { const int nbit = val | bit[i]; if(!mp2.count(nbit)) mp2[nbit] = {a, nd[i]}; } for(auto [val, p] : mp2) { auto [a, b] = p; rep(i, L) if(b < nd[i]) { const int nbit = val | bit[i]; if(nbit == (1 << M) - 1) { cout << a << " " << b << " " << nd[i] << "\n"; return 0; } } } cout << -1 << "\n"; return 0; } signed main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int Testcases = 1; cin >> Testcases; while(Testcases--) solve(); return 0; }