#include <bits/stdc++.h>
using namespace std;
using lld = long long int;
lld gcd(lld a, lld b) { return a == 0 ? b : gcd(b % a, a); }
lld lcm(lld a, lld b) { return a / gcd(a, b) * b; }
int main() {
  int tc;
  cin >> tc;
  int i = 1;
  while (tc--) {
    lld x, y, k;
    cin >> x >> y >> k;
    lld r = min(x, y) / gcd(x, y);
    lld b = max(x, y) / gcd(x, y);
    lld l = lcm(r, b);
    lld slots = b - 1;
    lld r_amount =
        slots / r + (slots % r ? 1 : 0) - (1 + r * (slots / r - 1) % b == 0);
    lld b_amount = 1LL;
    if ((r_amount < k && b_amount < k)) {
      cout << "OBEY" << endl;
    } else {
      cout << "REBEL" << endl;
    }
  }
  return 0;
}
