#include <bits/stdc++.h>
using namespace std;
inline long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    long long r, b, k;
    scanf("%lld%lld%lld", &r, &b, &k);
    if (r > b) swap(r, b);
    if (b == 1) {
      if (k == 1)
        printf("REBEL\n");
      else
        printf("OBEY\n");
      continue;
    }
    long long lcm = r * b / gcd(r, b);
    if ((lcm / r - 1) / (lcm / b) + ((lcm / r - 1) % (lcm / b) > 0) >= k)
      printf("REBEL\n");
    else
      printf("OBEY\n");
  }
  return 0;
}
