#include <bits/stdc++.h>
using namespace std;
int m, n;
int main() {
int T;
scanf("%d", &T);
while (T--) {
//林队(Grass)先手
scanf("%d %d", &n, &m);
if (n % (m + 1) == 0)
puts("Rabbit");
else
puts("Grass");
}
return 0;
}