#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-6;
const unsigned long long hashp = 1e7 + 19;
const long long INF = 0x3f3f3f3f3f3f3f3fll;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int maxn = 2e5 + 100;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
void solve() {
  int n;
  scanf("%d", &n);
  while (n--) {
    int r, b, k;
    scanf("%d%d%d", &r, &b, &k);
    if (r > b) swap(r, b);
    int ans = (b + r - 1) / r - 1;
    if ((b % r) && (r % (b % r))) ans++;
    if (ans >= k)
      printf("REBEL\n");
    else
      printf("OBEY\n");
  }
}
int main() {
  solve();
  return 0;
}
