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 sys
  import math
  import heapq
  import bisect
  from collections import Counter
  from collections import defaultdict
  from io import BytesIO, IOBase
  from itertools import permutations
  import string
  
  
  class FastIO(IOBase):
      newlines = 0
  
      def __init__(self, file):
          import os
          self.os = os
          self._fd = file.fileno()
          self.buffer = BytesIO()
          self.writable = "x" in file.mode or "r" not in file.mode
          self.write = self.buffer.write if self.writable else None
          self.BUFSIZE = 8192
  
      def read(self):
          while True:
              b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
              if not b:
                  break
              ptr = self.buffer.tell()
              self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
          self.newlines = 0
          return self.buffer.read()
  
      def readline(self):
          while self.newlines == 0:
              b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
              self.newlines = b.count(b"\n") + (not b)
              ptr = self.buffer.tell()
              self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
          self.newlines -= 1
          return self.buffer.readline()
  
      def flush(self):
          if self.writable:
              self.os.write(self._fd, self.buffer.getvalue())
              self.buffer.truncate(0), self.buffer.seek(0)
  
  
  class IOWrapper(IOBase):
      def __init__(self, file):
          self.buffer = FastIO(file)
          self.flush = self.buffer.flush
          self.writable = self.buffer.writable
          self.write = lambda s: self.buffer.write(s.encode("ascii"))
          self.read = lambda: self.buffer.read().decode("ascii")
          self.readline = lambda: self.buffer.readline().decode("ascii")
  
  
  sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
  input = lambda: sys.stdin.readline().rstrip("\r\n")
  
  
  def get_int():
      return int(input())
  
  
  def get_ints():
      return list(map(int, input().split(' ')))
  
  
  def get_int_grid(n):
      return [get_ints() for _ in range(n)]
  
  
  def get_str():
      return input().strip()
  
  
  def get_strs():
      return get_str().split(' ')
  
  
  def flat_list(arr):
      return [item for subarr in arr for item in subarr]
  
  
  def yes_no(b):
      if b:
          return "YES"
      else:
          return "NO"
  
  
  def binary_search(good, left, right, delta=1, right_true=False):
      """
      Performs binary search
      ----------
      Parameters
      ----------
      :param good: Function used to perform the binary search
      :param left: Starting value of left limit
      :param right: Starting value of the right limit
      :param delta: Margin of error, defaults value of 1 for integer binary search
      :param right_true: Boolean, for whether the right limit is the true invariant
      :return: Returns the most extremal value interval [left, right] which is good function evaluates to True,
              alternatively returns False if no such value found
      """
  
      limits = [left, right]
      while limits[1] - limits[0] > delta:
          if delta == 1:
              mid = sum(limits) // 2
          else:
              mid = sum(limits) / 2
          if good(mid):
              limits[int(right_true)] = mid
          else:
              limits[int(~right_true)] = mid
      if good(limits[int(right_true)]):
          return limits[int(right_true)]
      else:
          return False
  
  
  def prefix_sums(a):
      p = [0]
      for x in a:
          p.append(p[-1] + x)
      return p
  
  
  def solve_a():
      n = get_int()
      a = get_ints()
      x = a[0]
      for i in range(1, n):
          x &= a[i]
      return x
  
  def solve_b():
      n = get_int()
      s = list(get_str())
      if s.count('?') == n:
          s[0] = 'R'
      if True:
          while s.count('?') > 0:
              for i in range(n):
                  if s[i] != '?':
                      pass
                  elif i == 0:
                      if s[i + 1] == 'B':
                          s[i] = 'R'
                      elif s[i + 1] == 'R':
                          s[i] = 'B'
                  elif i == n - 1:
                      if s[i - 1] == 'B':
                          s[i] = 'R'
                      elif s[i - 1] == 'R':
                          s[i] = 'B'
                  else:
                      if 'B' in set([s[i - 1], s[i + 1]]):
                          s[i] = 'R'
                      elif 'R' in set([s[i - 1], s[i + 1]]):
                          s[i] = 'B'
      return ''.join(s)
  
  
  t = get_int()
  for _ in range(t):
      print(solve_b())
  