Problem: You are a rebel leader and you are planning to start a revolution in your country. But the evil Government found out about your plans and set your punishment in the form of correctional labor.

You must paint a fence which consists of 10^{100} planks in two colors in the following way (suppose planks are numbered from left to right from 0): 

  * if the index of the plank is divisible by r (such planks have indices 0, r, 2r and so on) then you must paint it red; 
  * if the index of the plank is divisible by b (such planks have indices 0, b, 2b and so on) then you must paint it blue; 
  * if the index is divisible both by r and b you can choose the color to paint the plank; 
  * otherwise, you don't need to paint the plank at all (and it is forbidden to spent paint on it). 



Furthermore, the Government added one additional restriction to make your punishment worse. Let's list all painted planks of the fence in ascending order: if there are k consecutive planks with the same color in this list, then the Government will state that you failed the labor and execute you immediately. If you don't paint the fence according to the four aforementioned conditions, you will also be executed.

The question is: will you be able to accomplish the labor (the time is not important) or the execution is unavoidable and you need to escape at all costs.

Input

The first line contains single integer T (1 ≤ T ≤ 1000) — the number of test cases.

The next T lines contain descriptions of test cases — one per line. Each test case contains three integers r, b, k (1 ≤ r, b ≤ 10^9, 2 ≤ k ≤ 10^9) — the corresponding coefficients.

Output

Print T words — one per line. For each test case print REBEL (case insensitive) if the execution is unavoidable or OBEY (case insensitive) otherwise.

Example

Input


4
1 1 2
2 10 4
5 2 3
3 2 2


Output


OBEY
REBEL
OBEY
OBEY

Solution (in PYTHON3):

Solution:
from math import ceil
from math import floor	
from math import sqrt
from math import log
from sys import stdout

prime = pow(10, 9) + 7

def mod_expo(n, p, m):
	"""find (n^p)%m"""
	result = 1
	while p != 0:
		if p%2 == 1:
			result = (result * n)%m
		p //= 2
		n = (n * n)%m
	return result
	
def find_sequences(n):
	result = []
	if n <= 3:
		return result
	while n > 5:
		result.append("24 * 1 = 24")
		result.append(str(n) + " - " + str(n-1) + " = 1")
		n -= 2
	result.reverse()
	if n == 4:
		result.insert(0, "1 + 2 = 3")
		result.insert(1, "3 + 3 = 6")
		result.insert(2, "4 * 6 = 24")
	elif n == 5:
		result.insert(0, "1 + 4 = 5")
		result.insert(1, "5 * 5 = 25")
		result.insert(2, "25 - 3 = 22")
		result.insert(3, "22 + 2 = 24")
	return result
	
def check(n, k):
	v = 0
	left = n
	while left > 0:
		current = min(left, k)
		v += current
		left -= current
		left -= left//10
	return (2*v >= n)	
	
def get_pair_count(n, arr):
	count = 0
	mp = {}
	for i in range(n):
		if arr[i] not in mp:
			mp[arr[i]] = 0
		mp[arr[i]] += 1 
	for i in range(n):
		for deg in range(1, 31):
			val = pow(2, deg) - arr[i] 
			if val in mp:
				count += mp[val]
				if val == arr[i]:
					count -= 1
		mp[arr[i]] -= 1
				
	return count

def find_bsearch(n):
	left = 1
	right = n
	middle = 0
	if n <= 2:
		return 1
	while left < right:
		#if (middle == int((left + right)/2)):
		#	right = middle
		middle = left + (right - left)//2
		#print(left, middle, right)
		if check(n, middle):
			if middle == left or not check(n, middle-1):
				return middle
			right = middle-1
		else:
			left = middle+1
	return left	
		
def count_resistors(a, b):
	level = -1
	while b:
		cont, a = divmod(a, b)
		level += cont
		a, b = b, a
	if a == 1:
		return level+1
	return -1
def get_moves_count(n):
	s = 0
	j = 1
	for i in range(3, n+1, 2):
		s += 4*(i - 1)*j
		j += 1

	return s

def find_index(n):
	i = 2
	fibo = [0, 1]
	while(True):
		fibo.append(fibo[i-1] + fibo[i-2])
		if fibo[i] == n:
			return i-2;
		if fibo[i] > n:
			return i-3;
		i += 1

def primeFactors(n): 
    # Print the number of two's that divide n 
	factors = []
	while n % 2 == 0: 
		factors.append(2)
		n = n / 2
          
    # n must be odd at this point 
    # so a skip of 2 ( i = i + 2) can be used 
	for i in range(3,int(math.sqrt(n))+1,2): 
          
        # while i divides n , print i ad divide n 
		while n % i== 0: 
			factors.append(i)
			n = n / i 
              
    # Condition if n is a prime 
    # number greater than 2 
	if n > 2: 
		factors.append(n)
	factors = set(factors)
	print(factors)

def get_ideal_playlist(n, k, songs):
	mx = 0
	pref_sum = []
	pref_sum.append(0)
	songs.sort(key = lambda x : x[1])
	for i in range(1, n+1):
		pref_sum.append(songs[i-1][0] + pref_sum[i-1])
	for i in range(1, n+1):
		current = pref_sum[min(n, i+k-1)] 
		if i > 0:
			current -= pref_sum[i-1]
		current *= songs[i-1][1]
		mx = max(mx, current)
	return mx
	
def gcd(m, n):
	if n == 0:
		return m
	return gcd(n, m%n)

def lcm(m, n):
	return (m*n)/gcd(m, n)

def should_obey(r, b, k):
	if b < r:
		b, r = r, b
	g = gcd(r, b)
	r /= g
	b /= g
	#print((k-1)*r + 1, b)
	return (k-1)*r + 1 >= b 

def find_dig(n):
	mn = 10
	mx = -1
	while (n > 0):
		mn = min(mn, n%10)
		mx = max(mx, n%10)
		n //= 10
	return [mn, mx]
		

def operate(n, k):
	for i in range(2, k+1):
		dig = find_dig(n)
		if dig[0] == 0:
			return n
		n = n + dig[0]*dig[1]
	return n
	
def find_petya_wins(N, S):
	total = S
	arr = []
	for i in range(n-1):
		arr.append(S//N)
		total -= S//N
	arr.append(total)
	if (S//N > 1 and total > 1):
		print("YES")
		print(*arr, sep=' ')
		print(1)
	else:
		print("NO")
def find_max_candies(n, a, b, p, q):
	A = n//a
	B = n//b
	C = int(n//lcm(a, b))
	mx = 0
	if q >= p:
		return p*(A - C) + q*B
	return p*A + q*(B - C)

t=1
t=int(input())
while t:
	t = t - 1
	count=0
	#n, a, b, p, q = map(int, input().split())
	r, b, k = map(int, input().split())

	# text = input()
	#n = int(input())
	#arr = list(map(int, input().strip().split()))[:n]
	# b = list(map(int, input().strip().split()))[:n]
	#N = input()
	# below = input()
	#n, X = map(int, input().split())
	songs = [] 
	#for i in range(n):
	#	l, b = map(int, input().split())
	#	songs.append((l, b))
	# print(a + g)

	#print(operate(n,k))
	#if is_possible(n, m , x, y):
	 #	print("Chefirnemo")
	#else:
	#	print("Pofik")
	#answers = find_sequences(n)
	if should_obey(r, b, k):
		print("OBEY")
	#	for answer in answers:
	#		print(answer)
	else:
		print("REBEL")