#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int MOD = 1e9 + 7;
void solve()
{
int n, d, l;
cin >> n >> d >> l;
int rem = (n - 1) - l;
if(rem < 0){
cout << -1 << "\n";
return;
}
if(rem + 2 == d){
int x = 2;
for(int i = 0; i < l; i++){
cout << 1 << " " << x << "\n";
x++;
}
while(x <= n){
cout << x - 1 << " " << x << "\n";
x++;
}
}else if(rem + 1 == d){
int x = 1;
for(int i = 0; i < d; i++){
cout << x << " " << x + 1 << "\n";
x++;
}
int p = x - 1;
x++;
for(int i = 0; i < l - 1; i++){
cout << p << " " << x << "\n";
x++;
}
}else{
cout << -1 << "\n";
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// cout << fixed << setprecision(7);
int t = 1;
cin >> t;
for (int i = 1; i <= t; i++)
{
// cout << "Case #" << i << ": ";
solve();
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgbGwgbG9uZyBsb25nCgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IE1PRCA9IDFlOSArIDc7Cgp2b2lkIHNvbHZlKCkKewogICAgaW50IG4sIGQsIGw7CiAgICBjaW4gPj4gbiA+PiBkID4+IGw7CiAgICAKICAgIGludCByZW0gPSAobiAtIDEpIC0gbDsKICAgIGlmKHJlbSA8IDApewogICAgCWNvdXQgPDwgLTEgPDwgIlxuIjsKICAgIAlyZXR1cm47CiAgICAJCiAgICB9CiAgICBpZihyZW0gKyAyID09IGQpewogICAgICAgIGludCB4ID0gMjsKICAgICAgICBmb3IoaW50IGkgPSAwOyBpIDwgbDsgaSsrKXsKICAgICAgICAgICAgY291dCA8PCAxIDw8ICIgIiA8PCB4IDw8ICJcbiI7CiAgICAgICAgICAgIHgrKzsKICAgICAgICB9CiAgICAgICAgd2hpbGUoeCA8PSBuKXsKICAgICAgICAgICAgY291dCA8PCB4IC0gMSA8PCAiICIgPDwgeCA8PCAiXG4iOwogICAgICAgICAgICB4Kys7CiAgICAgICAgfQogICAgfWVsc2UgaWYocmVtICsgMSA9PSBkKXsKICAgICAgICBpbnQgeCA9IDE7CiAgICAgICAgZm9yKGludCBpID0gMDsgaSA8IGQ7IGkrKyl7CiAgICAgICAgICAgIGNvdXQgPDwgeCA8PCAiICIgPDwgeCArIDEgPDwgIlxuIjsKICAgICAgICAgICAgeCsrOwogICAgICAgIH0KICAgICAgICBpbnQgcCA9IHggLSAxOwogICAgICAgIHgrKzsKICAgICAgICBmb3IoaW50IGkgPSAwOyBpIDwgbCAtIDE7IGkrKyl7CiAgICAgICAgICAgIGNvdXQgPDwgcCA8PCAiICIgPDwgeCA8PCAiXG4iOwogICAgICAgICAgICB4Kys7CiAgICAgICAgfQogICAgfWVsc2V7CiAgICAgICAgY291dCAgPDwgLTEgPDwgIlxuIjsKICAgIH0KfQoKaW50IG1haW4oKQp7CiAgICBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKGZhbHNlKTsKICAgIGNpbi50aWUoTlVMTCk7CgogICAgLy8gIGNvdXQgPDwgZml4ZWQgPDwgc2V0cHJlY2lzaW9uKDcpOwogICAgaW50IHQgPSAxOwogICAgY2luID4+IHQ7CiAgICBmb3IgKGludCBpID0gMTsgaSA8PSB0OyBpKyspCiAgICB7CiAgICAgICAgLy8gY291dCA8PCAiQ2FzZSAjIiA8PCBpIDw8ICI6ICI7CiAgICAgICAgc29sdmUoKTsKICAgIH0KICAgIHJldHVybiAwOwp9