#include <bits/stdc++.h>
#define mp make_pair
#define pb(a) push_back(a)
#define pp pop_back()
#define all(v) (v.begin(), v.end())
#define alar (a + 1, a + 1 + n)
#define ff first
#define ss second
#define sz(a) (int)(a.size())
#define rep(i, d, e) for (int i = d; i < e; i++)
#define ffor(i, a, b) for (int i = a; i <= b; i++)
#define rloop(i, c, d) for (int i = c; i >= d; i--)
#define ll long long
#define vc vector<ll>
#define pii pair<ll, ll>
#define mii map<ll, ll>
#define bestsort sort(a.begin(), a.end(), [](ll x, ll y) { return abs(x) > abs(y); })
#define mod 1000000007
#define MAX 300005
#define endl "\n"
#define o(x) cout << x << endl
using namespace std;
const int N = 1e5 + 10;
void solve()
{
int r, g, b;
cin >> r >> g >> b;
int n = r + g + b;
string s;
if (r +g<b)
{
cout << -1 << endl;
return;
}
vector<pii>v;
int rr = r - 1, bb = b - 1, gg = g - 1;
if(gg<rr)
swap(rr,gg);
s += 'R', s += 'G', s += 'B';
v.pb(mp(1,2));
v.pb(mp(2,3));
int i = 4;
while (i <= n)
{
if(bb==1)
{
s+= 'B';
bb--;
v.pb(mp(1,i));
}
else
{
if (gg > 0)
{
s += 'G', gg--;
v.pb(mp(1,i));
}
if (bb > 0)
{
i++;
s+= 'B';
bb--;
v.pb(mp(i-1,i));
}
}
i++;
if((bb|gg)==0) break;
}
// remaining R's
while (rr > 0)
{
s += 'R';
v.pb(mp(1,i));
i++;
rr--;
}
// If number of R>G then we swap R to G and G to R
if(g<r)
{
ffor(i,0,sz(s)-1)
{
if(s[i]=='R')
s[i]='G';
else if(s[i]=='G')
s[i]='R';
}
}
// print the answer
cout << s << endl;
ffor(i,0,sz(v)-1)
{
cout<<v[i].ff<<" "<<v[i].ss<<endl;
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t;
cin >> t;
ffor(j, 1, t)
{
solve();
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CgojZGVmaW5lIG1wIG1ha2VfcGFpcgojZG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CiAgICAgdmVjdG9yPHBpaT52OwoKICAgIGludCByciA9IHIgLSAxLCBiYiA9IGIgLSAxLCBnZyA9IGcgLSAxOwogICAgaWYoZ2c8cnIpCiAgICBzd2FwKHJyLGdnKTsKCgogICAgCiAgICAKICAgIHMgKz0gJ1InLCBzICs9ICdHJywgcyArPSAnQic7CiAgICB2LnBiKG1wKDEsMikpOwogICAgdi5wYihtcCgyLDMpKTsKICAgIGludCBpID0gNDsKICAgIAogICAgd2hpbGUgKGkgPD0gbikKICAgICB7ICAgCiAgICAgICAgIGlmKGJiPT0xKQogICAgICAgICB7CiAgICAgICAgICAgICBzKz0gJ0InOwogICAgICAgICAgICAgICAgYmItLTsgCiAgICAgICAgICAgICAgICB2LnBiKG1wKDEsaSkpOwogICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgIHsgIAogICAgICAgICAgICAgaWYgKGdnID4gMCkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgIHMgKz0gJ0cnLCBnZy0tOwogICAgICAgICAgICAgICAgdi5wYihtcCgxLGkpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoYmIgPiAwKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBpKys7CiAgICAgICAgICAgICAgICBzKz0gJ0InOwogICAgICAgICAgICAgICAgYmItLTsKICAgICAgICAgICAgICAgIHYucGIobXAoaS0xLGkpKTsKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgICAgIGkrKzsKICAgICAgICAgICAgaWYoKGJifGdnKT09MCkgYnJlYWs7CiAgICAgICAgfQogICAgCiAgICAvLyByZW1haW5pbmcgUidzCiAgICB3aGlsZSAocnIgPiAwKQogICAgewogICAgICAgIHMgKz0gJ1InOwogICAgICAgIHYucGIobXAoMSxpKSk7CiAgICAgICAgaSsrOwogICAgICAgIHJyLS07CiAgICB9CiAgLy8gSWYgbnVtYmVyIG9mIFI+RyB0aGVuIHdlIHN3YXAgUiB0byBHIGFuZCBHIHRvIFIKICAgIGlmKGc8cikKICAgIHsKICAgICAgICBmZm9yKGksMCxzeihzKS0xKQogICAgICAgIHsKICAgICAgICAgICAgaWYoc1tpXT09J1InKQogICAgICAgICAgICBzW2ldPSdHJzsKICAgICAgICAgICAgZWxzZSBpZihzW2ldPT0nRycpCiAgICAgICAgICAgIHNbaV09J1InOwogICAgICAgIH0KICAgIH0KCiAgICAvLyBwcmludCB0aGUgYW5zd2VyCiAgICBjb3V0IDw8IHMgPDwgZW5kbDsKCiAgICBmZm9yKGksMCxzeih2KS0xKQogICAgewogICAgICAgIGNvdXQ8PHZbaV0uZmY8PCIgIjw8dltpXS5zczw8ZW5kbDsKICAgIH0KfQoKCmludCBtYWluKCkKewogICAgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CgogICAgY2luLnRpZShOVUxMKTsKICAgIGNvdXQudGllKE5VTEwpOwoKICAgIGludCB0OwogICAgY2luID4+IHQ7CiAgICBmZm9yKGosIDEsIHQpCiAgICB7IAogICAgICAgc29sdmUoKTsKICAgIH0KfQ==