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 javafx.scene.layout.Priority;
  import sun.reflect.generics.tree.Tree;
  
  import java.sql.Array;
  import java.util.*;
  import java.io.*;
  import java.util.stream.Stream;
  
  import static java.lang.Math.*;
  public class B
  {
      static InputReader in=new InputReader(System.in);
      static OutputWriter out=new OutputWriter(System.out);
      static StringBuilder sb=new StringBuilder();
      static long MOD = (long)(998244353);
  
      static int n;
      static int a[];
  
      // Main Class Starts Here
      public static void main(String args[])throws IOException
      {
          // Write your code.
          int t = in();
          while(t-->0) {
              int n = in();
              char a[] = sn().toCharArray();
              if(a[0] == '?') {
                  a[0] = 'B';
                  String st1 = generateString(a.clone(), n);
                  a[0] = 'R';
                  String st2 = generateString(a.clone(), n);
                  if(countDup(st1) <= countDup(st2)){
                      app(st1+"\n");
                  }
                  else{
                      app(st2+"\n");
                  }
              }
              else{
                  app(generateString(a, n)+"\n");
              }
          }
          out.printLine(sb);
          out.close();
      }
  
      public static int countDup(String str){
          int n = str.length();
          int count = 0;
          for(int i = 1; i < n; i++){
              char cur = str.charAt(i);
              char prev = str.charAt(i-1);
              if(cur == prev)
                  count++;
          }
          return count;
      }
  
      public static String generateString(char a[], int n){
          for(int i = 1; i < n; i++){
              if(a[i] == '?'){
                  if(a[i-1] == 'R')
                      a[i] = 'B';
                  else
                      a[i] = 'R';
              }
              else{
                  continue;
              }
          }
          String str = "";
          for(char x: a)
              str += x;
          return str;
      }
  
      static class DisjointSet{
          int par[];
          int rank[];
          int n;
          public DisjointSet(int n){
              this.n = n;
              par = new int[n];
              rank = new int[n];
              for(int i = 0; i < n; i++){
                  par[i] = i;
              }
          }
  
          public int findPar(int i){
              // path compression.
              if(par[i] != i){
                  par[i] = findPar(par[i]);
              }
              return par[i];
          }
  
          public int merge(int x, int y){
              int parX = findPar(x);
              int parY = findPar(y);
              if(parX == parY) return 0; // no decrease in connected components
              if(rank[parX] > rank[parY]){
                  // merge y to x.
                  par[parY] = parX;
              }
              else if(rank[parY] > rank[parX]){
                  par[parX] = parY;
              }
              else{
                  par[parY] = parX;
                  rank[parX]++;
              }
              return 1; // after merging the decrease in connected components is 1.
          }
      }
  
      public static class Edge{
          int from;
          int to;
          int id;
          boolean visited;
          public Edge(int from, int to, int id){
              this.from = from;
              this.to = to;
              this.id =id;
              this.visited = false;
          }
      }
  
      public static int[] an(int n) {
          int ar[]=new int[n];
          for(int i=0;i<n;i++)
              ar[i]=in();
          return ar;
      }
  
      public static long[] lan(int n) {
          long ar[]=new long[n];
          for(int i=0;i<n;i++)
              ar[i]=lin();
          return ar;
      }
  
      public static String atos(Object ar[]) {
          return Arrays.toString(ar);
      }
  
      public static int in() {
          return in.readInt();
      }
  
      public static long lin() {
          return in.readLong();
      }
  
      public static String sn() {
          return in.readString();
      }
  
      public static void prln(Object o) {
          out.printLine(o);
      }
  
      public static void prn(Object o) {
          out.print(o);
      }
  
      public static void display(int a[]) {
          out.printLine(Arrays.toString(a));
      }
  
      public static HashMap<Integer,Integer> hm(int a[]){
          HashMap<Integer,Integer> map=new HashMap<>();
          for(int i=0; i < a.length;i++) {
              int keep = (int)map.getOrDefault(a[i],0);
              map.put(a[i],++keep);
          }
          return map;
      }
  
      public static void app(Object o) {
          sb.append(o);
      }
  
      public static long calcManhattanDist(int x1,int y1,int x2,int y2) {
          long xa = Math.abs(x1-x2);
          long ya = Math.abs(y1-y2);
          return (xa+ya);
      }
  
  
      static class InputReader {
          private InputStream stream;
          private byte[] buf = new byte[1024];
          private int curChar;
          private int numChars;
          private SpaceCharFilter filter;
  
          public InputReader(InputStream stream) {
              this.stream = stream;
          }
  
          public int read() {
              if (numChars == -1)
                  throw new InputMismatchException();
              if (curChar >= numChars) {
                  curChar = 0;
                  try {
                      numChars = stream.read(buf);
                  } catch (IOException e) {
                      throw new InputMismatchException();
                  }
                  if (numChars <= 0)
                      return -1;
              }
              return buf[curChar++];
          }
  
          public int readInt() {
              int c = read();
              while (isSpaceChar(c))
                  c = read();
              int sgn = 1;
              if (c == '-') {
                  sgn = -1;
                  c = read();
              }
              int res = 0;
              do {
                  if (c < '0' || c > '9')
                      throw new InputMismatchException();
                  res *= 10;
                  res += c - '0';
                  c = read();
              } while (!isSpaceChar(c));
              return res * sgn;
          }
  
          public long readLong() {
              int c = read();
              while (isSpaceChar(c))
                  c = read();
              int sgn = 1;
              if (c == '-') {
                  sgn = -1;
                  c = read();
              }
              long res = 0;
              do {
                  if (c < '0' || c > '9')
                      throw new InputMismatchException();
                  res *= 10;
                  res += c - '0';
                  c = read();
              } while (!isSpaceChar(c));
              return res * sgn;
          }
  
          public String readString() {
              int c = read();
              while (isSpaceChar(c))
                  c = read();
              StringBuilder res = new StringBuilder();
              do {
                  res.appendCodePoint(c);
                  c = read();
              } while (!isSpaceChar(c));
              return res.toString();
          }
  
          public boolean isSpaceChar(int c) {
              if (filter != null)
                  return filter.isSpaceChar(c);
              return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
          }
  
          public String next() {
              return readString();
          }
  
          public interface SpaceCharFilter {
              public boolean isSpaceChar(int ch);
          }
      }
  
      static class OutputWriter {
          private final PrintWriter writer;
  
          public OutputWriter(OutputStream outputStream) {
              writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
          }
  
          public OutputWriter(Writer writer) {
              this.writer = new PrintWriter(writer);
          }
  
          public void print(Object...objects) {
              for (int i = 0; i < objects.length; i++) {
                  if (i != 0)
                      writer.print(' ');
                  writer.print(objects[i]);
              }
          }
  
          public void printLine(Object...objects) {
              print(objects);
              writer.println();
          }
  
          public void close() {
              writer.close();
          }
      }
  }