#include<bits/stdc++.h>
using namespace std;
int c,n,m;
int main()
{
cin>>c;
while(c--){
cin>>n>>m;
int t;
t=1+m;
if(n%t==0) printf("Rabbit\n");
else printf("Grass\n");
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int c,n,m;
int main()
{
cin>>c;
while(c--){
cin>>n>>m;
int t;
t=1+m;
if(n%t==0) printf("Rabbit\n");
else printf("Grass\n");
}
return 0;
}