#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  long long t, k, b, r, d, e, f;
  cin >> t;
  while (t--) {
    cin >> r >> b >> k;
    if (r > b) {
      d = r;
      e = b;
    } else {
      d = b;
      e = r;
    }
    d = d / gcd(r, b);
    e = e / gcd(r, b);
    if (e == 1)
      f = d - 1;
    else
      f = (d - 2) / e + 1;
    if (f < k)
      cout << "OBEY";
    else
      cout << "REBEL";
    cout << endl;
  }
}
