description: As their story unravels, a timeless tale is told once again...
  
  Shirahime, a friend of Mocha's, is keen on playing the music game Arcaea and sharing Mocha interesting puzzles to solve. This day, Shirahime comes up with a new simple puzzle and wants Mocha to solve them. However, these puzzles are too easy for Mocha to solve, so she wants you to solve them and tell her the answers. The puzzles are described as follow.
  
  There are n squares arranged in a row, and each of them can be painted either red or blue.
  
  Among these squares, some of them have been painted already, and the others are blank. You can decide which color to paint on each blank square.
  
  Some pairs of adjacent squares may have the same color, which is imperfect. We define the imperfectness as the number of pairs of adjacent squares that share the same color.
  
  For example, the imperfectness of "BRRRBBR" is 3, with "BB" occurred once and "RR" occurred twice.
  
  Your goal is to minimize the imperfectness and print out the colors of the squares after painting. 
  
  Input
  
  Each test contains multiple test cases. 
  
  The first line contains a single integer t (1 ≤ t ≤ 100) — the number of test cases. Each test case consists of two lines.
  
  The first line of each test case contains an integer n (1≤ n≤ 100) — the length of the squares row.
  
  The second line of each test case contains a string s with length n, containing characters 'B', 'R' and '?'. Here 'B' stands for a blue square, 'R' for a red square, and '?' for a blank square.
  
  Output
  
  For each test case, print a line with a string only containing 'B' and 'R', the colors of the squares after painting, which imperfectness is minimized. If there are multiple solutions, print any of them.
  
  Example
  
  Input
  
  
  5
  7
  ?R???BR
  7
  ???R???
  1
  ?
  1
  B
  10
  ?R??RB??B?
  
  
  Output
  
  
  BRRBRBR
  BRBRBRB
  B
  B
  BRRBRBBRBR
  
  Note
  
  In the first test case, if the squares are painted "BRRBRBR", the imperfectness is 1 (since squares 2 and 3 have the same color), which is the minimum possible imperfectness.
solution: /*
      Date: 23-08-2021
      Time: 11:16
      Author: Kartik Papney
      Linkedin: https://www.linkedin.com/in/kartik-papney-4951161a6/
      Leetcode: https://leetcode.com/kartikpapney/
      Codechef: https://www.codechef.com/users/kartikpapney
  */
  
  import java.util.*;
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  
  
  public class Main {
  
      public static void dfs(StringBuilder strb, char c, int i, int diff) {
          if(i == -1 || i==strb.length() || strb.charAt(i) != '?') return;
          strb.setCharAt(i, c);
          dfs(strb, c=='R'?'B':'R', i+diff, diff);
      }
      public static void solve() {
          int n = sc.nextInt();
          StringBuilder strb = new StringBuilder(sc.nextLine());
          for(int i=0; i<strb.length(); i++) {
              if(strb.charAt(i) != '?') {
                  dfs(strb, strb.charAt(i)=='R'?'B':'R', i-1, -1);
                  dfs(strb, strb.charAt(i)=='R'?'B':'R', i+1, 1);
              }
          }
          if(strb.charAt(strb.length()-1) == '?') {
              dfs(strb, 'R', strb.length()-1, -1);
          }
          p.writeln(strb.toString());
      }
  
      public static void main(String[] args) {
          int t = 1;
           t = sc.nextInt();
          while (t-- != 0) {
              solve();
          }
          p.print();
      }
  
  
      static final Integer MOD = (int) 1e9 + 7;
      static final FastReader sc = new FastReader();
      static final Print p = new Print();
  
      static class Functions {
  
          static void sort(int[] a) {
              ArrayList<Integer> l = new ArrayList<>();
              for (int i : a) l.add(i);
              Collections.sort(l);
              for (int i = 0; i < a.length; i++) a[i] = l.get(i);
          }
  
          static void sort(long[] a) {
              ArrayList<Long> l = new ArrayList<>();
              for (long i : a) l.add(i);
              Collections.sort(l);
              for (int i = 0; i < a.length; i++) a[i] = l.get(i);
          }
  
          static int max(int[] a) {
              int max = Integer.MIN_VALUE;
              for (int val : a) max = Math.max(val, max);
              return max;
          }
  
          static int min(int[] a) {
              int min = Integer.MAX_VALUE;
              for (int val : a) min = Math.min(val, min);
              return min;
          }
  
          static long min(long[] a) {
              long min = Long.MAX_VALUE;
              for (long val : a) min = Math.min(val, min);
              return min;
          }
  
          static long max(long[] a) {
              long max = Long.MIN_VALUE;
              for (long val : a) max = Math.max(val, max);
              return max;
          }
  
          static long sum(long[] a) {
              long sum = 0;
              for (long val : a) sum += val;
              return sum;
          }
  
          static int sum(int[] a) {
              int sum = 0;
              for (int val : a) sum += val;
              return sum;
          }
  
          public static long mod_add(long a, long b) {
              return (a % MOD + b % MOD + MOD) % MOD;
          }
  
          public static long pow(long a, long b) {
              long res = 1;
              while (b > 0) {
                  if ((b & 1) != 0)
                      res = mod_mul(res, a);
                  a = mod_mul(a, a);
                  b >>= 1;
              }
              return res;
          }
  
          public static long mod_mul(long a, long b) {
              long res = 0;
              a %= MOD;
              while (b > 0) {
                  if ((b & 1) > 0) {
                      res = mod_add(res, a);
                  }
                  a = (2 * a) % MOD;
                  b >>= 1;
              }
              return res;
          }
  
          public static long gcd(long a, long b) {
              if (a == 0) return b;
              return gcd(b % a, a);
          }
  
          public static long factorial(long n) {
              long res = 1;
              for (int i = 1; i <= n; i++) {
                  res = (i % MOD * res % MOD) % MOD;
              }
              return res;
          }
  
          public static int count(int[] arr, int x) {
              int count = 0;
              for (int val : arr) if (val == x) count++;
              return count;
          }
  
          public static ArrayList<Integer> generatePrimes(int n) {
              boolean[] primes = new boolean[n];
              for (int i = 2; i < primes.length; i++) primes[i] = true;
              for (int i = 2; i < primes.length; i++) {
                  if (primes[i]) {
                      for (int j = i * i; j < primes.length; j += i) {
                          primes[j] = false;
                      }
                  }
              }
              ArrayList<Integer> arr = new ArrayList<>();
              for (int i = 0; i < primes.length; i++) {
                  if (primes[i]) arr.add(i);
              }
              return arr;
          }
      }
  
      static class Print {
          StringBuffer strb = new StringBuffer();
  
          public void write(Object str) {
              strb.append(str);
          }
  
          public void writes(Object str) {
              strb.append(str).append(" ");
          }
  
          public void writeln(Object str) {
              strb.append(str).append("\n");
          }
  
          public void writeln() {
              strb.append('\n');
          }
  
          public void writes(int[] arr) {
              for (int val : arr) {
                  write(val);
                  write(' ');
              }
          }
  
          public void writes(long[] arr) {
              for (long val : arr) {
                  write(val);
                  write(' ');
              }
          }
  
          public void writeln(int[] arr) {
              for (int val : arr) {
                  writeln(val);
              }
          }
  
          public void print() {
              System.out.print(strb);
          }
  
          public void println() {
              System.out.println(strb);
          }
      }
  
      static class FastReader {
          BufferedReader br;
          StringTokenizer st;
  
          public FastReader() {
              br = new BufferedReader(new InputStreamReader(System.in));
          }
  
          String next() {
              while (st == null || !st.hasMoreElements()) {
                  try {
                      st = new StringTokenizer(br.readLine());
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
              return st.nextToken();
          }
  
          int nextInt() {
              return Integer.parseInt(next());
          }
  
          long nextLong() {
              return Long.parseLong(next());
          }
  
          double nextDouble() {
              return Double.parseDouble(next());
          }
  
          int[] readArray(int n) {
              int[] a = new int[n];
              for (int i = 0; i < n; i++) a[i] = nextInt();
              return a;
          }
  
          long[] readLongArray(int n) {
              long[] a = new long[n];
              for (int i = 0; i < n; i++) a[i] = nextLong();
              return a;
          }
  
          double[] readArrayDouble(int n) {
              double[] a = new double[n];
              for (int i = 0; i < n; i++) a[i] = nextInt();
              return a;
          }
  
          String nextLine() {
              String str = "";
              try {
                  str = br.readLine();
              } catch (IOException e) {
                  e.printStackTrace();
              }
              return str;
          }
      }
  }
  