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: import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.util.*;
  
  import static java.lang.Math.*;
  
  public class Solution3 {
  
      //------------------------------------------CONSTANTS---------------------------------------------------------------
      public static final int MOD = (int) (1e9 + 7);
  
      //---------------------------------------------I/0------------------------------------------------------------------
  
      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());
          }
  
          String nextLine()
          {
              String str = "";
              try {
                  str = br.readLine();
              }
              catch (IOException e) {
                  e.printStackTrace();
              }
              return str;
          }
      }
  
      public static void print(String s) {
          System.out.println(s);
      }
  
      public static void main(String[] args) {
          FastReader sc = new FastReader();
  
          int t = 1;
          t = sc.nextInt();
  
          for(int i = 0; i<t; i++) {
              System.out.println(solve(sc));
          }
      }
  
      //------------------------------------------------SOLVE-------------------------------------------------------------
  
      public static String solve(FastReader sc) {
          int n = sc.nextInt();
          String sss = sc.next();
          char[] s = sss.toCharArray();
          boolean yes = true;
          if (!sss.contains("R") && !sss.contains("B")) {
              StringBuilder res = new StringBuilder("");
              for (int i = 0; i<n; i++) {
                  if (i%2==0)
                  res.append('R');
                  else
                      res.append('B');
              }
              return res.toString();
          }
  
  
          while (yes) {
              for (int i = 0; i < n; i++) {
                  if (s[i] == 'R') {
                      if (i - 1 > -1 && s[i - 1] == '?') {
                          s[i - 1] = 'B';
                      }
                      if (i + 1 <= n - 1 && s[i + 1] == '?') {
                          s[i + 1] = 'B';
                      }
                  } else if (s[i] == 'B') {
                      if (i - 1 > -1 && s[i - 1] == '?') {
                          s[i - 1] = 'R';
                      }
                      if (i + 1 <= n - 1 && s[i + 1] == '?') {
                          s[i + 1] = 'R';
                      }
                  }
              }
              yes = false;
              for (int i = 0; i<n; i++) {
                  if (s[i]=='?') {
                      yes = true;
                  }
              }
          }
  
          StringBuilder ss = new StringBuilder("");
          for (char c : s) {
              ss.append(c);
          }
  
          return ss.toString();
      }
  
      //-----------------------------------------------FUNCTIONS----------------------------------------------------------
  
      public static void printArray(int[] a) {
          for(int i = 0; i<a.length; i++) {
              System.out.print(a[i] + " ");
          }
      }
  
      // first element that is not less than target
      public static int lowerBound(int[] arr, int begin, int end, int target) {
          while(begin < end) {
              int mid = begin + (end - begin) / 2;
              // When the element is less than the mid target
              if(arr[mid] < target)
                  // begin to mid + 1, arr [begin] value is less than or equal target
                  begin = mid + 1;
                  // When the mid target element when greater than or equal
              else if(arr[mid] >= target)
                  end = mid;
          }
          return begin;
      }
  
      // first element that is greater than target
      public static int upperBound(int[] arr, int begin, int end, int target) {
          while(begin < end) {
              int mid = begin + (end - begin) / 2;
              if(arr[mid] <= target)
                  begin = mid + 1;
              else if(arr[mid] < target)
                  end = mid;
          }
          return begin;
      }
  
      // generate permutations (call search and access through permutations)
      public static class Permutations {
          List<List<Integer>> permutations = new ArrayList<>();
          List<Integer> permutation = new ArrayList<>();
          boolean[] taken;
          int[] a;
  
          public Permutations(int[] a) {
              this.a = a;
              taken = new boolean[a.length];
          }
  
          void search() {
              if (permutation.size()==a.length) {
                  permutations.add(new ArrayList<>(permutation));
              } else {
                  for (int i = 0; i<a.length; i++) {
                      if (taken[i]) {
                          continue;
                      }
                      taken[i] = true;
                      permutation.add(a[i]);
                      search();
                      taken[i] = false;
                      permutation.remove(permutation.size()-1);
                  }
              }
          }
      }
  
      // generate subsets (call search and access subsets)
      public static class Subsets {
          List<List<Integer>> subsets = new ArrayList<>();
          List<Integer> subset = new ArrayList<>();
  
          void search(int[] a, int x) {
              if (x == a.length) {
                  subsets.add(new ArrayList<>(subset));
              } else {
                  subset.add(a[x]);
                  search(a, x+1);
                  subset.remove(subset.size() - 1);
                  search(a, x+1);
              }
          }
      }
  
      public static long gcd(long a, long b) {
          while (b != 0) {
              long t = b;
              b = a % b;
              a = t;
          }
          return a;
      }
  
      public static long lcm(long a, long b) {
          return (a*b)/gcd(a, b);
      }
  
      public static int[] prefixSum(int[] a) {
          int n = a.length;
          int[] ps = new int[n];
          ps[0] = a[0];
  
          for (int i = 1; i<n; i++) {
              ps[i] = ps[i-1] + a[i];
          }
  
          return ps;
      }
  
      public static int[][] prefixSum2D(int[][] a) {
          int n = a.length;
          int m = a[0].length;
          int[][] ps = new int[n][m];
          ps[0][0] = a[0][0];
  
          for (int j = 1; j<m; j++) {
              ps[0][j] = ps[0][j-1] + a[0][j];
          }
          for (int i = 1; i<n; i++) {
              ps[i][0] = ps[i-1][0] + a[i][0];
          }
  
          for (int i = 1; i<n; i++) {
              for (int j = 1; j<m; j++) {
                  ps[i][j] = ps[i-1][j] + ps[i][j-1] - ps[i-1][j-1] + a[i][j];
              }
          }
  
          return ps;
      }
  
      public static double log2(double a) {
          return log(a)/log(2);
      }
  
      //----------------------------------------DATA-STRUCTURES-----------------------------------------------------------
  
      // Range queries (i.e. RMQ) in O(1), others with functions in O(log n)
      public static class SparseTable {
          int[][] st;
          int n;
          int k;
  
          public SparseTable(int[] a) {
              n = a.length;
              k = (int) log2(n);
              st = new int[n][k+1];
  
              for (int i = 0; i<n; i++) {
                  st[i][0] = a[i];
              }
  
              // 1<<j == 2^j
              for (int j = 1; j<=k; j++) {
                  for (int i = 0; i + (1 << j) <= n; i++) {
                      st[i][j] = min(st[i][j-1], st[i + (1 << (j - 1))][j - 1]);
                  }
              }
          }
  
          //not always available O(log n) -- change the constructor to use it
          public long sumQuery(int l, int r) {
              long sum = 0;
              for (int j = k; j>=0; j--) {
                  if ((1 << j) <= r - l + 1) {
                      sum += st[l][j];
                      l += 1 << j;
                  }
              }
  
              return sum;
          }
  
          //always available O(1) -- change this and the constructor for rangeMaxQuery
          public int rangeMinQuery(int l, int r) {
              int j = (int) log2(r - l + 1);
              int min = min(st[l][j], st[r - (1 << j) + 1][j]);
              return min;
          }
  
      }
  
      //Range Sum Dynamic Queries O(log n)
      public static class BinaryIndexedTree {
  
          int[] bit;
  
          public BinaryIndexedTree(int[] a) {
              int n = a.length;
              bit = new int[n+1];
              // Store the actual values in BITree[]
              // using update()
              for(int i = 0; i < n; i++)
                  updateBit(i, a[i]);
          }
  
          // O(log n) update delta at index in the array (do it on the array and then call this function)
          public void updateBit(int index, int delta) {
              index += 1;
  
              while (index <= bit.length) {
                  bit[index] += delta;
  
                  index += index & (-index);
              }
          }
  
          // Computes sum a[0...index] in O(log n)
          public int getSum(int index) {
              int sum = 0;
  
              index += 1;
  
              while (index > 0) {
                  sum += bit[index];
  
                  index -= index & (-index);
              }
  
              return sum;
          }
      }
  
      public static class UnionFind {
  
          int[] link;
          int[] size;
  
          UnionFind(int n) {
              link = new int[n];
              size = new int[n];
              for (int i = 0; i<n; i++) {
                  link[i] = i;
                  size[i] = 1;
              }
          }
  
          int find(int x) {
              while (x != link[x]) x = link[x];
              return x;
          }
  
          boolean same(int a, int b) {
              return find(a) == find(b);
          }
  
          void unite(int a, int b) {
              a = find(a);
              b = find(b);
  
              if (size[a] < size[b]) {
                  int temp = a;
                  a = b;
                  b = temp;
              }
  
              size[a] += size[b];
              link[b] = a;
          }
      }
  
      public static class SegmentTree {
  
          int st[];
  
          public SegmentTree(int arr[]) {
              int n = arr.length;
  
              int x = (int) (Math.ceil(log2(n)));
  
              int maxSize = 2 * (int) Math.pow(2, x) - 1;
  
              st = new int[maxSize];
  
              build(arr, 0, n-1, 0);
          }
  
          int build(int arr[], int ss, int se, int si) {
              if (ss == se) {
                  st[si] = arr[ss];
                  return arr[ss];
              }
  
              int mid = ss + (se - ss) / 2; //ss+se/2
  
              st[si] = build(arr, ss, mid, si * 2 + 1) +
                      build(arr, mid + 1, se, si * 2 + 2);
              return st[si];
          }
  
          private int getSumUtil(int ss, int se, int l, int r, int si) {
              if (l <= ss && r >= se) {
                  return st[si];
              }
  
              if (se < l || ss > r) {
                  return 0;
              }
  
              int mid = ss + (se - ss) / 2;
              return getSumUtil(ss, mid, l, r, 2 * si + 1) +
                      getSumUtil(mid + 1, se, l, r, 2 * si + 2);
          }
  
          void updateValueUtil(int ss, int se, int i, int diff, int si) {
              if (i < ss || i > se) {
                  return;
              }
  
              st[si] = st[si] + diff;
              if (se != ss) {
                  int mid = ss + (se - ss) / 2;
                  updateValueUtil(ss, mid, i, diff, 2 * si + 1);
                  updateValueUtil(mid + 1, se, i, diff, 2 * si + 2);
              }
          }
  
          int getSum(int n, int l, int r) {
              if (l < 0 || r > n - 1 || l > r) {
                  return -1;
              }
  
              return getSumUtil(0, n-1, l, r, 0);
          }
  
          // don't do it directly on the array but use this function that will
          // do everything for you
          void updateValue(int arr[], int n, int i, int newValue) {
              if (i < 0 || i > n - 1) {
                  return;
              }
  
              int diff = newValue - arr[i];
  
              arr[i] = newValue;
  
              updateValueUtil(0, n - 1, i, diff, 0);
          }
      }
  }