import java.util.Scanner;
import java.util.*;
import java.util.stream.Collectors;
import java.math.BigInteger;
class Main {
public static void main(String[] args) {
// 处理输入
Scanner in = new Scanner(System.in);
int t = in.nextInt();
long[][] cases = new long[t][2];
for (int i = 0; i < t; i++) {
cases[i][0] = in.nextLong();
cases[i][1] = in.nextLong();
}
for (int i = 0; i < t; i++) {
long n = cases[i][0];
long k = cases[i][1];
String res = find(n - 1, k) == 'R' ? "red" : "blue";
System.out.println(res);
}
}
private static char find(long n, long k) {
if (n == 0) {
return 'R';
}
long len = BigInteger.valueOf(2).pow((int) n).longValue();
// 如果 k 在后半段,则与前一个字符串相同
if (k >= len / 2) {
long pos = k - len / 2;
return find(n - 1, pos);
} else {
// 如果 k 在前半段,则与前一个字符串相反
return find(n - 1, k) == 'R' ? 'B' : 'R';
}
}
}