T = int(input()) def repl(s): if s == "0": return "1" else: return "0" def solve(): N = int(input()) S = list(input()) for i in range(N): if S[(i - 2) % N] == S[(i - 1) % N] == S[i] != "?": print("No") #print(S) return if S[i] == "?": if S[(i - 2) % N] == S[(i - 1) % N] != "?": S[i] = repl(S[(i - 1) % N]) for i in reversed(range(N)): if S[(i + 2) % N] == S[(i + 1) % N] == S[i] != "?": print("No") #print(S) return if S[i] == "?": if S[(i + 2) % N] == S[(i + 1) % N] != "?": S[i] = repl(S[(i + 1) % N]) for i in range(N): if S[(i - 2) % N] == S[(i - 1) % N] == S[i] != "?": print("No") #print(S) return #print("Yes") print(S) for _ in range(T): solve()