Acacius is studying strings theory. Today he came with the following problem.

You are given a string $s$ of length $n$ consisting of lowercase English letters and question marks. It is possible to replace question marks with lowercase English letters in such a way that a string "abacaba" occurs as a substring in a resulting string exactly once?

Each question mark should be replaced with exactly one lowercase English letter. For example, string "a?b?c" can be transformed into strings "aabbc" and "azbzc", but can't be transformed into strings "aabc", "a?bbc" and "babbc".

Occurrence of a string $t$ of length $m$ in the string $s$ of length $n$ as a substring is a index $i$ ($1 \leq i \leq n - m + 1$) such that string $s[i..i+m-1]$ consisting of $m$ consecutive symbols of $s$ starting from $i$-th equals to string $t$. For example string "ababa" has two occurrences of a string "aba" as a substring with $i = 1$ and $i = 3$, but there are no occurrences of a string "aba" in the string "acba" as a substring.

Please help Acacius to check if it is possible to replace all question marks with lowercase English letters in such a way that a string "abacaba" occurs as a substring in a resulting string exactly once.


-----Input-----

First line of input contains an integer $T$ ($1 \leq T \leq 5000$), number of test cases. $T$ pairs of lines with test case descriptions follow.

The first line of a test case description contains a single integer $n$ ($7 \leq n \leq 50$), length of a string $s$.

The second line of a test case description contains string $s$ of length $n$ consisting of lowercase English letters and question marks.


-----Output-----

For each test case output an answer for it.

In case if there is no way to replace question marks in string $s$ with a lowercase English letters in such a way that there is exactly one occurrence of a string "abacaba" in the resulting string as a substring output "No".

Otherwise output "Yes" and in the next line output a resulting string consisting of $n$ lowercase English letters. If there are multiple possible strings, output any.

You may print every letter in "Yes" and "No" in any case you want (so, for example, the strings yEs, yes, Yes, and YES will all be recognized as positive answer).


-----Example-----
Input
6
7
abacaba
7
???????
11
aba?abacaba
11
abacaba?aba
15
asdf???f???qwer
11
abacabacaba

Output
Yes
abacaba
Yes
abacaba
Yes
abadabacaba
Yes
abacabadaba
No
No



-----Note-----

In first example there is exactly one occurrence of a string "abacaba" in the string "abacaba" as a substring.

In second example seven question marks can be replaced with any seven lowercase English letters and with "abacaba" in particular.

In sixth example there are two occurrences of a string "abacaba" as a substring.

Difficulty: MEDIUM
Tags: String algorithms

Implementation

Complete search
Skill types: Complete search

Starter code:

Solutions:
import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def get_str():
	return input().decode().strip()

def rint():
	return map(int, input().split())

def oint():
	return int(input())
xx = 'abac abacaba caba'
xx = 'abacab abacaba bacaba'
t = oint()
ss = list('abacaba')
for _ in range(t):
	n = oint()
	s = list(get_str())
	cnt = 0
	for i in range(n - 6):
		if ss == s[i:i + 7]:
			cnt += 1
	if cnt > 1:
		print('No')
		continue
	if cnt == 1:
		for ii in range(n):
			if s[ii] == '?':
				s[ii] = 'z'
		print('Yes')
		print(''.join(s))
		continue
	for i in range(n - 6):
		s2 = s[:]
		ok = True
		for j in range(i, i + 7):
			if s2[j] == ss[j - i]:
				pass
			elif s2[j] == '?':
				s2[j] = ss[j - i]
			else:
				ok = False
				break
		else:
			if i >= 4 and s2[i - 4:i] == list('abac'):
				ok = False
			elif i >= 6 and s2[i - 6:i] == list('abacab'):
				ok = False
			elif i + 7 + 4 <= n and s2[i + 7:i + 7 + 4] == list('caba'):
				ok = False
			elif i + 7 + 6 <= n and s2[i + 7:i + 7 + 6] == list('bacaba'):
				ok = False
			else:
				for ii in range(n):
					if s2[ii] == '?':
						s2[ii] = 'z'
		if ok == False:
			continue
		else:
			print('Yes')
			print(''.join(s2))
			break
	else:
		print('No')


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())

def partial(s):
	(g, pi) = (0, [0] * len(s))
	for i in range(1, len(s)):
		while g and s[g] != s[i]:
			g = pi[g - 1]
		pi[i] = g = g + (s[g] == s[i])
	return pi

def match(s, pat):
	pi = partial(pat)
	(g, idx) = (0, [])
	for i in range(len(s)):
		while g and pat[g] != s[i]:
			g = pi[g - 1]
		g += pat[g] == s[i]
		if g == len(pi):
			idx.append(i + 1 - g)
			g = pi[g - 1]
	return idx
import re
KEY_WORD = 'abacaba'
REG = re.compile('[a?][b?][a?][c?][a?][b?][a?]')

def main():
	n = itg()
	s = inp()
	occurrence = len(match(s, KEY_WORD))
	if occurrence >= 2:
		return 'No'
	elif occurrence == 1:
		return 'Yes\n' + s.replace('?', 'x')
	for i in range(n - len(KEY_WORD) + 1):
		if not REG.match(s[i:i + len(KEY_WORD)]):
			continue
		check = s[max(0, i - 7):i] + KEY_WORD + s[i + 7:i + 15]
		if len(match(check, KEY_WORD)) == 1:
			ans = list(s)
			ans[i:i + 7] = list(KEY_WORD)
			return 'Yes\n' + ''.join(ans).replace('?', 'x')
	return 'No'
for case in range(itg()):
	print(main())


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')
MOD = 1000000007

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = []
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors.append(i)
			n //= i
		i += 1
	if n > 1:
		factors.append(n)
	return factors

def vars():
	return map(int, input().split())

def array():
	return list(map(int, input().split()))

def cnt(s, sub):
	c = 0
	for i in range(len(s) - len(sub) + 1):
		for j in range(i, i + len(sub)):
			if s[j] != sub[j - i]:
				break
		else:
			c += 1
	return c

def main():
	n = int(input())
	s = input()
	sub = 'abacaba'
	c = cnt(s, sub)
	if c >= 2:
		print('NO')
		return
	elif c == 1:
		s = s.replace('?', 'z')
		print('YES')
		print(s)
		return
	s = list(s)
	res = False
	for i in range(n - len(sub) + 1):
		rep = ''
		for j in range(i, i + len(sub)):
			if s[j] == '?':
				rep += sub[j - i]
			elif s[j] != sub[j - i]:
				break
		else:
			k = 0
			ss = list(s)
			for j in range(i, i + len(sub)):
				if ss[j] == '?':
					ss[j] = rep[k]
					k += 1
			if cnt(ss, sub) == 1:
				s = ss
				res = True
				break
	s = ''.join(s).replace('?', 'z')
	c = cnt(s, sub)
	if not res or cnt(s, sub) >= 2:
		print('NO')
	else:
		print('YES')
		print(s)
t = int(input())
for _ in range(t):
	main()


n = int(input())
target = 'abacaba'

def comp(s):
	cnt = 0
	for i in range(len(s) - 6):
		match = True
		for j in range(7):
			if s[i + j] != target[j]:
				match = False
				break
		if match:
			cnt += 1
	return cnt

def potential(s):
	potlist = []
	for i in range(len(s) - 6):
		pot = True
		for j in range(7):
			if s[i + j] != target[j] and s[i + j] != '?':
				pot = False
				break
		if pot:
			potlist.append(i)
	return potlist
while n > 0:
	t = int(input())
	tmp = input()
	cp = comp(tmp)
	st = list(tmp)
	isans = False
	for i in range(t):
		s = st[:]
		for j in range(t):
			if s[j] != '?':
				continue
			elif i <= j < i + 7:
				s[j] = target[j - i]
			else:
				s[j] = 'd'
		if comp(s) == 1:
			isans = True
			print('yes')
			print(''.join(s))
			break
	if not isans:
		print('no')
	n -= 1


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
from decimal import Decimal
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
temp = 'abacaba'
for _ in range(int(data())):
	n = int(data())
	s = list(data())
	cnt = 0
	for i in range(n - 6):
		j = 0
		while j < 7:
			if temp[j] == s[j + i]:
				j += 1
			else:
				break
		if j == 7:
			cnt += 1
	if cnt > 1:
		out('NO')
		continue
	if cnt == 0:
		for i in range(n - 6):
			j = 0
			while j < 7:
				if temp[j] == s[j + i] or s[j + i] == '?':
					j += 1
				else:
					break
			if j == 7:
				old = s[i:i + 7]
				for k in range(7):
					s[k + i] = temp[k]
				nc = 0
				for k in range(n - 6):
					j = 0
					while j < 7:
						if temp[j] == s[j + k]:
							j += 1
						else:
							break
					if j == 7:
						nc += 1
				if nc == 1:
					cnt = 1
					break
				for k in range(7):
					s[k + i] = old[k]
	if cnt != 1:
		out('NO')
		continue
	out('YES')
	for i in range(n):
		if s[i] == '?':
			s[i] = 'd'
	out(''.join(s))


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7
for _ in range(iinput()):
	n = iinput()
	s = input()
	pattern = 'abacaba'
	flag = False
	for i in range(n - 6):
		flag = True
		for j in range(7):
			if s[i + j] != '?' and s[i + j] != pattern[j]:
				flag = False
				break
		if flag == True:
			temp = list(s[:i] + pattern + s[i + 7:])
			ans = ''
			for item in temp:
				if item == '?':
					ans += 'd'
				else:
					ans += item
			count = 0
			for j in range(n - 6):
				if ans[j:j + 7] == pattern:
					count += 1
			if count == 1:
				print('YES')
				print(ans)
				break
			else:
				flag = False
	if flag == False:
		print('NO')


sub = ['a', 'b', 'a', 'c', 'a', 'b', 'a']

def count(st, n):
	c = 0
	for i in range(n - 6):
		if st[i:i + 7] == sub:
			c += 1
		if c > 1:
			return c
	return c

def check(a, n):
	if n < 7:
		print('No')
		return
	else:
		c = count(a, n)
		if c == 1:
			for i in range(n):
				if a[i] == '?':
					a[i] = 'd'
			print('Yes')
			print(''.join(a))
			return
		if c > 1:
			print('No')
			return
		else:
			for i in range(n - 6):
				taken = []
				for k in range(7):
					if a[i + k] == '?' or a[i + k] == sub[k]:
						taken.append(sub[k])
					else:
						break
				if taken == sub and count(a[:i] + taken + a[i + 7:], n) == 1:
					a[i:i + 7] = sub
					for d in range(n):
						if a[d] == '?':
							a[d] = 'd'
					print('Yes')
					print(''.join(a))
					return
	print('No')
	return
t = int(input())
for p in range(t):
	n = int(input())
	a = list(input())
	check(a, n)


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def possible(temp, test):
	for i in range(7):
		if temp[i] != test[i] and temp[i] != '?':
			return False
	return True

def occCount(a, n, test):
	ans = 0
	for i in range(n - 6):
		if a[i:i + 7] == test:
			ans += 1
	return ans
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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))

def input():
	return sys.stdin.readline().rstrip('\r\n')
t = inp()
test = 'abacaba'
for _ in range(t):
	count = 0
	n = inp()
	s = input()
	for i in range(n - 6):
		if s[i] == 'a' or s[i] == '?':
			temp = s[i:i + 7]
			if possible(temp, test):
				another = s[:i] + test + s[i + 7:]
				if occCount(another, n, test) == 1:
					s = another
					count = 1
					break
	if count == 1:
		print('Yes')
		for i in range(n):
			if s[i] == '?':
				print('z', end='')
			else:
				print(s[i], end='')
		print()
	else:
		print('NO')


import sys
readline = sys.stdin.readline

def solve():
	N = int(readline())
	S = readline().rstrip()
	Y = 'abacaba'
	count = 0
	for i in range(N):
		if S[i:i + 7] == Y:
			count += 1
	if count > 1:
		print('No')
		return
	elif count == 1:
		print('Yes')
		print(''.join((c if c != '?' else 'z' for c in S)))
		return
	count = 0

	def match(s):
		return all((s[j] == Y[j] or s[j] == '?' for j in range(7)))
	for i in range(N - 6):
		if match(S[i:i + 7]):
			if i >= 6 and S[i - 6:i] == Y[:6] or (i >= 4 and S[i - 4:i] == Y[:4]) or (i + 10 < N and S[i + 7:i + 7 + 4] == Y[3:]) or (i + 12 < N and S[i + 7:i + 7 + 6] == Y[1:]):
				continue
			else:
				print('YES')
				S = ''.join((c if c != '?' else 'z' for c in S))
				print(S[:i] + Y + S[i + 7:])
				return
	print('No')
T = int(readline())
for i in range(T):
	solve()


from functools import lru_cache
from sys import stdin, stdout
import sys
from math import *

def ct(s):
	count = 0
	n = len(s)
	for ii in range(n - 6):
		if temp2[ii:ii + 7] == 'abacaba':
			count += 1
	return count
t = int(input())
for __ in range(t):
	n = int(input())
	s = input()
	temp = 'abacaba'
	pos = False
	for i in range(2 ** 7):
		a = bin(i)[2:]
		a = (7 - len(a)) * '0' + a
		ss = ''
		for j in range(len(a)):
			if a[j] == '1':
				ss += '?'
			else:
				ss += temp[j]
		if ss in s:
			for ii in range(n - 6):
				temp2 = ''
				if s[ii:ii + 7] == ss:
					temp2 = s[:ii] + temp + s[ii + 7:]
					if ct(temp2) == 1:
						aaaa = temp2
						pos = True
						break
	if pos:
		temp2 = aaaa
		print('Yes')
		for i in range(n):
			if temp2[i] == '?':
				print('z', end='')
			else:
				print(temp2[i], end='')
		print()
	else:
		print('No')


import math

def can_convert(lis):
	if lis[0] != 'a' and lis[0] != '?':
		return -1
	if lis[1] != 'b' and lis[1] != '?':
		return -1
	if lis[2] != 'a' and lis[2] != '?':
		return -1
	if lis[3] != 'c' and lis[3] != '?':
		return -1
	if lis[4] != 'a' and lis[4] != '?':
		return -1
	if lis[5] != 'b' and lis[5] != '?':
		return -1
	if lis[6] != 'a' and lis[6] != '?':
		return -1
	return 1

def count_num(index):
	lis_temp = [item for item in s]
	lis_temp[index:index + 7] = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
	lis_temp = [item.replace('?', 'z') for item in lis_temp]
	count = 0
	for i in range(len(lis_temp) - 6):
		if lis_temp[i:i + 7] == ['a', 'b', 'a', 'c', 'a', 'b', 'a']:
			count += 1
	return count
num_cases = int(input())
for _ in range(num_cases):
	n = int(input())
	s = input().strip()
	s = [i for i in s]
	done = 0
	for i in range(n - 6):
		if can_convert(s[i:i + 7]) == 1:
			ans = count_num(i)
			if ans == 1:
				s[i:i + 7] = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
				s = [item.replace('?', 'z') for item in s]
				s = ''.join(s)
				print('YES')
				print(s)
				done = 1
				break
	if done == 0:
		print('NO')


import os
import sys, math
from io import BytesIO, IOBase

def valid(s, to, ans):
	n = len(s)
	ct = 0
	for j in range(7):
		if s[ans + j] != to[j]:
			return False
	for i in range(max(0, ans - 6), ans + 7):
		if n - i < 7:
			break
		works = True
		for j in range(7):
			if s[i + j] != to[j]:
				works = False
				break
		if works:
			ct += 1
	return ct == 1

def main():
	t = int(input())
	for case in range(t):
		n = int(input())
		s = input()
		to = 'abacaba'
		ct = 0
		ans = -1
		for i in range(n):
			if n - i < 7:
				break
			works = True
			for j in range(7):
				if s[i + j] == '?':
					works = False
					break
				elif s[i + j] != to[j]:
					works = False
					break
			if works:
				ct += 1
		if ct > 1:
			print('NO')
			continue
		elif ct == 1:
			print('YES')
			l = list(s)
			for i in range(n):
				if l[i] == '?':
					l[i] = 'z'
				print(l[i], end='')
			print()
		else:
			works = False
			for i in range(n):
				if n - i < 7:
					break
				l = list(s)
				for j in range(7):
					if l[i + j] == '?':
						l[i + j] = to[j]
				if valid(l, to, i):
					works = True
					break
			if not works:
				print('NO')
				continue
			print('YES')
			for i in range(n):
				if l[i] == '?':
					l[i] = 'z'
			for i in range(n):
				print(l[i], end='')
			print()
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')
main()


import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def get_str():
	return input().decode().strip()

def rint():
	return map(int, input().split())

def oint():
	return int(input())

def count_match(s):
	cnt = 0
	for i in range(n - 6):
		if ss == s[i:i + 7]:
			cnt += 1
	return cnt
t = oint()
ss = list('abacaba')
for _ in range(t):
	n = oint()
	s = list(get_str())
	for i in range(n - 6):
		s2 = s[:]
		ok = True
		for j in range(i, i + 7):
			if s2[j] == ss[j - i]:
				pass
			elif s2[j] == '?':
				s2[j] = ss[j - i]
		cnt = count_match(s2)
		if cnt == 1:
			for ii in range(n):
				if s2[ii] == '?':
					s2[ii] = 'z'
			print('Yes')
			print(''.join(s2))
			break
	else:
		print('No')


import sys, math, bisect, random
input = sys.stdin.readline

def dt(s, st):
	n = len(s)
	(t, i) = (0, 0)
	while i <= n - 7:
		if s[i:i + 7] == st:
			t = t + 1
		i = i + 1
	return t

def dti(s, st, C):
	vt = []
	for j in range(n):
		vt.append(s[j])
	for j in C:
		vt[j[0]] = j[1]
	return dt(vt, st)
T = int(input())
for _ in range(T):
	n = int(input())
	s = list(input())
	st = list('abacaba')
	t = dt(s, st)
	if t > 1:
		print('NO')
	elif t == 1:
		print('YES')
		for i in range(n):
			if s[i] == '?':
				s[i] = 'd'
		for i in range(n):
			print(s[i], sep='', end='')
		print()
	else:
		(c, cp) = (0, 0)
		(lr, rr) = (0, 0)
		i = 0
		while i < n - 6:
			k = 0
			C = []
			for j in range(i, i + 7):
				if s[j] == st[k] or s[j] == '?':
					C.append([j, st[k]])
					k = k + 1
					cp = cp + 1
					continue
			cp = cp // 7
			if cp == 1:
				t = dti(s, st, C)
				if t == 1:
					rr = i
					break
				else:
					cp = 0
			i = i + 1
		if cp == 0:
			print('NO')
		else:
			print('YES')
			k = 0
			for i in range(rr, rr + 7):
				s[i] = st[k]
				k = k + 1
			for i in range(n):
				if s[i] == '?':
					s[i] = 'z'
			for i in range(n):
				print(s[i], sep='', end='')
			print()


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def solve(n, s):
	t = 'abacaba'
	m = len(t)
	for i in range(n - m + 1):
		if s[i] != '?' and s[i] != t[0]:
			continue
		ss = [si for si in s]
		ok = True
		for j in range(m):
			if ss[i + j] != '?' and s[i + j] != t[j]:
				ok = False
				break
			ss[i + j] = t[j]
		for j in range(n):
			if ss[j] == '?':
				ss[j] = 'z'
		cnt = 0
		for ii in range(n - m + 1):
			f = True
			for j in range(m):
				if ss[ii + j] != t[j]:
					f = False
					break
			if f:
				cnt += 1
		if ok and cnt == 1:
			ws('Yes')
			ws(''.join(ss))
			return
	ws('No')

def main():
	for _ in range(ri()):
		n = ri()
		s = rs()
		solve(n, s)
main()


def cin():
	return map(int, input().split())

def count(ss, n):
	t = 'abacaba'
	cnt = 0
	for i in range(n - 6):
		if ss[i:i + 7] == t:
			cnt += 1
	return cnt
t = 'abacaba'
for T in range(int(input())):
	n = int(input())
	s = input()
	ans = False
	for i in range(n - 6):
		ss = [ch for ch in s]
		ok = True
		for j in range(i, i + 7):
			if ss[j] != '?' and s[j] != t[j - i]:
				ok = False
				break
			ss[j] = t[j - i]
		if ok and count(''.join(ss), n) == 1:
			s = ''.join(ss).replace('?', 'z')
			ans = True
			break
	if ans:
		print('Yes')
		print(s)
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	s = [a for a in input()]
	s1 = s.copy()
	i = 0
	flag = 0
	c = 0
	i = 0
	while i <= n - 7:
		if s[i] == 'a' and s[i + 1] == 'b' and (s[i + 2] == 'a') and (s[i + 3] == 'c') and (s[i + 4] == 'a') and (s[i + 5] == 'b') and (s[i + 6] == 'a'):
			c = c + 1
		i = i + 1
	i = 0
	if c < 1:
		while i <= n - 7:
			if (s[i] == 'a' or s[i] == '?') and (s[i + 1] == 'b' or s[i + 1] == '?') and (s[i + 2] == 'a' or s[i + 2] == '?') and (s[i + 3] == 'c' or s[i + 3] == '?') and (s[i + 4] == 'a' or s[i + 4] == '?') and (s[i + 5] == 'b' or s[i + 5] == '?') and (s[i + 6] == 'a' or s[i + 6] == '?'):
				s[i] = 'a'
				s[i + 1] = 'b'
				s[i + 2] = 'a'
				s[i + 3] = 'c'
				s[i + 4] = 'a'
				s[i + 5] = 'b'
				s[i + 6] = 'a'
				j = 0
				p = 0
				while j <= n - 7:
					if s[j] == 'a' and s[j + 1] == 'b' and (s[j + 2] == 'a') and (s[j + 3] == 'c') and (s[j + 4] == 'a') and (s[j + 5] == 'b') and (s[j + 6] == 'a'):
						p = p + 1
					j = j + 1
				if p == 1:
					c = c + 1
					break
				else:
					for k in range(i, i + 7):
						if s1[k] == '?':
							s[k] = '?'
			i = i + 1
	for i in range(n):
		if s[i] == '?':
			s[i] = 'd'
	if c == 1:
		print('YES')
		print(''.join(s))
	else:
		print('NO')


import os, io
from sys import stdout
import collections
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys

def primes(n):
	sieve = [True] * n
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i]:
			sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
	return [2] + [i for i in range(3, n, 2) if sieve[i]]

def binomial_coefficient(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def powerOfK(k, max):
	if k == 1:
		return [1]
	if k == -1:
		return [-1, 1]
	result = []
	n = 1
	while n <= max:
		result.append(n)
		n *= k
	return result

def divisors(n):
	i = 1
	result = []
	while i * i <= n:
		if n % i == 0:
			if n / i == i:
				result.append(i)
			else:
				result.append(i)
				result.append(n / i)
		i += 1
	return result

def distance(xa, ya, xb, yb):
	return ((ya - yb) ** 2 + (xa - xb) ** 2) ** 0.5

def digitsSum(n):
	if n == 0:
		return 0
	r = 0
	while n > 0:
		r += n % 10
		n //= 10
	return r

def isValid(i, j, n, m):
	return i >= 0 and i < n and (j >= 0) and (j < m)

def print_grid(grid):
	for line in grid:
		print(' '.join(map(str, line)))

def kadane(a, size):
	max_so_far = 0
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def prefixSum(arr):
	for i in range(1, len(arr)):
		arr[i] = arr[i] + arr[i - 1]
	return arr

def ceil(n, d):
	if n % d == 0:
		return n // d
	else:
		return n // d + 1

def _abs(a, b):
	return int(abs(a - b))

def evenodd(l):
	even = [e for e in l if e & 1 == 0]
	odd = [e for e in l if e & 1]
	return (even, odd)
for _ in range(int(input())):
	n = int(input())
	s = input().decode('utf-8').strip()
	pattern = 'abacaba'
	occ = [i for i in range(len(s)) if s.startswith(pattern, i)]
	if len(occ) >= 2:
		print('No')
		continue
	if len(occ) == 1:
		s = s.replace('?', 'd')
		print('Yes')
		print(s)
		continue
	a = []
	for (i, e) in enumerate(s):
		if e == 'a' or e == '?':
			a.append(i)
	asindex = 0
	if not len(a):
		print('No')
		continue
	start = a[0]
	current = a[0]
	index = 0
	result = ''
	possible = True
	sols = []
	while current < len(s):
		if index == len(pattern):
			while current < len(s):
				result += s[current]
				current += 1
			sols.append(result)
			asindex += 1
			if asindex < len(a):
				start = a[asindex]
				current = start
				index = 0
				result = s[:start]
				continue
			else:
				possible = False
				break
		if s[current] == '?':
			result += pattern[index]
			current += 1
			index += 1
		elif s[current] == pattern[index]:
			result += s[current]
			current += 1
			index += 1
		else:
			asindex += 1
			if asindex < len(a):
				start = a[asindex]
				current = start
				index = 0
				result = s[:start]
			else:
				possible = False
		if not possible:
			break
	if not possible and len(sols) == 0:
		print('No')
	else:
		if index == len(pattern):
			while current < len(s):
				result += s[current]
				current += 1
			sols.append(result)
		fr = None
		for mysol in sols:
			occ = [i for i in range(len(mysol)) if mysol.startswith(pattern, i)]
			if len(occ) == 1:
				fr = mysol
		if fr is None:
			print('No')
		else:
			print('Yes')
			fr = fr.replace('?', 'd')
			print(fr)


I = lambda : list(map(int, input().split(' ')))

def check(st):
	a = 'abacaba'
	for i in range(7):
		if st[i] == a[i] or st[i] == '?':
			continue
		else:
			return False
	return True

def check2(s):
	a = 'abacaba'
	cnt = 0
	for i in range(len(s) - 7 + 1):
		if s[i:i + 7] == a:
			cnt += 1
	if cnt > 1:
		return (False, None)
	aa = ''
	for i in range(len(s)):
		if s[i] == '?':
			aa += 'z'
		else:
			aa += s[i]
	return (True, aa)
for _ in range(int(input())):
	n = int(input())
	s = input()
	a = 'abacaba'
	flag = 0
	for i in range(len(s) - 7 + 1):
		if check(s[i:i + 7]) and check2(s[:i] + a + s[i + 7:])[0]:
			flag = 1
			ans = check2(s[:i] + a + s[i + 7:])[1]
			break
	if flag:
		print('YES')
		print(ans)
	else:
		print('NO')


def func(i, n, s1):
	xx = ch
	j = 0
	while i < n:
		if s1[i] == '?' and j < len(xx):
			s1[i] = xx[j]
		if j < len(xx):
			if s1[i] == xx[j]:
				j += 1
			else:
				return False
		elif j == len(xx):
			return True
		i += 1
	if j < len(xx):
		return False
	return True

def check(s):
	c = 0
	for i in range(n):
		if i + 6 < n and s1[i] == 'a':
			if ''.join(s1[i:i + 7]) == ch:
				c += 1
	if c == 1:
		for i in range(n):
			if s1[i] == '?':
				s1[i] = 'd'
		return True
	return False
ch = 'abacaba'
t = int(input())
for _ in range(t):
	n = int(input())
	s = input().strip()
	c = 0
	for i in range(n):
		if i + 6 <= n and s[i] == 'a':
			if s[i:i + 7] == ch:
				c += 1
	if c == 1:
		res = ''
		for i in range(n):
			if s[i] == '?':
				res += 'd'
			else:
				res += s[i]
		print('Yes')
		print(res)
	elif c > 1:
		print('No')
	else:
		f = False
		s = list(s)
		s1 = list(s)
		fl = 0
		for i in range(n):
			if s[i] == 'a' or s[i] == '?':
				f = func(i, n, s1)
				if f:
					if check(s1):
						print('Yes')
						print(''.join(s1))
						fl = 1
				if fl == 1:
					break
			s1 = list(s)
		if fl == 0:
			print('No')


def compare(s, req):
	cnt = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == req:
			cnt += 1
	return cnt

def getOut(s):
	out = ''
	for c in s:
		if c == '?':
			out += 'z'
		else:
			out += c
	return out

def isPossible(s, req, ind):
	j = 0
	fl = True
	for i in range(ind, ind + 7):
		if not (s[i] == req[j] or s[i] == '?'):
			fl = False
			break
		j += 1
	return fl

def getOut1(s, req, start):
	flag = False
	for i in range(len(s) - 6):
		if not isPossible(s, req, i):
			continue
		out = getOut(s)
		out = out[:i] + req + out[i + 7:]
		if compare(out, req) == 1:
			flag = True
			break
	if flag:
		return out
	else:
		return -1
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	req = 'abacaba'
	flag = False
	start = -1
	for i in range(len(s) - 6):
		j = 0
		while j < 7:
			if s[i + j] == req[j] or s[i + j] == '?':
				pass
			else:
				break
			j += 1
		if j == 7:
			start = i
			flag = True
			break
	if not flag:
		print('No')
	else:
		no = compare(s, req)
		if no > 1:
			print('No')
		elif no == 1:
			print('Yes')
			out = getOut(s)
			print(out)
		elif no == 0:
			out = getOut1(s, req, start)
			if out == -1:
				print('No')
			else:
				print('Yes')
				print(out)


def solve():
	n = int(input())
	s = input()
	m = 'abacaba'
	done = False
	for j in range(n - 6):
		t = s[j:j + 7]
		ok = True
		for i in range(7):
			ok = ok and (t[i] == '?' or t[i] == m[i])
		if ok:
			ss = list(s)
			for k in range(7):
				ss[j + k] = m[k]
			for u in range(n):
				if ss[u] == '?':
					ss[u] = 'q'
			cnt = 0
			for v in range(n - 6):
				tt = ss[v:v + 7]
				if tt == list(m):
					cnt += 1
			if cnt == 1:
				print('YES')
				print(''.join(ss))
				done = True
				break
	if not done:
		print('NO')
for _ in range(int(input())):
	solve()


def count(s):
	c = 0
	j = 0
	while j + 6 < n:
		if s[j:j + 7] == 'abacaba':
			c += 1
			j = j + 1
		j = j + 1
	return c

def match(s):
	x = 'abacaba'
	for k in range(len(x)):
		if s[k] != x[k] and s[k] != '?':
			return False
	return True
t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	num = count(s)
	if num > 1:
		print('No')
	elif num == 1:
		print('Yes')
		print(s.replace('?', 'z'))
	else:
		ans = 'No'
		for m in range(n - 6):
			if match(s[m:m + 7]) == True:
				ss = s[:m] + 'abacaba' + s[m + 7:]
				if count(ss) == 1:
					ans = 'Yes'
					cc = ss.replace('?', 'z')
					break
		print(ans)
		if ans == 'Yes':
			print(cc)


sub = 'abacaba'
for _ in range(int(input())):
	n = int(input())
	s = input()
	flag = True
	i = 0
	while i < n:
		while i < n and (s[i] != 'a' and s[i] != '?'):
			i += 1
		if i < n:
			(j, k) = (0, i)
			while j < 7 and k < n and (s[k] == sub[j] or s[k] == '?'):
				k += 1
				j += 1
			if j == 7:
				t = s[:i] + sub + s[k:]
				if t.find(sub, i + 1) == -1 and t.find(sub, 0, i + 3) == -1:
					print('YES')
					print(t.replace('?', 'z'))
					flag = False
					break
		i += 1
	if flag:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	s = str(input())
	k = list(s)
	t = 'abacaba'
	r = ''
	count = 0
	for i in range(n - 6):
		if s[i:i + 7] == 'abacaba':
			count += 1
	if count > 1:
		print('NO')
	elif count == 1:
		for i in s:
			if i == '?':
				r += 'z'
			else:
				r += i
		print('YES')
		print(r)
	else:
		(d, c) = (0, 0)
		for i in range(n - 6):
			a = 0
			if d == 0:
				for j in range(7):
					if k[i + j] == '?' or k[i + j] == t[j]:
						a += 1
			if a == 7:
				for j in range(7):
					k[i + j] = t[j]
				r = ''
				count = 0
				for x in range(n - 6):
					if ''.join(k[x:x + 7]) == 'abacaba':
						count += 1
				if count == 1:
					c = 1
					break
				else:
					k = list(s)
		if c == 1:
			for i in k:
				if i == '?':
					r += 'z'
				else:
					r += i
			print('YES')
			print(r)
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	st = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
	s1 = input()
	s = []
	for i in s1:
		s.append(i)
	co = 0
	for i in range(0, n - 6, 1):
		if s[i:i + 7] == st:
			co += 1
	if co > 1:
		print('NO')
	elif co == 1:
		print('YES')
		for i in s:
			if i == '?':
				print('z', end='')
			else:
				print(i, end='')
		print()
	else:
		ke1 = 0
		for i in range(0, n - 6, 1):
			f1 = 0
			co1 = s[i:i + 7].count('?')
			if co1 > 0:
				i1 = 0
				numd = s[:]
				for j in range(i, i + 7, 1):
					if s[j] == '?':
						numd[j] = st[i1]
					i1 += 1
				for k in range(0, n - 6, 1):
					if numd[k:k + 7] == st:
						f1 += 1
				if f1 == 1:
					ke1 = 1
					break
		if ke1 == 0:
			print('NO')
		else:
			print('YES')
			for i in numd:
				if i == '?':
					print('z', end='')
				else:
					print(i, end='')
			print()


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	n = int(input())
	a = input()
	need = 'abacaba'
	cnt = 0
	for i in range(n - 6):
		if a[i:i + 7] == need:
			cnt += 1
	if cnt == 1:
		print('Yes')
		for i in a:
			if i == '?':
				print('d', end='')
			else:
				print(i, end='')
		print()
	elif cnt > 1:
		print('No')
	else:
		ans = -1
		for i in range(n - 6):
			flag = 0
			for j in range(i, i + 7):
				if not (a[j] == need[j - i] or a[j] == '?'):
					flag = 1
					break
			if flag == 1:
				continue
			elif flag == 0 and i >= 4 and (a[i - 4:i] == 'abac'):
				continue
			elif flag == 0 and i + 6 < n - 4 and (a[i + 7:i + 11] == 'caba'):
				continue
			else:
				ans = i
				break
		if ans == -1:
			print('No')
		else:
			s = ''
			for i in range(n):
				if a[i] == '?':
					s += 'd'
				else:
					s += a[i]
			rans = s[:ans] + need + s[ans + 7:]
			for i in range(n - 6):
				if rans[i:i + 7] == need:
					cnt += 1
			if cnt > 1:
				print('No')
			else:
				print('Yes')
				print(rans)


def solve():
	n = int(input())
	s = input()
	pattern = 'abacaba'
	lst = [s[i:i + 7] for i in range(0, len(s) - 6)]
	if lst.count(pattern) == 1:
		ans = s.replace('?', 'z')
		return ('YES', ans)
	elif lst.count(pattern) > 1:
		return 'NO'
	else:
		j = 0
		for ss in lst:
			temp = ''
			for i in range(7):
				if ss[i] == '?':
					temp += pattern[i]
				else:
					temp += ss[i]
			if temp == pattern:
				ans = s[0:j].replace('?', 'z') + pattern + s[j + 7:].replace('?', 'z')
				T = [ans[k:k + 7] for k in range(0, len(ans) - 6)]
				if T.count(pattern) == 1:
					return ('YES', ans)
			j += 1
		return 'NO'
t = int(input())
for i in range(t):
	res = solve()
	if res == 'NO':
		print('NO')
	else:
		print('YES')
		print(res[1])


t = int(input(''))
mat = []
for i in range(t):
	input('')
	mat.append(input(''))
for i in mat:
	cnt = 0
	j = 0
	while j < len(i):
		if i[j:j + 7] == 'abacaba':
			cnt = cnt + 1
		j = j + 1
	if cnt > 1:
		print('NO')
		continue
	if cnt == 1:
		i = list(i)
		for j in range(len(i)):
			if i[j] == '?':
				i[j] = 'd'
		print('YES')
		print(''.join(i))
		continue
	l = list(i)
	sol = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
	flag = 0
	for j in range(len(l) - 6):
		sign = 0
		if l[j] == 'a' or l[j] == '?':
			for k in range(1, 7):
				if l[j + k] == sol[k] or l[j + k] == '?':
					continue
				else:
					sign = 1
					break
			if sign == 0:
				d = l.copy()
				d[j:j + 7] = sol
				m = 0
				a = 0
				while m < len(d):
					if d[m:m + 7] == sol:
						a = a + 1
					m = m + 1
				if a == 1:
					l[j:j + 7] = sol
					flag = 1
		if flag:
			for j in range(len(l)):
				if l[j] == '?':
					l[j] = 'd'
			break
	if flag:
		print('YES')
		print(''.join(l))
	else:
		print('NO')


def findAll(word, string):
	all_positions = []
	next_pos = -1
	while True:
		next_pos = string.find(word, next_pos + 1)
		if next_pos < 0:
			break
		all_positions.append(next_pos)
	return all_positions
t = int(input())
m = 'abacaba'
ans = []
while True:
	if t == 0:
		break
	t -= 1
	n = int(input())
	s = input()
	ans_count = 0
	ans_has_qm = 0
	curr_ans_qm = 0
	pointer = 0
	for i in range(len(s)):
		curr_ans_qm = 0
		pointer = 0
		for j in range(i, len(s)):
			if s[j] == m[pointer]:
				pointer += 1
			elif s[j] == '?':
				pointer += 1
				curr_ans_qm = 1
			else:
				pointer = 0
				break
			if pointer == len(m):
				if ans_count > 0 and curr_ans_qm == 1:
					pass
				elif ans_has_qm == 1 and curr_ans_qm == 0:
					ans = list(s[:i] + m + s[i + len(m):])
					for k in range(len(ans)):
						if ans[k] == '?':
							ans[k] = 'z'
				else:
					old_ans = ans
					ans_count += 1
					ans = list(s[:i] + m + s[i + len(m):])
					for k in range(len(ans)):
						if ans[k] == '?':
							ans[k] = 'z'
					pointer = 0
					x = findAll(m, ''.join(ans))
					if len(x) > 1:
						ans_count -= 1
						ans = old_ans
					else:
						ans_has_qm = curr_ans_qm
				break
	if ans_count == 1:
		print('YES')
		print(''.join(ans))
	else:
		print('NO')


import sys
input = lambda : sys.stdin.readline().rstrip()
t = 'abacaba'
t1 = list(t)

def f(a):
	ct = 0
	for i in range(len(a) - 6):
		if a[i:i + 7] == t1:
			ct += 1
	return ct

def make(b):
	for i in range(7):
		if b[i] == t[i]:
			continue
		elif b[i] == '?':
			b[i] = t[i]
		else:
			return False
	return b
for _ in range(int(input())):
	n = int(input())
	s = list(input())
	v = f(s)
	if v >= 2:
		print('NO')
		continue
	if v == 1:
		print('YES')
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		print(''.join(s))
		continue
	ans = []
	for i in range(n - 6):
		fl = make(s[i:i + 7])
		if fl:
			val = s[:i] + fl + s[i + 7:]
			if f(val) == 1:
				ans = val
				for i in range(n):
					if ans[i] == '?':
						ans[i] = 'z'
				break
	if ans != []:
		print('YES')
		print(''.join(ans))
	else:
		print('NO')


from pprint import pprint
import sys

def count_aba(s):
	param = 'abacaba'
	res = 0
	for i in range(len(s)):
		if str(s[i:i + len(param)]) == str(param):
			res += 1
	return res

def do():
	n = int(input())
	os = input()
	didmake = False
	for i in range(n - 6):
		s = os
		isfit = True
		for j in range(len(param)):
			if s[i + j] == '?' or s[i + j] == param[j]:
				continue
			isfit = False
			break
		if isfit is False:
			continue
		if s[i + len(param):].count(param) == 0:
			res = list(os.replace('?', 'z'))
			for j in range(len(param)):
				res[i + j] = param[j]
			res = ''.join(res)
			if count_aba(res) != 1:
				continue
			didmake = True
			print('Yes')
			print(''.join(res))
			return
	if didmake is False:
		print('No')
		return
param = 'abacaba'
q = int(input())
for _ in range(q):
	do()


pattern = 'abacaba'
p = pattern

def g(s):
	global answer
	if len(s) != n:
		exit()
	x = s.find(p)
	if x != -1:
		if s.find(p, x + 1) == -1:
			answer = ans(s)
			return True
		else:
			return False
	x = s.find('?')
	if x == -1:
		return False
	return g(s[:x] + 'a' + s[x + 1:]) or g(s[:x] + 'b' + s[x + 1:]) or g(s[:x] + 'c' + s[x + 1:])

def ans(s):
	b = ''
	for c in s:
		if c == '?':
			x = 'z'
		else:
			x = c
		b += x
	answer = b
	return b
for _ in range(int(input())):
	n = int(input())
	s = input()
	answer = ''
	if g(s):
		print('YES')
		print(answer)
	else:
		print('NO')


xx = 'abac abacaba caba'
xx = 'abacab abacaba bacaba'
t = int(input())
ss = list('abacaba')
for _ in range(t):
	n = int(input())
	s = list(input())
	cnt = 0
	for i in range(n - 6):
		if ss == s[i:i + 7]:
			cnt += 1
	if cnt > 1:
		print('No')
		continue
	if cnt == 1:
		for ii in range(n):
			if s[ii] == '?':
				s[ii] = 'z'
		print('Yes')
		print(''.join(s))
		continue
	for i in range(n - 6):
		s2 = s[:]
		ok = True
		for j in range(i, i + 7):
			if s2[j] == ss[j - i]:
				pass
			elif s2[j] == '?':
				s2[j] = ss[j - i]
			else:
				ok = False
				break
		else:
			if i >= 4 and s2[i - 4:i] == list('abac'):
				ok = False
			elif i >= 6 and s2[i - 6:i] == list('abacab'):
				ok = False
			elif i + 7 + 4 <= n and s2[i + 7:i + 7 + 4] == list('caba'):
				ok = False
			elif i + 7 + 6 <= n and s2[i + 7:i + 7 + 6] == list('bacaba'):
				ok = False
			else:
				for ii in range(n):
					if s2[ii] == '?':
						s2[ii] = 'z'
		if ok == False:
			continue
		else:
			print('Yes')
			print(''.join(s2))
			break
	else:
		print('No')


def match(s, ss):
	if s == ss:
		return True
	for i in range(len(s)):
		if s[i] != ss[i] and s[i] != '?':
			return False
	return True

def build(s, ss, p):
	return s[0:p].replace('?', 'z') + ss + s[p + len(ss):].replace('?', 'z')

def main():
	(n,) = map(int, input().split(' '))
	ss = 'abacaba'
	s = input()
	for i in range(len(s) - len(ss) + 1):
		if match(s[i:i + len(ss)], ss):
			s2 = build(s, ss, i)
			f1 = s2.find(ss)
			f2 = s2.find(ss, f1 + 1)
			if f2 == -1:
				print('Yes')
				print(s2)
				return
	print('No')
for _ in range(int(input())):
	main()


t = int(input())
x = list('abacaba')
for _ in range(t):
	n = int(input())
	s = list(input())
	(c, d) = (-1, 0)
	g = 0
	for i in range(n - 6):
		(y, z) = (0, 0)
		for j in range(7):
			if not (s[i + j] == x[j] or s[i + j] == '?'):
				break
			else:
				if s[i + j] == x[j]:
					z += 1
				y += 1
		if y == 7 and d == 0:
			c = i
			e = 0
			for k in range(n - 6):
				f = 0
				for l in range(7):
					if i <= k + l < i + 7:
						if s[k + l] == x[l] or s[k + l] == '?':
							f += 1
					elif s[k + l] == x[l]:
						f += 1
				if f == 7:
					e += 1
			if e == 1:
				g = 1
		if z == 7:
			d += 1
		if g == 1:
			break
	print('Yes' if g == 1 else 'No')
	if g == 1:
		for i in range(n):
			if s[i] == '?':
				if c <= i < c + 7:
					s[i] = x[i - c]
				else:
					s[i] = 'd'
		print(''.join(s))


sa = 'abacaba'

def check(s):
	for i in range(len(s)):
		if s[i] != sa[i] and s[i] != '?':
			return False
	return True

def count(s):
	c = 0
	for i in range(n - 6):
		if s[i:i + 7] == sa:
			c += 1
	return c
t = int(input())
for it in range(t):
	n = int(input())
	s = input()
	if count(s) == 1:
		print('Yes')
		print(s.replace('?', 'z'))
		continue
	for i in range(n - 6):
		if check(s[i:i + 7]):
			z = s.replace('?', 'z')
			z = z[:i] + sa + z[i + 7:]
			if count(z) == 1:
				print('Yes')
				print(z)
				break
	else:
		print('No')


t = int(input())
for trial in range(t):
	n = int(input())
	s = input()
	res = 'abacaba'
	ans = 0
	for i in range(n - 6):
		if s[i:i + 7] == res:
			ans += 1
	if ans > 1 or len(s) < 7:
		print('No')
	elif ans == 1:
		print('Yes')
		print(s.replace('?', 'd'))
	else:
		works = True
		for i in range(n - 6):
			works = True
			for j in range(7):
				if s[i + j] != res[j] and s[i + j] != '?':
					works = False
					break
			if works:
				if i < n - 10:
					if s[i + 7:i + 11] == 'caba':
						works = False
				if i < n - 12:
					if s[i + 7:i + 13] == 'bacaba':
						works = False
				if i > 3:
					if s[i - 4:i] == 'abac':
						works = False
				if i > 5:
					if s[i - 6:i] == 'abacab':
						works = False
				if works:
					print('Yes')
					s = s[:i] + res + s[i + 7:]
					print(s.replace('?', 'd'))
					break
		if not works:
			print('No')


import sys
input = sys.stdin.readline
from collections import *

def match(i, st):
	t1 = st[i:i + 7]
	t2 = 'abacaba'
	flag = True
	for j in range(7):
		if t1[j] != t2[j] and t1[j] != '?':
			return -1
		if t1[j] == '?':
			flag = False
	if flag:
		return 1
	else:
		return 0
for _ in range(int(input())):
	n = int(input())
	s = list(input()[:-1])
	already = 0
	posi = []
	for i in range(n - 6):
		if match(i, s) == 1:
			already += 1
		elif match(i, s) == 0:
			posi.append(i)
	if already >= 2:
		print('No')
	elif already == 1:
		for i in range(n):
			if s[i] == '?':
				s[i] = 'd'
		print('Yes')
		print(''.join(s))
	elif len(posi) == 0:
		print('No')
	else:
		t = 'abacaba'
		ans = -1
		for pi in posi:
			s2 = s[:]
			for i in range(pi, pi + 7):
				if s2[i] == '?':
					s2[i] = t[i - pi]
			for i in range(n):
				if s2[i] == '?':
					s2[i] = 'd'
			matched = 0
			for i in range(n - 6):
				if match(i, s2) == 1:
					matched += 1
			if matched == 1:
				ans = ''.join(s2)
		if ans == -1:
			print('No')
		else:
			print('Yes')
			print(ans)


import sys
import math, bisect
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict

def neo():
	return map(int, input().split())

def Neo():
	return list(map(int, input().split()))

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])

def counts(txt, pat):
	c = 0
	z = len(pat)
	for i in range(len(txt) - z + 1):
		if txt[i:i + z] == pat:
			c += 1
	return c

def fun(a, b, pat):
	for (i, j) in zip(a, b):
		if i != j:
			if i != '?':
				return False
	return counts(b, pat) == 1
pat = 'abacaba'
for _ in range(int(input())):
	N = int(input())
	S = input()
	c = counts(S, pat)
	if c > 1 or len(S) < len(pat):
		Yy(0)
	elif c == 1:
		Yy(1)
		Ans = ''
		for i in S:
			if i == '?':
				Ans += 'z'
			else:
				Ans += i
		print(Ans)
	else:
		B = []
		l = len(pat)
		flag = 0
		Ans = ''
		for i in range(N - l + 1):
			stri = S[:i] + pat + S[i + l:]
			B.append(stri)
			f = fun(S, stri, pat)
			if f:
				Ans = stri
				flag = 1
				break
		if flag == 0:
			Yy(0)
		else:
			Yy(1)
			Ans2 = ''
			for i in Ans:
				if i == '?':
					Ans2 += 'z'
				else:
					Ans2 += i
			print(Ans2)


from sys import stdin
input = stdin.readline
t = int(input())
S = 'abacaba'

def checkS(s, n):
	count = 0
	for i in range(n - 7 + 1):
		for j in range(i, i + 7):
			if s[j] != S[j - i]:
				break
		else:
			count += 1
			if count > 1:
				return 2
	if count < 1:
		return 0
	return 1
for _ in range(t):
	n = int(input())
	s = input().rstrip()
	if checkS(s, n) == 1:
		print('YES')
		print(s.replace('?', 'z'))
		continue
	elif checkS(s, n) > 1:
		print('NO')
		continue
	for i in range(n - 7 + 1):
		for j in range(i, i + 7):
			if s[j] != S[j - i] and s[j] != '?':
				break
		else:
			if checkS(s[:i] + S + s[min(i + 7, n):], n) == 1:
				print('YES')
				print(s[:i].replace('?', 'z') + S + s[min(i + 7, n):].replace('?', 'z'))
				break
	else:
		print('NO')


def count(s):
	n = 0
	i = s.find('abacaba')
	while i != -1:
		n += 1
		s = s[i + 1:]
		i = s.find('abacaba')
	return n
t = int(input())
a = 'abacaba'
for _ in range(0, t):
	length = input()
	s = input()
	answer_ready = False
	if count(s) == 1:
		answer_ready = True
		s = s.replace('?', 'z')
		print('YES')
		print(s)
	elif count(s) == 0:
		for i in range(0, len(s) - 6):
			ss = s
			ok = True
			for j in range(0, len(a)):
				if ss[i + j] != a[j] and ss[i + j] != '?':
					ok = False
					break
				ss = ss[:i + j] + a[j] + ss[i + j + 1:]
			if ok and count(ss) == 1:
				ss = ss.replace('?', 'z')
				answer_ready = True
				print('YES')
				print(ss)
				break
	if not answer_ready:
		print('NO')


a = int(input())
for i in range(a):
	s = int(input())
	s = input()
	count = 0
	for i in range(len(s) - 7 + 1):
		m = s[i:i + 7]
		if m == 'abacaba':
			count += 1
	if count > 1:
		print('No')
		continue
	if count == 1:
		ans = []
		for i in range(len(s)):
			if s[i] == '?':
				ans.append('z')
			else:
				ans.append(s[i])
		print('Yes')
		print(''.join(map(str, ans)))
		continue
	flag = 0
	ans = []
	for i in range(len(s)):
		ans.append(s[i])
	for i in range(len(ans) - 7 + 1):
		tr = ans.copy()
		for j in range(i, i + 7):
			if j == i and tr[j] == '?':
				tr[j] = 'a'
			if j == i + 1 and tr[j] == '?':
				tr[j] = 'b'
			if j == i + 2 and tr[j] == '?':
				tr[j] = 'a'
			if j == i + 3 and tr[j] == '?':
				tr[j] = 'c'
			if j == i + 4 and tr[j] == '?':
				tr[j] = 'a'
			if j == i + 5 and tr[j] == '?':
				tr[j] = 'b'
			if j == i + 6 and tr[j] == '?':
				tr[j] = 'a'
		m = ''.join(map(str, tr))
		count = 0
		for u in range(len(m) - 7 + 1):
			x = m[u:u + 7]
			if x == 'abacaba':
				count += 1
		if count == 1:
			for i in range(len(tr)):
				if tr[i] == '?':
					tr[i] = 'z'
			flag = 1
			print('Yes')
			print(''.join(map(str, tr)))
		if flag:
			break
	if flag:
		continue
	if flag == 0:
		print('No')


import bisect as bi, sys
import math as mt
import collections as cc
I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(n,) = I()
	s = list(input())
	ss = ''.join(s)
	tf = 0
	tff = 0
	ch = list('abacaba')
	st = -1
	sp = -1
	cnt = 0
	tem = []
	for i in range(n - 7 + 1):
		temp = s[i:i + 7]
		cur = 1
		if temp == ch:
			cnt += 1
			continue
		for j in range(7):
			if temp[j] == ch[j] or temp[j] == '?':
				continue
			cur = 0
		if cur != 0:
			tem.append(i)
			tf += 1

	def ccc(s):
		cn = 0
		for i in range(len(s) - 7 + 1):
			if s[i:i + 7] == list('abacaba'):
				cn += 1
		return cn == 1
	if cnt > 1:
		print('NO')
	elif cnt == 1:
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		print('YES')
		print(''.join(s))
	else:
		ff = 0
		for ii in tem:
			ss = s.copy()
			k = 0
			for j in range(ii, ii + 7):
				ss[j] = ch[k]
				k += 1
			for i in range(n):
				if ss[i] == '?':
					ss[i] = 'z'
			if ccc(ss):
				print('YES')
				print(''.join(ss))
				ff = 1
				break
		if not ff:
			print('NO')


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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 CountOccurrences(string, substring):
	count = 0
	start = 0
	while start < len(string):
		pos = string.find(substring, start)
		if pos != -1:
			start = pos + 1
			count += 1
		else:
			break
	return count

def check(s):
	s = list(s)
	rs = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
	v = True
	for i in range(0, 7):
		if s[i] != rs[i] and s[i] != '?':
			v = False
			break
		else:
			s[i] = rs[i]
	return v
for xyz in range(0, int(input())):
	n = int(input())
	s = input()
	c = CountOccurrences(s, 'abacaba')
	if c == 1:
		print('YES')
		print(s.replace('?', 'z'))
	elif c >= 2:
		print('NO')
	else:
		ss = []
		answer = False
		for i in range(0, n - 6):
			ss.append(s[i:i + 7])
		anss = []
		for i in range(len(ss) - 1, -1, -1):
			if check(ss[i]):
				answer = True
				anss.append(s[0:i] + 'abacaba' + s[i + 7:])
		if answer:
			f = False
			for i in anss:
				i = i.replace('?', 'z')
				if CountOccurrences(i, 'abacaba') == 1:
					answers = i
					f = True
					break
			if f:
				print('YES')
				print(answers)
			else:
				print('NO')
		else:
			print('NO')


import os
import operator
import sys
import bisect
from io import BytesIO, IOBase

def inar():
	return [int(k) for k in input().split()]

def power(x, p, m):
	res = 1
	while p:
		if p & 1:
			res = res * x % m
		x = x * x % m
		p >>= 1
	return res

def main():
	for _ in range(int(input())):
		n = int(input())
		m = list('abacaba')
		t = input()
		st = list(t)
		count = 0
		for i in range(n - 6):
			if m == st[i:i + 7]:
				count += 1
		if count > 1:
			print('NO')
			continue
		if count == 1:
			for i in range(n):
				if st[i] == '?':
					st[i] = 'z'
			print('YES')
			print(''.join(st))
		else:
			counter = 0
			for i in range(n - 6):
				no = 0
				if (st[i] == 'a' or st[i] == '?') and (st[i + 1] == 'b' or st[i + 1] == '?') and (st[i + 2] == 'a' or st[i + 2] == '?') and (st[i + 3] == 'c' or st[i + 3] == '?') and (st[i + 4] == 'a' or st[i + 4] == '?') and (st[i + 5] == 'b' or st[i + 5] == '?') and (st[i + 6] == 'a' or st[i + 6] == '?'):
					if (i + 7 < n and st[i + 7] == 'c') and (i + 8 < n and st[i + 8] == 'a') and (i + 9 < n and st[i + 9] == 'b') and (i + 10 < n and st[i + 10] == 'a'):
						no = 1
					elif (i - 1 >= 0 and st[i - 1] == 'c') and (i - 2 >= 0 and st[i - 2] == 'a') and (i - 3 >= 0 and st[i - 3] == 'b') and (i - 4 >= 0 and st[i - 4] == 'a'):
						no = 1
					else:
						no = 0
				else:
					no = 1
				if no == 0:
					st[i] = 'a'
					st[i + 1] = 'b'
					st[i + 2] = 'a'
					st[i + 3] = 'c'
					st[i + 4] = 'a'
					st[i + 5] = 'b'
					st[i + 6] = 'a'
					counter = 1
					break
			for i in range(n):
				if st[i] == '?':
					st[i] = 'z'
			if counter == 1:
				print('YES')
				print(''.join(st))
			else:
				print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')
main()


import copy
t = int(input())
c = list('abacaba')
for _ in range(t):
	n = int(input())
	s = list(input())
	check = False
	for i in range(n - 6):
		check2 = True
		for j in range(7):
			if s[i + j] == c[j] or s[i + j] == '?':
				continue
			else:
				check2 = False
				break
		if check2:
			s2 = copy.deepcopy(s)
			for j in range(7):
				s2[i + j] = c[j]
			count = 0
			for k in range(n - 6):
				check2 = True
				for t in range(7):
					if s2[k + t] == c[t]:
						continue
					else:
						check2 = False
						break
				if check2:
					count += 1
			if count == 1:
				for j in range(n):
					if s2[j] == '?':
						s2[j] = 'z'
				print('Yes')
				print(*s2, sep='')
				check = True
		if check:
			break
	if check:
		continue
	print('No')


import re
t = 'abacaba'
for s in [*open(0)][2::2]:
	i = s.find(t) + 1
	if i:
		f = s.find(t, i) < 0
	else:
		p = '(a|\\?)(b|\\?)(a|\\?)'
		s = re.sub('(?<!abac)' + p + '(c|\\?)' + p + '(?!caba)', t, s, 1)
		f = t in s
	print(*(['NO'], ['YES', s.replace('?', 'd')])[f])


import sys
t = int(input())
req = 'abacaba'
for _ in range(t):
	n = int(sys.stdin.readline())
	s = sys.stdin.readline().rstrip()
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == req:
			cnt += 1
	if cnt == 1:
		print('Yes')
		print(s.replace('?', 'z'))
		continue
	if cnt > 1:
		print('No')
		continue
	for i in range(n - 6):
		if all((c1 == c2 or c1 == '?' for (c1, c2) in zip(s[i:i + 7], req))):
			if s[i + 7:i + 11] == 'caba' or (i >= 4 and s[i - 4:i] == 'abac'):
				continue
			s = s[:i] + req + s[i + 7:]
			print('Yes')
			print(s.replace('?', 'z'))
			break
	else:
		print('No')


import sys
import math
from collections import defaultdict, Counter

def getZarr(string, z):
	n = len(string)
	(l, r, k) = (0, 0, 0)
	for i in range(1, n):
		if i > r:
			(l, r) = (i, i)
			while r < n and string[r - l] == string[r]:
				r += 1
			z[i] = r - l
			r -= 1
		else:
			k = i - l
			if i + z[k] <= r:
				z[i] = z[k]
			else:
				l = i
				while r < n and string[r - l] == string[r]:
					r += 1
				z[i] = r - l
				r -= 1

def search(text, pattern):
	concat = pattern + '$' + text
	l = len(concat)
	z = [0] * l
	getZarr(concat, z)
	c = 0
	for i in range(l):
		if z[i] == len(pattern):
			c += 1
			if c > 1:
				return (c, z)
	return (c, z)
t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	pattern = 'abacaba'
	(c, z) = search(s, pattern)
	if c > 1 or (s.count('?') == 0 and c != 1):
		print('No')
	elif c == 1:
		print('Yes')
		for i in s:
			if i == '?':
				print('d', end='')
			else:
				print(i, end='')
		print()
	else:
		for j in range(n):
			d = z[8 + j]
			flag = 0
			s1 = list(s)
			for k in range(d, 7):
				if j + k < n and (s[j + k] == '?' or s[j + k] == pattern[k]):
					s1[j + k] = pattern[k]
				else:
					flag = 1
					break
			if flag == 0:
				s1 = ''.join(s1)
				(c, z1) = search(s1, pattern)
				if c == 1:
					break
			flag = 1
		if flag == 0:
			print('Yes')
			for i in s1:
				if i == '?':
					print('d', end='')
				else:
					print(i, end='')
			print()
		else:
			print('No')


class Solution:

	def __init__(self):
		self.ans = []

	def solve(self, s):
		substr = 'abacaba'
		if len(s) < len(substr):
			return (False, None)

		def canConvert(a):
			for i in range(len(substr)):
				if a[i] != substr[i] and a[i] != '?':
					return False
			return True

		def fillz(s):
			return s.replace('?', 'z')
		for i in range(len(substr), len(s) + 1):
			if canConvert(s[i - len(substr):i]):
				nS = s[:i - len(substr)] + substr + s[i:]
				if substr not in nS[:i - 1] and substr not in nS[i - len(substr) + 1:]:
					return (True, fillz(s[:i - len(substr)]) + substr + fillz(s[i:]))
		return (False, None)
t = int(input())
solution = Solution()
for _ in range(t):
	n = int(input())
	string = input()
	(poss, ans) = solution.solve(string)
	if poss:
		print('YES')
		print(ans)
	else:
		print('NO')


t = int(input())

def count(s, pat):
	cc = 0
	for x in range(len(s) - 6):
		if s[x:x + 7] == pat:
			cc += 1
	return cc
for _ in range(t):
	n = int(input())
	s = input()
	pat = 'abacaba'
	if count(s, pat) == 1:
		print('YES')
		for x in s:
			if x == '?':
				print('z', end='')
			else:
				print(x, end='')
		print()
	elif count(s, pat) >= 2:
		print('NO')
	else:
		ans = []
		a = list(s)
		for x in range(n - 6):
			ss = list(a)
			chk = 1
			for z in range(x, x + 7):
				if ss[z] == '?':
					ss[z] = pat[z - x]
				elif ss[z] != pat[z - x]:
					chk = 0
					break
			if chk == 1:
				hu = ''
				for zz in ss:
					hu = hu + zz
				ans.append(hu)
		chk = 0
		for s in ans:
			if count(s, pat) == 1:
				print('YES')
				for x in s:
					if x == '?':
						print('z', end='')
					else:
						print(x, end='')
				print()
				chk = 1
				break
		if chk == 0:
			print('NO')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	for _ in range(ii()):
		n = ii()
		s = list(si())
		n = len(s)
		t = list('abacaba')
		cnt = 0
		for i in range(n):
			if i + 7 <= n:
				x = s[i:i + 7]
				if x == t:
					cnt += 1
		if cnt > 1:
			print('NO')
			continue
		if cnt != 1:
			tt = 0
			fff = 0
			while True:
				for i in range(n):
					if i + 7 <= n:
						ss = s[:]
						flag = 1
						for j in range(i, i + 7):
							if ss[j] == t[j - i]:
								pass
							elif ss[j] == '?':
								pass
							else:
								flag = 0
								break
						if flag == 1:
							for j in range(i, i + 7):
								ss[j] = t[j - i]
							for j in range(n):
								if ss[j] == '?':
									ss[j] = 'z'
							cnt = 0
							for j in range(n):
								if j + 7 <= n:
									x = ss[j:j + 7]
									if x == t:
										cnt += 1
							if cnt == 1:
								s = ss
								fff = 1
								break
						if fff:
							break
				break
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		cnt = 0
		for i in range(n):
			if i + 7 <= n:
				x = s[i:i + 7]
				if x == t:
					cnt += 1
		if cnt == 0 or cnt > 1:
			print('NO')
			continue
		print('YES')
		print(''.join(s))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from sys import stdin

def iinput():
	return int(stdin.readline())

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
from itertools import combinations
p = []
for i in range(1, 7):
	p += list(combinations(range(7), i))
possible = ['abacaba', '???????']
for e in p:
	q = list('abacaba')
	for j in e:
		q[j] = '?'
		possible.append(''.join(q))
possible = list(set(possible))
test = iinput()
while test:
	test -= 1
	n = iinput()
	s = input()
	i = 0
	t = 'abacaba'
	c = 0
	while i < n - 7 + 1:
		if s[i:i + 7] == t:
			c += 1
		i += 1
	if c == 1:
		print('Yes')
		l = list(s)
		for j in range(n):
			if l[j] == '?':
				l[j] = 'd'
		print(''.join(l))
	elif c > 1:
		print('No')
	else:
		i = 0
		s = list(s)
		while i < n - 7 + 1:
			if ''.join(s[i:i + 7]) in possible:
				if ''.join(s[i + 7:i + 11]) != 'caba' and ''.join(s[i - 4:i]) != 'abac':
					s[i:i + 7] = 'abacaba'
					for j in range(n):
						if s[j] == '?':
							s[j] = 'd'
					print('Yes')
					print(''.join(s))
					break
			i += 1
		else:
			print('No')


from sys import *
input = stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	a = 'abacaba'
	s = s.strip()
	if s == '':
		continue
	if a in s:
		c = 0
		for i in range(n):
			d = s[i:i + 7]
			if d == a:
				c += 1
		if c == 1:
			print('Yes')
			s = s.replace('?', 'z')
			print(s.strip())
		else:
			print('No')
	else:
		for i in range(0, n):
			d = s[i:i + 7]
			if len(d) != 7:
				break
			x = 0
			for j in range(7):
				if d[j] != a[j] and d[j] != '?':
					x = -1
					break
				elif d[j] == '?':
					d = d[:j] + a[j] + d[j + 1:]
			if x == 0:
				g = s[:i] + d + s[i + 7:]
				c = 0
				for i in range(0, n):
					d = g[i:i + 7]
					if d == a:
						c += 1
				if c == 1:
					print('Yes')
					g = g.replace('?', 'z')
					print(g.strip())
					break
				else:
					x = -1
		if x == -1:
			print('No')


from bisect import *
from collections import *
from itertools import *
import functools
import sys
import math
from decimal import *
from copy import *
from heapq import *
from fractions import *
getcontext().prec = 30
MAX = sys.maxsize
MAXN = 1000010
MOD = 10 ** 9 + 7
spf = [i for i in range(MAXN)]
spf[0] = spf[1] = -1

def sieve():
	for i in range(2, MAXN, 2):
		spf[i] = 2
	for i in range(3, int(MAXN ** 0.5) + 1):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def fib(n, m):
	if n == 0:
		return [0, 1]
	else:
		(a, b) = fib(n // 2)
		c = a % m * (b % m * 2 - a % m) % m
		d = a % m * (a % m) % m + b % m * b % m % m
		if n % 2 == 0:
			return [c, d]
		else:
			return [d, c + d]

def charIN(x=' '):
	return sys.stdin.readline().strip().split(x)

def arrIN(x=' '):
	return list(map(int, sys.stdin.readline().strip().split(x)))

def ncr(n, r):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % MOD
		den = den * (i + 1) % MOD
	return num * pow(den, MOD - 2, MOD) % MOD

def flush():
	return sys.stdout.flush()
for _ in range(int(input())):
	n = int(input())
	s = input()
	x = 'abacaba'
	cnt = 0
	for i in range(len(s)):
		if s[i:i + 7] == x:
			cnt += 1
	if cnt > 1:
		print('NO')
	elif cnt == 1:
		s = s.replace('?', 'z')
		print('YES')
		print(s)
	else:
		for i in range(len(s) - 6):
			t = list(s[i:i + 7])
			j = 0
			f = 1
			while j < len(t):
				if x[j] == t[j]:
					j += 1
				elif t[j] == '?':
					t[j] = x[j]
					j += 1
				else:
					f = 0
					break
			if f:
				cnt = 0
				se = list(s)
				for j in range(i, i + len(t)):
					se[j] = t[j - i]
				for i in range(len(se)):
					if ''.join(se[i:i + 7]) == x:
						cnt += 1
				if cnt == 1:
					print('YES')
					se = ''.join(se)
					se = se.replace('?', 'z')
					print(se)
					break
		else:
			print('NO')


import re
st = [0] * 128
p = 0
for i in ['a', '_']:
	for j in ['b', '_']:
		for k in ['a', '_']:
			for l in ['c', '_']:
				for m in ['a', '_']:
					for n in ['b', '_']:
						for o in ['a', '_']:
							st[p] = i + j + k + l + m + n + o
							p = p + 1
for i in range(int(input())):
	n = int(input())
	s = input()
	s = s.replace('?', '_')
	if 'abacaba' in s:
		if len(re.findall('(?=abacaba)', s)) > 1:
			print('NO')
		else:
			print('YES')
			s = s.replace('_', 'd')
			print(s)
		continue
	else:
		flag = False
		for j in range(1, 128):
			if st[j] in s:
				l = [m.start() for m in re.finditer(st[j], s)]
				for k in l:
					s1 = s[:k] + 'abacaba' + s[k + 7:]
					if len(re.findall('(?=abacaba)', s1)) == 1:
						sr = s1
						sr = sr.replace('_', 'd')
						print('YES')
						print(sr)
						flag = True
						break
			if flag:
				break
		if flag == False:
			print('NO')


t = int(input())
while t:
	t += -1
	n = int(input())
	s = input()
	cnt = 0
	for i in range(n - 7 + 1):
		if s[i:i + 7] == 'abacaba':
			cnt -= -1
	if cnt > 1:
		print('NO', end='')
	elif cnt == 1:
		print('YES')
		for i in s:
			if i == '?':
				print('z', end='')
			else:
				print(i, end='')
	else:
		ch = 'abacaba'
		cc = 0
		for i in range(n - 7 + 1):
			s1 = []
			for j in s:
				s1.append(j)
			ind = i
			check = 1
			for j in range(7):
				if s1[ind] == '?':
					ind -= -1
					continue
				elif s1[ind] == ch[j]:
					ind -= -1
				else:
					check = 0
					break
			if check:
				ind = i
				for j in range(7):
					if s1[ind] == '?':
						s1[ind] = ch[j]
					ind -= -1
				cnt = 0
				for i in range(n - 7 + 1):
					if s1[i:i + 7] == ['a', 'b', 'a', 'c', 'a', 'b', 'a']:
						cnt -= -1
				if cnt == 1:
					s = s1
					cc = 1
					break
		if cc:
			print('YES')
			for i in s:
				if i == '?':
					print('z', end='')
				else:
					print(i, end='')
		else:
			print('NO', end='')
	print()


def find_occ(s, target):
	i = 0
	occ = 0
	n = len(s)
	while i <= n - 7:
		if s[i:i + 7] == target:
			occ += 1
		i += 1
	return occ

def replace_ch(s):
	ans = ''
	for ch in s:
		if ch == '?':
			ans += 'x'
		else:
			ans += ch
	return ans

def foo():
	n = int(input())
	s = input()
	target = 'abacaba'
	occ = find_occ(s, target)
	if occ > 1:
		print('NO')
		return
	if occ == 1:
		ans = replace_ch(s)
		print('YES')
		print(ans)
		return
	i = 0
	while i <= n - 7:
		st = s
		flag = True
		for j in range(7):
			if st[i + j] != '?' and st[i + j] != target[j]:
				flag = False
				break
			else:
				st = st[:i + j] + target[j] + st[i + j + 1:]
		if flag and find_occ(st, target) == 1:
			print('YES')
			print(replace_ch(st))
			return
		i += 1
	print('NO')
t = int(input())
for _ in range(t):
	foo()


for _ in range(int(input())):
	n = int(input())
	s = input()
	check = 'abacaba'
	count = sum((1 for i in range(n) if s.startswith(check, i)))
	if count == 0:
		for i in range(n - len(check) + 1):
			bool = True
			k = 0
			for j in range(i, i + 7):
				if s[j] != check[k] and s[j] != '?':
					bool = False
					break
				k += 1
			if bool:
				k = 0
				temp = list(s)
				for j in range(i, i + 7):
					if temp[j] == '?':
						temp[j] = check[k]
					k += 1
				temp = ''.join(temp)
				if sum((1 for j in range(n) if temp.startswith(check, j))) == 1:
					break
				else:
					bool = False
		if bool:
			print('YES')
			for i in range(n):
				if temp[i] == '?':
					print('z', end='')
				else:
					print(temp[i], end='')
			print()
		else:
			print('NO')
	elif count == 1:
		print('YES')
		for i in range(n):
			if s[i] == '?':
				print('z', end='')
			else:
				print(s[i], end='')
		print()
	else:
		print('NO')


for i in range(int(input())):
	l = int(input())
	s = input()
	if 'abacaba' in s:
		if 'abacaba' in s[s.index('abacaba') + 1:]:
			print('NO')
		else:
			print('YES')
			print(s.replace('?', 'z'))
	else:
		for i in range(l - 6):
			p = True
			for (a, b) in zip(s[i:i + 7], 'abacaba'):
				if not a in [b, '?']:
					p = False
					break
			if p:
				r = s.replace('?', 'z')
				r = r[:i] + 'abacaba' + r[i + 7:]
				if 'abacaba' in r and (not 'abacaba' in r[r.index('abacaba') + 1:]):
					print('YES')
					print(r)
					break
				else:
					p = False
		if not p:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	s = input()
	pattern = 'abacaba'
	flag2 = 0
	for ind in range(n):
		candidate = s[:ind]
		flag = 0
		for (position, sym) in enumerate(s[ind:ind + 7]):
			if sym == pattern[position]:
				candidate += sym
			elif sym == '?':
				candidate += pattern[position]
			else:
				flag = 1
				break
		if flag == 0:
			candidate += s[ind + 7:]
			if candidate.find(pattern) != -1 and candidate.find(pattern, candidate.find(pattern) + 1) == -1:
				flag2 = 1
				break
	if flag2 == 0:
		print('No')
	else:
		candidate = candidate.replace('?', 'z')
		print('Yes')
		print(candidate)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())

def check(ch, st):
	flag = True
	for i in range(len(st)):
		if st[i] == ch[i] or st[i] == '?':
			pass
		else:
			flag = False
			break
	return flag

def count(s, ch):
	n = len(s)
	k = len(ch)
	ct = 0
	for i in range(n - k + 1):
		temp = s[i:i + k]
		if temp == ch:
			ct += 1
	return ct
t = ip()
for _ in range(t):
	n = ip()
	s = input()
	ch = 'abacaba'
	ch2 = list(ch)
	k = len(ch)
	if count(s, ch) == 0:
		f = False
		for i in range(n - k + 1):
			temp = s[i:i + k]
			if check(ch, temp):
				s2 = list(s)
				pt = 0
				for j in range(i, i + k):
					s2[j] = ch[pt]
					pt += 1
				s2 = ''.join(s2)
				if count(s2, ch) == 1:
					f = True
					s = list(s)
					pt = 0
					for j in range(i, i + k):
						s[j] = ch[pt]
						pt += 1
					s = ''.join(s)
					break
		if f:
			print('Yes')
			s = s.replace('?', 'z')
			print(s)
		else:
			print('No')
	elif count(s, ch) == 1:
		print('Yes')
		s = s.replace('?', 'z')
		print(s)
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	s = input()
	l = 'abacaba'
	if s.find(l) != -1 and s.find(l) == s.rfind(l):
		print('YES', s.replace('?', 'x'), sep='\n')
		continue
	for ind in range(0, n):
		w = s[ind:ind + 7]
		w = ''.join([a for (a, b) in zip(w, l) if a == b or a is '?'])
		if len(w) == 7:
			b = s[:ind] + l + s[ind + 7:]
			if b.find(l) != -1 and b.find(l) == b.rfind(l):
				print('YES', b.replace('?', 'x'), sep='\n')
				break
	else:
		print('NO')


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()
target = 'abacaba'

def solve():
	n = int(input())
	ss = input()
	tc = 0
	fp = -1
	for i in range(n - 6):
		for j in range(7):
			if ss[i + j] != target[j]:
				break
		else:
			tc += 1
			fp = i
	if tc > 1:
		print('No')
		return
	elif tc == 1:
		print('Yes')
		tt = ss[:fp] + target + ss[fp + 7:]
		print(''.join(map(lambda x: 'd' if x == '?' else x, tt)))
		return
	for i in range(n - 6):
		for j in range(7):
			if ss[i + j] != target[j] and ss[i + j] != '?':
				break
		else:
			tt = ''.join(map(lambda x: 'd' if x == '?' else x, ss[:i] + target + ss[i + 7:]))
			tc = 1
			for k in range(n - 6):
				if k == i:
					continue
				for j in range(7):
					if tt[k + j] != target[j]:
						break
				else:
					break
			else:
				print('Yes')
				print(tt)
				return
	print('No')

def main():
	t = int(input())
	for _ in range(t):
		solve()
main()


T = int(input())
for _ in range(T):
	n = int(input())
	s = input()
	listABACABA = []
	listABACABACand = []
	notCand = []
	ref = 'abacaba'
	for i in range(n - 6):
		isABACABA = True
		for j in range(7):
			if s[i + j] != ref[j]:
				isABACABA = False
				break
		if isABACABA:
			listABACABA.append(i)
		isABACABACand = True
		for j in range(7):
			if s[i + j] != ref[j] and s[i + j] != '?':
				isABACABACand = False
				break
		if isABACABACand:
			listABACABACand.append(i)
	if len(listABACABA) >= 2 or (len(listABACABA) == 0 and len(listABACABACand) == 0):
		print('NO')
		continue
	elif len(listABACABA) == 1:
		ans = []
		for i in range(n):
			if s[i] == '?':
				ans.append('d')
			else:
				ans.append(s[i])
		print('YES')
		print(''.join(ans))
	else:
		isComplete = False
		for index in range(len(listABACABACand)):
			elem = listABACABACand[index]
			if elem in notCand:
				continue
			if elem + 4 not in listABACABACand and elem + 6 not in listABACABACand:
				ans = []
				for i in range(n):
					if elem <= i and i <= elem + 6:
						if (i - elem) % 2 == 0:
							ans.append('a')
						elif i - elem == 3:
							ans.append('c')
						else:
							ans.append('b')
					elif s[i] == '?':
						ans.append('d')
					else:
						ans.append(s[i])
				print('YES')
				print(''.join(ans))
				isComplete = True
				break
			elif elem + 4 in listABACABACand:
				if s[elem + 7] == '?' or s[elem + 8] == '?' or s[elem + 9] == '?' or (s[elem + 10] == '?'):
					ans = []
					for i in range(n):
						if elem <= i and i <= elem + 6:
							if (i - elem) % 2 == 0:
								ans.append('a')
							elif i - elem == 3:
								ans.append('c')
							else:
								ans.append('b')
						elif s[i] == '?':
							ans.append('d')
						else:
							ans.append(s[i])
					print('YES')
					print(''.join(ans))
					isComplete = True
					break
				elif s[elem] != '?' and s[elem + 1] != '?' and (s[elem + 2] != '?') and (s[elem + 3] != '?'):
					notCand.append(elem + 4)
			elif s[elem + 7] == '?' or s[elem + 8] == '?' or s[elem + 9] == '?' or (s[elem + 10] == '?') or (s[elem + 11] == '?') or (s[elem + 12] == '?'):
				ans = []
				for i in range(n):
					if elem <= i and i <= elem + 6:
						if (i - elem) % 2 == 0:
							ans.append('a')
						elif i - elem == 3:
							ans.append('c')
						else:
							ans.append('b')
					elif s[i] == '?':
						ans.append('d')
					else:
						ans.append(s[i])
				print('YES')
				print(''.join(ans))
				isComplete = True
				break
			elif s[elem] != '?' and s[elem + 1] != '?' and (s[elem + 2] != '?') and (s[elem + 3] != '?') and (s[elem + 4] != '?') and (s[elem + 5] != '?'):
				notCand.append(elem + 6)
		if not isComplete:
			print('NO')


from sys import stdout
from sys import stdin

def get():
	return stdin.readline().strip()

def getf():
	return [int(i) for i in get().split()]

def put(a, end='\n'):
	stdout.write(str(a) + end)

def putf(a, sep=' ', end='\n'):
	stdout.write(sep.join(map(str, a)) + end)

def solve(n, s):
	p = 'abacaba'
	for i in range(n - 6):
		t = s[i:i + 7]
		f = True
		for k in range(7):
			if t[k] != p[k]:
				if t[k] != '?':
					f = False
					break
		if f == False:
			continue
		a = (s[:i] + p + s[i + 7:]).replace('?', 'x')
		cnt = 0
		for j in range(n - 6):
			if a[j:j + 7] == 'abacaba':
				cnt += 1
		if cnt == 1:
			return 'YES\n' + a
	return 'NO'

def main():
	t = int(get())
	for i in range(t):
		n = int(get())
		s = get()
		put(solve(n, s))
main()


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
target = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
s = 'abacaba'

def check(sub):
	for x in range(len(sub)):
		if sub[x] == '?':
			sub[x] = target[x]
		if sub[x] != target[x]:
			return 0
	return 1

def finalCount(temp):
	i = 0
	j = 6
	c = 0
	while j < len(temp):
		if temp[i:j + 1] == s:
			c += 1
		i += 1
		j += 1
	return c

def solve():
	n = int(input())
	string = [x for x in input()]
	(i, j) = (0, 6)
	while j < n:
		left = string[:i]
		right = string[j + 1:]
		sub = string[i:j + 1]
		if check(sub):
			final = left + sub + right
			temp = ''.join(final).replace('?', 'z')
			if finalCount(temp) == 1:
				return temp
		i += 1
		j += 1
	return 'No'
t = int(input())
while t:
	ans = solve()
	if ans == 'No':
		print(ans)
	else:
		print('Yes')
		print(ans)
	t -= 1


T = int(input())
for _ in range(T):
	n = int(input())
	s = list(input())
	a = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
	c1 = 0
	c2 = 0
	idx = []
	for i in range(n - 6):
		temp = s[i:i + 7]
		if temp == a:
			c1 += 1
			continue
		flag = True
		for j in range(7):
			if temp[j] == a[j] or temp[j] == '?':
				continue
			flag = False
			break
		if flag:
			c2 += 1
			idx.append(i)
	ans = 'No'
	if c1 == 1:
		ans = 'Yes'
	elif c1 == 0 and c2 > 0:
		for i in idx:
			temp = s[:i] + a + s[i + 7:]
			cnt = 0
			for j in range(n - 6):
				if temp[j:j + 7] == a:
					cnt += 1
			if cnt == 1:
				ans = 'Yes'
				for j in range(i, i + 7):
					s[j] = a[j - i]
				break
			if ans == 'Yes':
				break
	for i in range(n):
		if s[i] == '?':
			s[i] = 'z'
	print(ans)
	if ans == 'Yes':
		print(''.join(s))


TC = int(input())

def find(S):
	idxs = []
	for i in range(len(S) - 7 + 1):
		if S[i:i + 7] == 'abacaba':
			idxs.append(i)
	return idxs

def solve():
	N = int(input())
	S = input()
	T = 'abacaba'
	idxs = find(S)
	if len(idxs) >= 2:
		return (False, '')
	if len(idxs) == 1:
		return (True, S.replace('?', 'z'))
	for i in range(N - 7 + 1):
		if all((S[i + j] == T[j] or S[i + j] == '?' for j in range(7))):
			res = (S[:i] + T + S[i + 7:]).replace('?', 'z')
			if len(find(res)) == 1:
				return (True, res)
	return (False, '')
for _ in range(TC):
	(ok, s) = solve()
	if ok:
		print('Yes')
		print(s)
	else:
		print('No')


import io
import os
from collections import Counter, defaultdict, deque
T = 'abacaba'

def countTimes(S):
	count = 0
	N = len(S)
	for i in range(N):
		j = i + len(T)
		if S[i:j] == T:
			count += 1
	return count

def solve(S):
	N = len(S)
	for i in range(N):
		j = i + len(T)
		if j <= N:
			if all((x == '?' or x == y for (x, y) in zip(S[i:j], T))):
				S2 = S[:i] + T + S[j:]
				S2 = S2.replace('?', 'z')
				if countTimes(S2) == 1:
					return 'Yes\n' + S2
	return 'No'
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
Times = int(input())
for t in range(Times):
	N = int(input())
	S = input().decode().rstrip()
	ans = solve(S)
	print(ans)


def get_Z_arr(s):
	z = [0 for _ in range(len(s))]
	l = r = 0
	for i in range(1, len(s)):
		if i <= r:
			z[i] = min(z[i - l], r - i + 1)
		while z[i] + i < len(s) and s[z[i] + i] == s[z[i]]:
			z[i] += 1
		if r < i + z[i] - 1:
			(l, r) = (i, i + z[i] - 1)
	return z
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	t = 'abacaba'
	z1 = get_Z_arr('abacaba#' + s)
	counter = sum([1 for x in z1 if x >= 7])
	if counter >= 1 or n < 7:
		if counter == 1:
			print('Yes')
			print(''.join([s[k] if s[k] != '?' else 'z' for k in range(n)]))
		else:
			print('No')
	else:
		for i in range(n - 6):
			j = 0
			stack = set()
			flag = True
			while j < 7 and (s[i + j] == '?' or s[i + j] == t[j]):
				if (j == 0 or j == 2) and i + j >= 6:
					flag &= t != s[i + j - 6:i + j] + t[6]
				elif (j == 4 or j == 6) and i + j + 6 < len(s):
					flag &= t != t[0] + s[i + j + 1:i + j + 7]
				elif j == 1 and i + j >= 5:
					flag &= t != s[i + j - 5:i + j - 1] + t[4:]
				elif j == 5 and i + j + 5 < len(s):
					flag &= t != t[:3] + s[i + j + 2:i + j + 6]
				if not flag:
					break
				j += 1
			if j == 7 and flag:
				print('Yes')
				print(''.join([t[k - i] if i <= k < i + j else s[k] if s[k] != '?' else 'z' for k in range(n)]))
				break
		else:
			print('No')


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])

def counts(txt, pat):
	c = 0
	z = len(pat)
	for i in range(len(txt) - z + 1):
		if txt[i:i + z] == pat:
			c += 1
	return c

def fun(a, b, pat):
	for (i, j) in zip(a, b):
		if i != j:
			if i != '?':
				return False
	return counts(b, pat) == 1
pat = 'abacaba'
for _ in range(int(input())):
	N = int(input())
	S = input()
	c = counts(S, pat)
	if c > 1 or len(S) < len(pat):
		Yy(0)
	elif c == 1:
		Yy(1)
		Ans = ''
		for i in S:
			if i == '?':
				Ans += 'z'
			else:
				Ans += i
		print(Ans)
	else:
		B = []
		l = len(pat)
		flag = 0
		Ans = ''
		for i in range(N - l + 1):
			stri = S[:i] + pat + S[i + l:]
			B.append(stri)
			f = fun(S, stri, pat)
			if f:
				Ans = stri
				flag = 1
				break
		if flag == 0:
			Yy(0)
		else:
			Yy(1)
			Ans2 = ''
			for i in Ans:
				if i == '?':
					Ans2 += 'z'
				else:
					Ans2 += i
			print(Ans2)


def solve():
	target = 'abacaba'
	target_with_z = 'abazaba'
	n = int(input())
	s = input()
	for i in range(n - 6):
		possible = True
		for j in range(7):
			if not (s[i + j] == '?' or s[i + j] == target[j]):
				possible = False
		if possible and (s[:i] + target_with_z + s[i + 7:]).find(target) == -1:
			print('Yes')
			print(s[:i].replace('?', 'z') + target + s[i + 7:].replace('?', 'z'))
			return
	print('No')
T = int(input())
for i in range(T):
	solve()


def count_occurrences(s: str, t: str):
	count = 0
	size = len(t)
	for i in range(len(s)):
		if s[i:i + size] == t:
			count += 1
	return count
for _ in range(int(input())):
	n = int(input())
	s = input()
	t = 'abacaba'
	count = 0
	q_count = 0
	idx = []
	for i in range(n):
		j = i
		contains_q = False
		for ch in t:
			if j < n and (s[j] == ch or s[j] == '?'):
				if s[j] == '?':
					contains_q = True
				j += 1
			else:
				break
		else:
			if contains_q:
				q_count += 1
				idx.append(j)
			else:
				count += 1
		if count > 1:
			print('NO')
			break
	else:
		if count + q_count == 0:
			print('NO')
			continue
		elif count > 1:
			print('NO')
		elif count == 0:
			flag = False
			for j in idx:
				tmp = s
				s = list(s)
				for i in range(len(t) - 1, -1, -1):
					s[j - 1] = t[i]
					j -= 1
				s = ''.join(s)
				s = s.replace('?', 'd')
				occurrences = count_occurrences(s, t)
				if occurrences == 1:
					print('YES')
					print(s)
					flag = True
					break
				else:
					s = tmp
			if flag == False:
				print('NO')
		else:
			s = s.replace('?', 'd')
			print('YES')
			print(s)


sub = 'abacaba'
for T in range(int(input())):
	N = int(input())
	s = input().strip()
	count = 0
	for i in range(N - 6):
		count += s[i:i + 7] == sub
	if count == 1:
		print('Yes')
		print(s.replace('?', 'd'))
	elif count == 0:
		ansFound = False
		for i in range(N - 6):
			flag = True
			for j in range(7):
				flag &= s[i + j] == sub[j] or s[i + j] == '?'
			if flag:
				a = s[:i] + sub + s[i + 7:]
				count = 0
				for j in range(N - 6):
					count += a[j:j + 7] == sub
				if count == 1:
					ansFound = True
					print('Yes')
					print(a.replace('?', 'd'))
					break
		if not ansFound:
			print('No')
	else:
		print('No')


import re
t = 'abacaba'
for s in [*open(0)][2::2]:
	i = s.find(t)
	if i + 1:
		m = s.find(t, i + 1) < 0
	else:
		p = '(a|\\?)(b|\\?)(a|\\?)'
		m = re.search('(?<!abac)' + p + '(c|\\?)' + p + '(?!caba)', s)
		if m:
			i = m.start()
			s = s[:i] + t + s[i + 7:]
	print(*(['NO'], ['YES', s.replace('?', 'd')])[bool(m)])


import math
t = int(input())
rez = []

def search(index, s, n):
	ss = 'abacaba'
	k = 0
	ind = -1
	for j in range(index, n):
		if s[j] == ss[k]:
			if k == 0:
				ind = j
			k += 1
			if k == len(ss):
				return [1, ind]
		else:
			k = 0
			if s[j] == ss[k]:
				ind = j
				k += 1
	return [0, -1]

def search7(index, s, n):
	ss = 'abacaba'
	for j in range(index, n):
		jj = j
		k = 0
		while jj < len(s) and (s[jj] == ss[k] or s[jj] == '?') and (k != -1):
			jj += 1
			if k == len(ss) - 1:
				if len(s) >= jj + 6 and jj >= 13:
					if s[jj] == 'b' and s[jj + 1] == 'a' and (s[jj + 2] == 'c') and (s[jj + 3] == 'a') and (s[jj + 4] == 'b') and (s[jj + 5] == 'a') or (s[jj - 8] == 'b' and s[jj - 9] == 'a' and (s[jj - 10] == 'c') and (s[jj - 11] == 'a') and (s[jj - 12] == 'b') and (s[jj - 13] == 'a')):
						k = -1
						break
				elif len(s) >= jj + 6:
					if s[jj] == 'b' and s[jj + 1] == 'a' and (s[jj + 2] == 'c') and (s[jj + 3] == 'a') and (s[jj + 4] == 'b') and (s[jj + 5] == 'a'):
						k = -1
						break
				elif jj >= 13:
					if s[jj - 8] == 'b' and s[jj - 9] == 'a' and (s[jj - 10] == 'c') and (s[jj - 11] == 'a') and (s[jj - 12] == 'b') and (s[jj - 13] == 'a'):
						k = -1
						break
				if len(s) >= jj + 4 and jj >= 11:
					if not (s[jj] == 'c' and s[jj + 1] == 'a' and (s[jj + 2] == 'b') and (s[jj + 3] == 'a') or (s[jj - 8] == 'c' and s[jj - 9] == 'a' and (s[jj - 10] == 'b') and (s[jj - 11] == 'a'))):
						return [j, jj]
					else:
						k = -1
				elif len(s) >= jj + 4:
					if not (s[jj] == 'c' and s[jj + 1] == 'a' and (s[jj + 2] == 'b') and (s[jj + 3] == 'a')):
						return [j, jj]
					else:
						k = -1
				elif jj >= 11:
					if not (s[jj - 8] == 'c' and s[jj - 9] == 'a' and (s[jj - 10] == 'b') and (s[jj - 11] == 'a')):
						return [j, jj]
					else:
						k = -1
				else:
					return [j, jj]
			else:
				k += 1
	return [-1, -1]
for i in range(t):
	n = int(input())
	s = input()
	ss = 'abacaba'
	k = 0
	ind = -1
	kol = 0
	A = search(0, s, n)
	kol = A[0]
	ind = A[1]
	if kol == 1:
		A = search(ind + 1, s, n)
		kol += A[0]
		ind = A[1]
		if kol >= 2:
			rez.append('No')
		else:
			rez.append('Yes')
			sr = ''
			for j in range(n):
				if s[j] == '?':
					sr += 'f'
				else:
					sr += s[j]
			rez.append(sr)
	else:
		sr = ''
		A = search7(0, s, n)
		indl = A[0]
		indr = A[1]
		if indl == -1 and indr == -1:
			rez.append('No')
		else:
			for j in range(indl):
				if s[j] == '?':
					sr += 'f'
				else:
					sr += s[j]
			sr += ss
			for j in range(indr, n):
				if s[j] == '?':
					sr += 'f'
				else:
					sr += s[j]
			rez.append('Yes')
			rez.append(sr)
for i in range(len(rez)):
	print(rez[i])


for _ in range(int(input())):
	n = int(input())
	s = input()
	stack = []
	temp = 'abacaba'
	count = 0
	for i in range(n - 6):
		if temp == s[i:i + 7]:
			count += 1
	if count == 1:
		answer = list(s)
		for i in range(n):
			if answer[i] == '?':
				answer[i] = 'd'
		print('Yes')
		print(''.join(answer))
	elif count > 1:
		print('No')
	else:
		solution = 0
		for i in range(n - 6):
			temp2 = s[i:i + 7]
			flag = 0
			for j in range(7):
				if temp[j] == temp2[j] or temp2[j] == '?':
					continue
				flag = 1
				break
			if flag == 0:
				if temp in temp[1:] + s[i + 7:] or temp in s[:i] + temp[:6]:
					x = list(s)
					for k in range(7):
						if x[i + k] == '?':
							x[i + k] = 'd'
							break
					s = ''.join(x)
					continue
				else:
					solution = 1
					answer = s[:i] + temp + s[i + 7:]
					break
		if solution:
			print('Yes')
			answer = list(answer)
			for i in range(n):
				if answer[i] == '?':
					answer[i] = 'd'
			answer = ''.join(answer)
			print(answer)
		else:
			print('No')


import sys

def swap(x, y, a):
	temp = a[x]
	a[x] = a[y]
	a[y] = temp
	return a

def help(temp):
	if (temp[0] == 'a' or temp[0] == '?') and (temp[1] == 'b' or temp[1] == '?') and (temp[2] == 'a' or temp[2] == '?') and (temp[3] == 'c' or temp[3] == '?') and (temp[4] == 'a' or temp[4] == '?') and (temp[5] == 'b' or temp[5] == '?') and (temp[6] == 'a' or temp[6] == '?'):
		return True
	else:
		return False

def main():
	q = []
	for line in sys.stdin.readlines():
		q.append(line)
	for i in range(len(q)):
		q[i] = q[i].rstrip().split(' ')[0]
	for j in range(1, len(q), 2):
		s = q[j + 1]
		tf = 'abacaba'
		ans = 'No'
		for i in range(0, len(s) - 6):
			temp = s[i:i + 7]
			if temp == tf and ans == 'YES':
				ans = 'NO'
				break
			if temp == tf and ans == 'No':
				ans = 'YES'
		if ans == 'NO':
			print(ans)
			continue
		if ans == 'YES':
			s = s.replace('?', 'z')
			print(ans)
			print(s)
			continue
		ans = 'No'
		i = 0
		while i < len(s) - 6:
			if help(s[i:i + 7]) == True:
				temp = s
				s = s[:i] + 'abacaba' + s[i + 7:]
				if i + 13 <= len(s) and s[i:i + 7] == s[i + 6:i + 13][::-1]:
					i += 1
					s = temp
					continue
				if i + 11 <= len(s) and s[i:i + 6] == s[i + 5:i + 11][::-1]:
					i += 1
					s = temp
					continue
				if i >= 6 and s[i - 6:i + 1] == s[i:i + 7]:
					i += 1
					s = temp
					continue
				if i >= 4 and s[i - 4:i + 2] == s[i + 1:i + 7][::-1]:
					i += 1
					s = temp
					continue
				ans = 'Yes'
				break
			else:
				i += 1
		if ans == 'Yes':
			s = s.replace('?', 'z')
			print(ans)
			print(s)
		else:
			print(ans)
main()


t = int(input(''))

def final(s, n):
	cnt1 = 0
	cnt2 = 0
	for x in range(0, n - 6):
		if 'abacaba' == s[x:x + 7]:
			cnt1 = cnt1 + 1
		if ((s[x] == 'a') | (s[x] == '?')) & ((s[x + 1] == 'b') | (s[x + 1] == '?')) & ((s[x + 2] == 'a') | (s[x + 2] == '?')) & ((s[x + 3] == 'c') | (s[x + 3] == '?')) & ((s[x + 4] == 'a') | (s[x + 4] == '?')) & ((s[x + 5] == 'b') | (s[x + 5] == '?')) & ((s[x + 6] == 'a') | (s[x + 6] == '?')):
			cnt2 = cnt2 + 1
	cnt2 = cnt2 - cnt1
	if cnt1 == 1:
		print('Yes')
		for jk in range(n):
			if s[jk] == '?':
				s = s[:jk] + 'x' + s[jk + 1:]
		print(s)
		return 20
	elif cnt1 > 1:
		print('No')
		return 0
	elif cnt2 >= 1:
		h = s
		for y in range(0, n - 6):
			if ((s[y] == 'a') | (s[y] == '?')) & ((s[y + 1] == 'b') | (s[y + 1] == '?')) & ((s[y + 2] == 'a') | (s[y + 2] == '?')) & ((s[y + 3] == 'c') | (s[y + 3] == '?')) & ((s[y + 4] == 'a') | (s[y + 4] == '?')) & ((s[y + 5] == 'b') | (s[y + 5] == '?')) & ((s[y + 6] == 'a') | (s[y + 6] == '?')):
				s = s[:y] + 'abacaba' + s[y + 7:]
			q = 0
			for o in range(n - 6):
				if s[o:o + 7] == 'abacaba':
					q = q + 1
			if q == 1:
				print('Yes')
				for jk in range(n):
					if s[jk] == '?':
						s = s[:jk] + 'x' + s[jk + 1:]
				print(s)
				return 20
			else:
				s = h
				continue
		print('No')
		return 0
	print('No')
for i in range(t):
	n = int(input(''))
	s = str(input(''))
	final(s, n)


def find(s):
	test = 'abacaba'
	count = 0
	for i in range(len(s) - len(test) + 1):
		count += int(s[i:i + len(test)] == test)
	if count > 1:
		return ('No', '')
	if count == 1:
		ans = []
		for x in s:
			if x == '?':
				ans += ['z']
			else:
				ans += [x]
		return ('Yes', ''.join(ans))
	okay = []
	for i in range(len(s) - len(test) + 1):
		temp = s[i:i + len(test)]
		c = 0
		for j in range(len(temp)):
			if temp[j] == '?':
				continue
			elif temp[j] != test[j]:
				c += 1
				break
		if c == 0:
			okay += [i]
	if len(okay) == 0:
		return ('No', '')
	if len(okay) > 0:
		index = -1
		for i in range(len(okay)):
			temp = okay[i] + len(test)
			temp2 = okay[i] - 4
			if s[temp:temp + 4] != 'caba' and s[temp2:temp2 + 4] != 'abac':
				index = okay[i]
				break
		if index == -1:
			return ('No', '')
		ans = []
		for x in s:
			if x == '?':
				ans += ['z']
			else:
				ans += [x]
		ans[index:len(test) + index] = [x for x in test]
		ans = ''.join(ans)
		count = 0
		for i in range(len(s) - len(test) + 1):
			count += int(ans[i:i + len(test)] == test)
		if count > 1:
			return ('No', '')
		return ('Yes', ans)
for _ in range(int(input())):
	input()
	s = input()
	(a, b) = find(s)
	if a == 'No':
		print('No')
	else:
		print(a)
		print(b)


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
lcm = lambda x, y: x * y // gcd(x, y)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7

def cnts(s):
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == p:
			cnt += 1
	return cnt

def dif(s):
	cnt = 0
	for i in range(7):
		if s[i] != '?' and s[i] != p[i]:
			cnt += 1
	return False if cnt else True
for _ in range(I()):
	n = I()
	a = S()
	p = 'abacaba'
	f = cnts(a)
	if f == 1:
		print('YES')
		print(a.replace('?', 'x'))
	elif f > 1:
		print('NO')
	else:
		flg = True
		for i in range(n - 6):
			if dif(a[i:i + 7]) and cnts(a[:i] + p + a[i + 7:]) == 1:
				print('YES')
				print((a[:i] + p + a[i + 7:]).replace('?', 'x'))
				flg = False
				break
		if flg:
			print('NO')


from distutils.filelist import findall
import re
regex = '(a|\\?)(b|\\?)(a|\\?)(c|\\?)(a|\\?)(b|\\?)(a|\\?)'

def check(text):
	cnt = 0
	for i in range(len(text) - 6):
		if text[i:i + 7] == 'abacaba':
			cnt += 1
	return cnt

def solve():
	_ = input()
	text = input()
	for i in range(len(text) - 6):
		text_qujian = text[i:i + 7]
		reg_res = re.findall(regex, text_qujian)
		if len(reg_res) == 0:
			continue
		tmp_res = text[:i] + 'abacaba' + text[i + 7:]
		if check(tmp_res) == 1:
			print('Yes')
			print(tmp_res.replace('?', 'd'))
			return
	print('No')
times = int(input())
for i in range(times):
	solve()


to_find = 'abacaba'
for _ in range(int(input())):
	n = int(input())
	s = input()
	cou = 0
	for i in range(n - 6):
		if s[i:i + 7] == to_find:
			cou += 1
	if cou > 1:
		print('No')
	elif cou == 1:
		print('Yes')
		print(s.replace('?', 'z'))
	else:
		done = False
		for idx in range(n - 6):
			flag = True
			for i in range(7):
				if s[idx + i] != '?' and s[idx + i] != to_find[i]:
					flag = False
			if flag:
				st = list(s.replace('?', 'z'))
				for i in range(idx, idx + 7):
					st[i] = to_find[i - idx]
				st = ''.join(st)
				cou = 0
				for i in range(n - 6):
					if st[i:i + 7] == to_find:
						cou += 1
				if cou != 1:
					continue
				done = True
				print('Yes')
				print(st)
			if done:
				break
		if not done:
			print('No')


def counti(new_s, tgt):
	c = 0
	for i in range(len(new_s) - len(tgt) + 1):
		for j in range(i, i + len(tgt)):
			if new_s[j] != tgt[j - i]:
				break
		else:
			c += 1
	return c
for h in range(int(input())):
	n = int(input())
	s = input()
	tgt = 'abacaba'
	tot = 0
	que = 0
	fini = []
	for i in range(n - len(tgt) + 1):
		flag = 0
		arr = []
		for j in range(i, i + len(tgt)):
			if s[j] != tgt[j - i]:
				if s[j] == '?':
					flag = 1
					arr.append((j, tgt[j - i]))
				else:
					break
		else:
			if flag == 1:
				que += 1
				fini.append(arr)
			else:
				tot += 1
	if tot >= 2:
		print('No')
	elif tot == 1:
		s = s.replace('?', 'z')
		print('Yes')
		print(s)
	elif que > 0:
		for i in fini:
			temp = list(s)
			for j in i:
				temp[j[0]] = j[1]
			new_s = ''.join(temp)
			if counti(new_s, tgt) == 1:
				print('Yes')
				print(new_s.replace('?', 'z'))
				break
		else:
			print('No')
	else:
		print('No')


t = int(input())
pattern = 'abacaba'
for i in range(t):
	n = int(input())
	s = input()
	for j in range(n - 6):
		flag = 0
		flag1 = 0
		s1 = s[j:j + 7]
		s2 = ''
		for k in range(7):
			if s1[k] != '?' and s1[k] != pattern[k]:
				flag1 = 1
				break
		if flag1 == 0:
			s2 = s[:j] + pattern + s[j + 7:]
			s2 = s2.replace('?', 'x')
			if sum([1 if s2[i:i + 7] == pattern else 0 for i in range(n - 6)]) == 1:
				print('Yes')
				print(s2)
				flag = 1
				break
			else:
				continue
	if flag == 0:
		print('No')


target = 'abacaba'
m = len(target)
for t in range(int(input())):
	n = int(input())
	s = input()
	ans = None
	for l in range(0, n - m + 1):
		bad = False
		for i in range(m):
			if s[l + i] != '?' and s[l + i] != target[i]:
				bad = True
				break
		if bad:
			continue
		res = s[:l] + target + s[l + m:]
		if res.find(target) != l or res.rfind(target) != l:
			continue
		ans = res.replace('?', 'z')
		break
	if ans is None:
		print('No')
	else:
		print('Yes')
		print(ans)


T = int(input())
x = 'abacaba'

def match(s):
	for i in range(len(x)):
		if s[i] != x[i] and s[i] != '?':
			return False
	return True

def solve():
	n = int(input())
	s = input()
	if s.find(x) != s.rfind(x):
		return None
	if s.find(x) >= 0:
		return s.replace('?', 'z')
	for i in range(len(s) - len(x) + 1):
		if match(s[i:i + len(x)]):
			t = s[:i] + x + s[i + len(x):]
			if t.find(x) == t.rfind(x):
				return t.replace('?', 'z')
	return None
for t in range(T):
	s = solve()
	if s is None:
		print('No')
	else:
		print('Yes')
		print(s)


t = list('abacaba#')

def pi(s1):
	s1 = t + s1
	(j, k, c, n) = (1, 0, 0, len(s1))
	p = [0] * n
	while j < n:
		while k > 0 and s1[j] != s1[k]:
			k = p[k - 1]
		if s1[j] == s1[k]:
			p[j] = k + 1
			k += 1
			if p[j] == 7:
				c += 1
		else:
			p[j] = 0
		j += 1
	return c == 1
for _ in range(int(input())):
	n = int(input())
	s = list(input())
	f = 0
	for i in range(n - 6):
		k = 0
		s1 = s[:]
		for j in range(i, i + 7):
			while k < 7 and (s1[j] == t[k] or s1[j] == '?'):
				s1[j] = t[k]
				k += 1
			if k == 7:
				for z in range(n):
					if s1[z] == '?':
						s1[z] = 'z'
				f = pi(s1)
		if f:
			print('YES')
			print(''.join(s1))
			break
	if f == 0:
		print('No')


code = 'abacaba'

def checker(s, n):
	ans = 0
	for i in range(n - 7 + 1):
		if s[i:i + 7] == code:
			ans += 1
	return ans

def mapper(s, n):
	arr = list(s)
	for i in range(n - 7 + 1):
		f = 0
		for j in range(7):
			if arr[i + j] == '?':
				pass
			elif arr[i + j] == code[j]:
				pass
			else:
				f = 1
				break
		if f == 0:
			temp = arr[:]
			for j in range(7):
				if temp[i + j] == '?':
					temp[i + j] = code[j]
			for j in range(n):
				if temp[j] == '?':
					temp[j] = 'z'
			temp = ''.join((str(x) for x in temp))
			cnt = checker(temp, n)
			if cnt == 1:
				return [True, temp]
	return [False, arr]
for _ in range(int(input())):
	n = int(input())
	s = input()
	cnt = checker(s, n)
	if cnt > 1:
		print('No')
	else:
		x = mapper(s, n)
		if x[0] == True:
			print('Yes')
			print(x[1])
		else:
			print('No')


for _ in range(int(input())):
	n = int(input())
	s = input()
	pattern = 'abacaba'
	for i in range(n - 6):
		ok = 1
		for j in range(7):
			if s[i + j] != '?' and s[i + j] != pattern[j]:
				ok = 0
				break
		if ok == 0:
			continue
		temp = list(s[:i] + pattern + s[i + 7:])
		temp = ''.join(['z' if k == '?' else k for k in temp])
		if sum([1 if temp[x:x + 7] == pattern else 0 for x in range(n - 6)]) == 1:
			print('YES')
			print(temp)
			break
		ok = 0
	if ok == 0:
		print('NO')


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd, log
from collections import deque
from bisect import bisect_left, bisect_right
l = ['abacaba', 'abacab?', 'abaca?a', 'abaca??', 'abac?ba', 'abac?b?', 'abac??a', 'abac???', 'aba?aba', 'aba?ab?', 'aba?a?a', 'aba?a??', 'aba??ba', 'aba??b?', 'aba???a', 'aba????', 'ab?caba', 'ab?cab?', 'ab?ca?a', 'ab?ca??', 'ab?c?ba', 'ab?c?b?', 'ab?c??a', 'ab?c???', 'ab??aba', 'ab??ab?', 'ab??a?a', 'ab??a??', 'ab???ba', 'ab???b?', 'ab????a', 'ab?????', 'a?acaba', 'a?acab?', 'a?aca?a', 'a?aca??', 'a?ac?ba', 'a?ac?b?', 'a?ac??a', 'a?ac???', 'a?a?aba', 'a?a?ab?', 'a?a?a?a', 'a?a?a??', 'a?a??ba', 'a?a??b?', 'a?a???a', 'a?a????', 'a??caba', 'a??cab?', 'a??ca?a', 'a??ca??', 'a??c?ba', 'a??c?b?', 'a??c??a', 'a??c???', 'a???aba', 'a???ab?', 'a???a?a', 'a???a??', 'a????ba', 'a????b?', 'a?????a', 'a??????', '?bacaba', '?bacab?', '?baca?a', '?baca??', '?bac?ba', '?bac?b?', '?bac??a', '?bac???', '?ba?aba', '?ba?ab?', '?ba?a?a', '?ba?a??', '?ba??ba', '?ba??b?', '?ba???a', '?ba????', '?b?caba', '?b?cab?', '?b?ca?a', '?b?ca??', '?b?c?ba', '?b?c?b?', '?b?c??a', '?b?c???', '?b??aba', '?b??ab?', '?b??a?a', '?b??a??', '?b???ba', '?b???b?', '?b????a', '?b?????', '??acaba', '??acab?', '??aca?a', '??aca??', '??ac?ba', '??ac?b?', '??ac??a', '??ac???', '??a?aba', '??a?ab?', '??a?a?a', '??a?a??', '??a??ba', '??a??b?', '??a???a', '??a????', '???caba', '???cab?', '???ca?a', '???ca??', '???c?ba', '???c?b?', '???c??a', '???c???', '????aba', '????ab?', '????a?a', '????a??', '?????ba', '?????b?', '??????a', '???????']
q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	flag = 0
	x = 'abacaba'
	for i in range(n - 6):
		if s[i:i + 7] in l:
			ab = s[:i] + x + s[i + 7:]
			a = 0
			b = 0
			while 1:
				b = ab.find(x, b)
				if b == -1:
					break
				a += 1
				b += 1
			if a == 1:
				print('Yes')
				print(ab.replace('?', 'k'))
				flag = 1
				break
	if flag == 0:
		print('No')


def cntr(s):
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == list('abacaba'):
			cnt += 1
	return cnt
t = int(input())
for _ in range(t):
	n = int(input())
	s = list(input())
	cnt = cntr(s)
	if cnt > 1:
		print('No')
		continue
	elif cnt == 1:
		for i in range(n):
			if s[i] == '?':
				s[i] = 'p'
		print('Yes')
		print(''.join(s))
		continue
	done = False
	for j in range(n - 6):
		p = s[j:j + 7]
		q = list('abacaba')
		for i in range(7):
			if p[i] == q[i]:
				continue
			elif p[i] != q[i] and p[i] == '?':
				p[i] = q[i]
			else:
				break
		if p == q:
			final = s[:j] + p + s[j + 7:]
			for i in range(len(final)):
				if final[i] == '?':
					final[i] = 'p'
			if cntr(final) == 1:
				print('Yes')
				print(''.join(final))
				done = True
				break
	if not done:
		print('No')


import sys
input = sys.stdin.readline
v = 'abacaba'
z = lambda s, n: sum((s[i:i + 7] == v for i in range(n - 6)))
t = set()
for i in range(128):
	nv = ''
	for j in range(7):
		if i // 2 ** j % 2:
			nv += '?'
		else:
			nv += v[j]
	t.add(nv)
for _ in range(int(input())):
	n = int(input())
	s = input()
	a = z(s, n)
	f = 1
	if a:
		if a - 1:
			print('NO')
		else:
			print('YES')
			print(s.replace('?', 'z'))
		continue
	p = []
	for i in range(n - 6):
		if s[i:i + 7] in t:
			p.append(i)
	if p:
		for l in p:
			y = s[:l] + v + s[l + 7:]
			if z(y, n) == 1:
				print('YES')
				print(y.replace('?', 'z'))
				f = 0
				break
		if f:
			print('NO')
	else:
		print('NO')


t = 'abacaba'

def count(s):
	cnt = 0
	s = ''.join(map(str, s))
	for i in range(len(s)):
		if s[i:i + len(t)] == t:
			cnt += 1
	return cnt

def solve(n, s):
	ss = []
	for i in range(n):
		ss.append(s[i])
	temp = ss
	flag = False
	okay = True
	for i in range(n - len(t) + 1):
		ss = temp.copy()
		okay = True
		for j in range(0, len(t)):
			if ss[i + j] != '?' and ss[i + j] != t[j]:
				okay = False
				break
			ss[i + j] = t[j]
		if okay and count(ss) == 1:
			for j in range(0, n):
				if ss[j] == '?':
					ss[j] = 'z'
			flag = True
			print('YES')
			print(''.join(map(str, ss)))
			break
	if flag == False:
		print('NO')
	return
q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	solve(n, s)


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	ans = []
	sample = 'abacaba'
	for _ in range(n):
		k = I()
		s = S()
		a = []
		for i in range(k - 6):
			f = True
			for j in range(7):
				if s[i + j] == '?':
					continue
				if s[i + j] == sample[j]:
					continue
				f = False
			if f:
				_s = list(copy.deepcopy(s))
				for j in range(7):
					_s[i + j] = sample[j]
				_s = ''.join(_s)
				cnt = 0
				for j in range(k - 6):
					if _s[j:j + 7] == sample:
						cnt += 1
				if cnt > 1:
					continue
				_s = _s.replace('?', 'z')
				a.append(_s)
		ans.append(a)
	for x in ans:
		if len(x) == 0:
			print('No')
		else:
			print('Yes')
			print(x[0])
main()


a = 'abacaba'
for _ in range(int(input())):
	n = int(input())
	s = input()
	if s.find(a) != -1 and s.rfind(a) == s.find(a):
		print('Yes\n' + s.replace('?', 'z'))
	else:
		y = True
		for i in range(n - 6):
			w = s[i:i + 7]
			w = ''.join([j if x == j or x == '?' else x for (x, j) in zip(w, a)])
			b = s[:i] + w + s[i + 7:]
			if b.find(a) != -1 and b.find(a) == b.rfind(a):
				print('Yes\n' + b.replace('?', 'z'))
				y = False
				break
		if y:
			print('No')


def f(s, n):
	ss = 'abacaba'
	ans = 0
	for i in range(n - 7 + 1):
		flag = True
		for j in range(7):
			if s[i + j] != ss[j]:
				flag = False
				break
		if flag == True:
			ans += 1
	return ans
t = int(input())
for case in range(t):
	n = int(input())
	s = input()
	ss = 'abacaba'
	index = []
	for i in range(n - 7 + 1):
		flag = True
		for j in range(7):
			if s[i + j] != ss[j] and s[i + j] != '?':
				flag = False
				break
		if flag == True:
			index.append(i)
	flag = False
	for i in index:
		st = s[:i] + ss + s[i + 7:]
		while '?' in st:
			st = st.replace('?', 'z')
		if f(st, n) == 1:
			print('Yes')
			print(st)
			flag = True
			break
	if flag == False:
		print('No')


import re
t = 'abacaba'
p = '(?<!abac)(?<!abacab)' + ''.join((f'({x}|\\?)' for x in t)) + '(?!caba)(?!bacaba)'
for s in [*open(0)][2::2]:
	if t not in s:
		s = re.sub(p, t, s, 1)
	print('YES ' + s.replace('?', 'd') if s.find(t) == s.rfind(t) >= 0 else 'NO')


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
x = list('abacaba')
for _ in range(int(input())):
	n = int(input())
	s = input().strip()
	f = 0
	s = list(s)
	for i in range(n - 7 + 1):
		if s[i:i + 7] == x:
			f += 1
	if f > 1:
		print('No')
	elif f == 1:
		for i in range(n):
			if s[i] == '?':
				s[i] = 'k'
		print('Yes')
		print(''.join(s))
	else:
		final = 0
		for i in range(n - 7 + 1):
			ss = s.copy()
			ff = 1
			for j in range(i, i + 7):
				if ss[j] != '?' and ss[j] != x[j - i]:
					ff = 0
					break
			if ff:
				for j in range(i, i + 7):
					if ss[j] == '?':
						ss[j] = x[j - i]
				for kk in range(n):
					if ss[kk] == '?':
						ss[kk] = 'k'
				non = 0
				for i in range(n - 7 + 1):
					if ss[i:i + 7] == x:
						non += 1
				if non == 1:
					s = ''.join(ss)
					final = 1
					break
		if final == 1:
			print('Yes')
			print(s)
		else:
			print('No')


import sys, math

def CountOccurrences(string, substring):
	count = 0
	start = 0
	while start < len(string):
		pos = string.find(substring, start)
		if pos != -1:
			start = pos + 1
			count += 1
		else:
			break
	return count
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	pattern = 'abacaba'
	flag = 0
	ans = ''
	for i in range(0, n - 6):
		flag = 0
		for j in range(i, i + 7):
			if s[j] != '?' and s[j] != pattern[j - i]:
				flag = 1
				break
		if flag == 0:
			ans += s[:i] + pattern + s[i + 7:]
			if CountOccurrences(ans, pattern) == 1:
				ans = ans.replace('?', 'z')
				break
			else:
				ans = ''
		flag = 1
	if flag == 1:
		print('NO')
	else:
		print('YES')
		print(ans)


import sys
import math
read = sys.stdin.buffer.read
readlines = sys.stdin.buffer.readlines
t = int(input())
for case in range(t):
	n = int(input())
	s = input()
	s += 'zzzzzzz'
	ans = ''
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == 'abacaba':
			cnt += 1
	if cnt >= 2:
		print('No')
	elif s == '???????zzzzzzz':
		print('Yes')
		print('abacaba')
	elif cnt == 1:
		for i in range(n):
			k = s[i]
			if k == '?':
				k = 'd'
			ans += k
		print('Yes')
		print(ans)
	else:
		ans_bit = -1
		ref = 'abacaba'
		for i in range(n - 6):
			comp = s[i:i + 7]
			ok = 0
			for j in range(7):
				if comp[j] == ref[j] or comp[j] == '?':
					ok += 1
			if ok == 7:
				if s[i + 7:i + 11] == 'caba':
					pass
				elif i >= 4 and s[i - 4:i] == 'abac':
					pass
				else:
					ans_bit = i
					break
		if ans_bit > -1:
			for i in range(n):
				if ans_bit <= i <= ans_bit + 6:
					ans += ref[i - ans_bit]
				elif s[i] == '?':
					ans += 'd'
				else:
					ans += s[i]
			print('Yes')
			print(ans)
		else:
			print('No')


def count1(s, pat):
	count = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == pat:
			count += 1
	return count
for nt in range(int(input())):
	n = int(input())
	s = input()
	if count1(s, 'abacaba') >= 2:
		print('No')
		continue
	elif count1(s, 'abacaba') == 1:
		print('Yes')
		ans = ''
		for i in range(n):
			if s[i] == '?':
				ans += 'z'
			else:
				ans += s[i]
		print(ans)
		continue
	string = 'abacaba'
	ans = 0
	for i in range(n - 6):
		temp = ''
		flag = 0
		for j in range(7):
			if s[i + j] == '?':
				temp += string[j]
			elif s[i + j] != string[j]:
				flag = 1
				break
			else:
				temp += s[i + j]
		if flag:
			continue
		else:
			new = s[0:i] + temp + s[i + 7:]
			if count1(new, 'abacaba') == 1:
				ans = 1
				break
	if ans:
		ans = ''
		for i in new:
			if i == '?':
				ans += 'z'
			else:
				ans += i
		print('Yes')
		print(ans)
	else:
		print('No')


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	t = 'abacaba'
	flag = 0
	done = 0
	for i in range(n - 6):
		fail = 0
		for j in range(7):
			if s[i + j] != t[j]:
				fail = 1
				break
		if fail == 1:
			continue
		flag += 1
	if flag >= 2:
		print('No')
		continue
	if flag == 1:
		print('Yes')
		ans = []
		for i in range(n):
			if s[i] == '?':
				ans.append('z')
			else:
				ans.append(s[i])
		print(''.join(ans))
		continue
	for i in range(n - 6):
		fail = 0
		done = 0
		for j in range(7):
			if s[i + j] != '?' and s[i + j] != t[j]:
				fail = 1
				break
		if fail == 1:
			continue
		totalfail = 0
		if i + 11 <= n:
			fail = 0
			for j in range(3, 7):
				if s[i + j + 4] != t[j]:
					fail = 1
					break
			if fail == 0:
				totalfail = 1
		if i + 13 <= n:
			fail = 0
			for j in range(1, 7):
				if s[i + j + 6] != t[j]:
					fail = 1
					break
			if fail == 0:
				totalfail = 1
		if i - 4 >= 0:
			fail = 0
			for j in range(4):
				if s[i + j - 4] != t[j]:
					fail = 1
					break
			if fail == 0:
				totalfail = 1
		if i - 6 >= 0:
			fail = 0
			for j in range(6):
				if s[i + j - 6] != t[j]:
					fail = 1
					break
			if fail == 0:
				totalfail = 1
		if totalfail == 1:
			continue
		ans = []
		print('Yes')
		for j in range(n):
			if j >= i and j < i + 7:
				ans.append(t[j - i])
			elif s[j] == '?':
				ans.append('z')
			else:
				ans.append(s[j])
		print(''.join(ans))
		done = 1
		break
	if done == 0:
		print('No')


from sys import stdin, stdout
s1 = list('abacaba')

def fn(ss):
	for i in range(7):
		if ss[i] == '?':
			continue
		if ss[i] != s1[i]:
			return False
	return True
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	p = n
	s = list(input())
	cc = flag = 0
	for i in range(n - 6):
		sub = s[i:i + 7]
		if sub == s1:
			cc += 1
	if cc == 1:
		print('Yes')
		for i in range(n):
			if s[i] == '?':
				stdout.write('z')
			else:
				stdout.write(s[i])
		print()
		continue
	if cc > 1:
		print('No')
		continue
	for ii in range(n - 6):
		sub = s[ii:ii + 7]
		if fn(sub) == False:
			continue
		s11 = s.copy()
		for i in range(7):
			if s11[ii + i] == '?':
				s11[ii + i] = s1[i]
		cc = 0
		for i in range(n - 6):
			if s11[i:i + 7] == s1:
				cc += 1
		if cc == 1:
			flag = 1
			break
	if flag == 1:
		print('Yes')
		for i in range(n):
			if s11[i] == '?':
				stdout.write('d')
			else:
				stdout.write(s11[i])
		print()
	else:
		print('No')


def func(s, t):
	broke = False
	if len(s) == 7:
		for i in range(7):
			if s[i] == t[i] or s[i] == '?':
				pass
			else:
				broke = True
				break
		return not broke
	return broke
for _ in range(int(input())):
	n = int(input())
	s = input()
	t = 'abacaba'
	c = 0
	for i in range(n - 6):
		if s[i:i + 7] == t:
			c += 1
	if c == 1:
		print('Yes')
		print(s.replace('?', 'z'))
	elif c > 1:
		print('No')
	else:
		broke = False
		for i in range(n - 6):
			if func(s[i:i + 7], t):
				o = s[:i] + t + s[i + 7:]
				c = 0
				for i in range(n - 6):
					if o[i:i + 7] == t:
						c += 1
				if c == 1:
					print('Yes')
					print(o.replace('?', 'z'))
					broke = True
					break
		if not broke:
			print('No')


for _ in range(int(input())):
	s = 'abacaba'
	n = int(input())
	l = list(input())
	cnt = 0
	for i in range(n - 7 + 1):
		if ''.join(l[i:i + 7]) == s:
			cnt += 1
	if cnt == 0:
		arr = []
		for i in range(n - 7, -1, -1):
			x = l[i:i + 7]
			for j in range(7):
				if x[j] == '?':
					x[j] = s[j]
			if ''.join(x) == s:
				arr.append(i)
		flag = False
		ans = ''
		for i in range(len(arr)):
			x = l.copy()
			x[arr[i]:arr[i] + 7] = list(s)
			cnt = 0
			for j in range(n - 6):
				if ''.join(x[j:j + 7]) == s:
					cnt += 1
			if cnt == 1:
				flag = True
				for j in range(n):
					if x[j] == '?':
						x[j] = 'x'
				ans = ''.join(x)
				break
		if flag:
			print('YES')
			print(ans)
		else:
			print('NO')
	elif cnt == 1:
		print('YES')
		for i in range(n):
			if l[i] == '?':
				print('d', end='')
			else:
				print(l[i], end='')
		print()
	else:
		print('NO')


t = int(input())
pattern = 'abacaba'
for _ in range(t):
	n = int(input())
	s = input()
	yes = 0
	for i in range(n - 6):
		yes = 1
		for k in range(7):
			if s[i + k] != '?' and s[i + k] != pattern[k]:
				yes = 0
				break
		if yes == 0:
			continue
		t = list(s[:i] + pattern + s[i + 7:])
		t = ''.join(['x' if x == '?' else x for x in t])
		if sum([1 if t[i:i + 7] == pattern else 0 for i in range(n - 6)]) == 1:
			print('Yes\n' + t)
			break
		yes = 0
	if yes == 0:
		print('No')


q = 'abacaba'

def count(s, c, n):
	cou = 0
	for i in range(n - 6):
		if s[i:i + 7] == c:
			cou += 1
	return cou
for _ in range(int(input())):
	n = int(input())
	s = input()
	i = 0
	ans = True
	for i in range(n - 6):
		sl = s[:i]
		check = True
		for j in range(7):
			if s[i + j] == '?' or s[i + j] == q[j]:
				sl = sl + q[j]
			else:
				check = False
				break
		sl = sl + s[i + 7:]
		if check and count(sl, q, n) == 1:
			print('Yes')
			for i in sl:
				if i == '?':
					print('d', end='')
				else:
					print(i, end='')
			print(' ')
			ans = False
			break
	if ans:
		print('No')


N = int(input())
abacaba = list('abacaba')
for _ in range(N):
	n = int(input())
	t = list(input())
	tmp = t[:]
	ans = None
	if ''.join(abacaba) in ''.join(t):
		if sum((abacaba == t[i:i + 7] for i in range(n - 6))) == 1:
			print('Yes')
			print(''.join(t).replace('?', 'd'))
		else:
			print('No')
		continue
	for i in range(n - 6):
		x = t[i:i + 7]
		a = x.count('?')
		if a == sum((i != j for (i, j) in zip(abacaba, x))):
			tmp[i:i + 7] = abacaba
			if sum((abacaba == tmp[i:i + 7] for i in range(n - 6))) == 1:
				t[i:i + 7] = abacaba
				ans = ''.join(t).replace('?', 'd')
				print('Yes')
				print(ans)
				break
			else:
				tmp = t[:]
				continue
	else:
		print('No')


import sys
input = sys.stdin.readline

def solve():
	n = int(input())
	s = input().strip()
	t = 'abacaba'
	ans = 'No'
	for i in range(n - 6):
		ANS = []
		check = True
		for j in range(n):
			if i <= j and j <= i + 6:
				if s[j] == '?' or s[j] == t[j - i]:
					ANS.append(t[j - i])
				else:
					check = False
					break
			elif s[j] == '?':
				ANS.append('x')
			else:
				ANS.append(s[j])
		if not check:
			continue
		count = 1
		z = 0
		for j in range(n - 6):
			if j == i:
				continue
			for k in range(7):
				if ANS[j + k] != t[k]:
					break
			else:
				count += 1
		if count == 1:
			return '\n'.join(['Yes', ''.join(ANS)])
	return 'No'

def main():
	T = int(input())
	ANS = [solve() for _ in range(T)]
	print('\n'.join(ANS))
main()


from sys import stdin
input = stdin.readline
t = int(input())
p = 'abacaba'
for _ in range(t):
	n = int(input())
	s = input()
	cnt = 0
	for i in range(n - 6):
		cnt = 1
		for j in range(7):
			if s[i + j] != '?' and s[i + j] != p[j]:
				cnt = 0
				break
		if cnt == 0:
			continue
		t = list(s[:i] + p + s[i + 7:])
		t = ''.join(['z' if x == '?' else x for x in t])
		if sum([1 if t[i:i + 7] == p else 0 for i in range(n - 6)]) == 1:
			print('Yes')
			print(t)
			break
	else:
		print('No')


def get_st(s, st, end):
	new_s = ''
	for i in range(st, end):
		if s[i] == '?':
			new_s += 'd'
		else:
			new_s += s[i]
	return new_s

def subs(n, s):
	sub = 'abacaba'
	l = []
	already = 0
	i = 0
	while n - i >= 7:
		flag = True
		q = False
		j = i
		while j - i < 7:
			if s[j] != '?' and s[j] != sub[j - i]:
				flag = False
				break
			elif s[j] == '?':
				q = True
			j += 1
		if flag:
			if q:
				l.append(i)
			else:
				already += 1
		i += 1
	if already > 1:
		print('NO')
	elif already == 1:
		print('YES')
		print(get_st(s, 0, n))
	elif len(l) == 0:
		print('NO')
	else:
		ind = -1
		i = 0
		while i < len(l):
			if i < len(l) - 1 and l[i + 1] - l[i] < 7:
				flag1 = '?' in s[l[i] + 7:l[i + 1] + 7]
				flag2 = '?' in s[l[i]:l[i + 1]]
				if flag1:
					ind = i
					break
				elif flag2:
					ind = i + 1
					break
				i += 2
			else:
				ind = i
				break
		if ind == -1:
			print('NO')
		else:
			s1 = get_st(s, 0, l[ind])
			s2 = get_st(s, l[ind] + 7, n)
			print('YES')
			print(s1 + sub + s2)
t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	subs(n, s)


from sys import stdin, stdout
import math
from collections import Counter, deque
L = lambda : list(map(int, stdin.readline().strip().split()))
M = lambda : map(int, stdin.readline().strip().split())
I = lambda : int(stdin.readline().strip())
IN = lambda : stdin.readline().strip()
C = lambda : stdin.readline().strip().split()
mod = 1000000007

def s(a):
	print(''.join(list(map(str, a))))

def solve():
	n = I()
	s = IN()
	a = 'abacaba'
	flag = 0
	for i in range(n - 6):
		f = 1
		for j in range(7):
			if s[i + j] != a[j] and s[i + j] != '?':
				f = 0
				break
		if f:
			st = list(s)
			for j in range(7):
				st[i + j] = a[j]
			st = ''.join(list(map(str, st)))
			c = 0
			for j in range(n - 6):
				if st[j:j + 7] == a:
					c += 1
			if c == 1:
				print('YES')
				print(st.replace('?', 'p'))
				return
	print('NO')
for _ in range(I()):
	solve()


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
except:
	pass
t = L()[0]
for _ in range(t):
	match = 'abacaba'
	n = L()[0]
	s = input()
	b = s
	ans = 'NO'
	for i in range(2 ** 7):
		s = b
		x = bin(i)[2:]
		x = '0' * (7 - len(x)) + x
		curr = ''
		for j in range(7):
			if x[j] == '0':
				curr += '?'
			else:
				curr += match[j]
		if curr in s:
			occur = []
			for j in range(len(s) - 6):
				if s[j:j + 7] == curr:
					occur.append(j)
			for occurance in occur:
				ans = 'YES'
				s = list(b)
				curr = list(curr)
				j = 0
				while j < len(s) - 6:
					if s[j:j + 7] == curr and j == occurance:
						k = 0
						while k < 7:
							s[j] = match[k]
							k += 1
							j += 1
					else:
						if s[j] == '?':
							s[j] = 'z'
						j += 1
				while j < len(s):
					if s[j] == '?':
						s[j] = 'z'
					j += 1
				if ans == 'YES':
					s = ''.join(s)
					count = 0
					for j in range(len(s) - 6):
						if s[j:j + 7] == match:
							count += 1
					if count == 1:
						break
					ans = 'NO'
		if ans == 'YES':
			break
	if ans == 'YES':
		print(ans)
		print(''.join(s))
	else:
		print(ans)


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

def sain():
	return input().split()

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	s = set()
	for p in range(2, n + 1):
		if prime[p]:
			s.add(p)
	return s

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		n = iin()
		s = sin()
		if s == 'abacaba':
			print('YES')
			print(s)
		elif s == '???????':
			print('YES')
			print('abacaba')
		else:
			x = 'abacaba'
			count = 0
			for i in range(n - 6):
				if s[i] == 'a':
					if s[i:i + 7] == 'abacaba':
						count += 1
			if count == 1:
				k = list(s)
				for i in range(n):
					if k[i] == '?':
						k[i] = 'x'
				print('YES')
				print(''.join(k))
			elif count > 1:
				print('NO')
			else:
				p = list(s)
				k = list(s)
				flag = 0
				ans = 0
				for i in range(n - 6):
					qc = 0
					dc = 0
					k = p[:]
					for j in range(7):
						if s[i:i + 7][j] == '?':
							k[i + j] = x[j]
						elif s[i:i + 7][j] != x[j]:
							dc += 1
					if dc == 0:
						zc = 0
						for z in range(n - 6):
							if k[z:z + 7] == ['a', 'b', 'a', 'c', 'a', 'b', 'a']:
								zc += 1
						if zc == 1:
							flag = 1
							break
				if flag == 1:
					for i in range(n):
						if k[i] == '?':
							k[i] = 'z'
					print('YES')
					print(''.join(k))
				else:
					print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')
main()


import math
t = int(input())
rt = 'abacaba'
for _ in range(t):
	n = int(input())
	s = str(input())
	u = list(s)
	s = u * 1
	for i in range(len(s) - 6):
		for j in range(7):
			if u[i + j] == rt[j] or u[i + j] == '?':
				u[i + j] = rt[j]
			else:
				u = s * 1
				break
		else:
			for j in range(len(u)):
				if u[j] == '?':
					u[j] = 'v'
			er = ''.join(u)
			count = 0
			for j in range(len(s) - 6):
				if er[j:7 + j] == rt:
					count += 1
			if count == 1:
				print('YES')
				print(er)
				break
			else:
				u = s * 1
	else:
		print('NO')


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop, heapify
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]

def check(s):
	s1 = 'abacaba'
	for j in range(len(s)):
		if s[j] == '?' or s[j] == s1[j]:
			continue
		else:
			return 0
	return 1

def makeit(s):
	l = []
	print('Yes')
	for i in s:
		if i != '?':
			l.append(i)
		else:
			l.append('z')
	print(*l, sep='')
for _ in range(val()):
	n = val()
	s = st()
	temp = 0
	for i in range(6, len(s)):
		if s[i - 6:i + 1] == 'abacaba':
			temp += 1
	if temp > 1:
		print('No')
		continue
	elif temp == 1:
		makeit(s)
	else:
		ans = 0
		for i in range(6, n):
			if check(s[i - 6:i + 1]):
				ans = s[:i - 6] + 'abacaba' + s[i + 1:]
				temp = 0
				for i in range(6, len(ans)):
					if ans[i - 6:i + 1] == 'abacaba':
						temp += 1
				if temp == 1:
					break
				ans = 0
		if 0 == ans:
			print('No')
		else:
			makeit(ans)


PATTERN = 'abacaba'

def checker(s, p):
	return sum((s[i:i + len(p)] == p for i in range(len(s) - len(p) + 1))) == 1

def solve(s, p):
	for i in range(len(s) - len(p) + 1):
		z = ''
		for (j, c) in enumerate(s):
			if c == '?':
				if i <= j < i + len(p):
					z += p[j - i]
				else:
					z += 'z'
			else:
				z += c
		if checker(z, p):
			return z
	return ''
for _ in range(int(input())):
	n = int(input())
	s = input().rstrip()
	r = solve(s, PATTERN)
	if r:
		print('Yes')
		print(r)
	else:
		print('No')


from math import *

def r1(t):
	return t(input())

def r2(t):
	return [t(i) for i in input().split()]
for _ in range(r1(int)):
	n = r1(int)
	s = [i for i in input().strip()]
	cnt = 0
	t = [i for i in 'abacaba']
	ha = False
	for i in range(n - 6):
		ts = s[:]
		for j in range(7):
			if ts[i + j] == '?':
				ts[i + j] = t[j]
		for j in range(n):
			if ts[j] == '?':
				ts[j] = 'd'
		cnt = 0
		for j in range(n - 6):
			for k in range(7):
				if t[k] != ts[k + j]:
					cnt -= 1
					break
			cnt += 1
		if cnt == 1:
			ha = True
			print('YES')
			print(''.join(ts))
			break
	if not ha:
		print('NO')


import math
import collections

def check(n, s):
	cnt = 0
	for i in range(len(s)):
		if ''.join(s[i:i + 7]) == 'abacaba':
			cnt += 1
	return cnt
t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	T = 'abacaba'
	f = False
	for i in range(n - 7 + 1):
		ss = [k for k in s]
		ok = True
		for j in range(7):
			if ss[i + j] != '?' and ss[i + j] != T[j]:
				ok = False
				break
			ss[i + j] = T[j]
		if ok and check(n, ss) == 1:
			for j in range(n):
				if ss[j] == '?':
					ss[j] = 'd'
			f = True
			print('Yes')
			print(''.join(ss))
			break
	if not f:
		print('NO')


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict, Counter
import math

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()

def find_count(s, p):
	cnt = 0
	for i in range(6, n):
		st = s[i - 6:i + 1]
		if st == p:
			cnt += 1
	return cnt
t = intIn()
while t > 0:
	t -= 1
	n = intIn()
	s = stringIn()
	p = 'abacaba'
	cnt = find_count(s, p)
	if cnt == 1:
		ans = s.replace('?', 'd')
		print('Yes')
		print(ans)
	elif cnt > 1:
		print('No')
	else:
		flag = 0
		for i in range(0, n - 6, 1):
			st = s[i:i + 7]
			f = 0
			v = 0
			for j in range(7):
				if st[j] != p[j]:
					if st[j] == '?':
						v += 1
					else:
						f = 1
						break
				else:
					v += 1
			if f == 0 and v == 7:
				r_st = s[:i] + p + s[i + 7:]
				if find_count(r_st, p) == 1:
					flag = 1
					s = r_st
					break
		ans = s.replace('?', 'd')
		if flag:
			print('Yes')
			print(ans)
		else:
			print('No')


for _ in range(int(input())):
	n = int(input())
	s = input()
	check = 'abacaba'
	k = s.find(check)
	i = 0
	s = list(s)
	while i < n:
		if k > -1:
			if s[i] == '?':
				s[i] = 'z'
		else:
			j = 0
			while j < 7 and i + j < n:
				if s[i + j] == '?':
					j += 1
					continue
				elif s[i + j] != check[j]:
					break
				j += 1
			if j == 7:
				if i + j + 3 < n and ''.join(s[i + j:i + j + 4]) == 'caba' or (i - 4 >= 0 and ''.join(s[i - 4:i]) == 'abac'):
					i += 1
					continue
				k = 0
				for m in range(7):
					s[i + m] = check[m]
				i += j - 1
		i += 1
	for i in range(n):
		s[i] = 'z' if s[i] == '?' else s[i]
	s = ''.join(s)
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == check:
			cnt += 1
	if cnt == 1:
		print('Yes')
		print(s)
	else:
		print('No')


c = 'abacaba'
cc = list(c)

def pos(w):
	for ij in range(7):
		if w[ij] != c[ij] and w[ij] != '?':
			return []
		else:
			w[ij] = c[ij]
	return w

def CountOccurrences(string, substring):
	count = 0
	start = 0
	while start < len(string):
		pos1 = string.find(substring, start)
		if pos1 != -1:
			start = pos1 + 1
			count += 1
		else:
			break
	return count
for _ in range(int(input())):
	n = int(input())
	s = input()
	p = CountOccurrences(s, c)
	if p > 1:
		print('NO')
	elif p == 1:
		print('YES')
		for t in s:
			if t == '?':
				print('z', end='')
			else:
				print(t, end='')
		print()
	else:
		qw = list(s)
		i = 0
		j = 6
		while j < n:
			foo = pos(qw[i:j + 1])
			lp = qw[i:j + 1]
			if len(foo) != 0:
				k = 0
				for t in range(i, j + 1):
					qw[t] = foo[k]
					k += 1
				tst = ''
				for t in qw:
					tst += t
				ko = CountOccurrences(tst, c)
				if ko == 1:
					break
				else:
					qw[i:j + 1] = lp[0:7]
			i += 1
			j += 1
		for t in range(n):
			if qw[t] == '?':
				qw[t] = 'z'
		pt = ''
		for t in qw:
			pt += t
		po = CountOccurrences(pt, c)
		if po == 1:
			print('YES')
			print(pt)
		else:
			print('NO')


def coun(s):
	c = 0
	x = 'abacaba'
	for i in range(n - len(x) + 1):
		if ''.join(s[i:i + len(x)]) == x:
			c += 1
	return c
for ad in range(int(input())):
	n = int(input())
	s = list(input())
	c = coun(s)
	x = 'abacaba'
	if c == 1:
		print('YES')
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		print(''.join(s))
	elif c > 1:
		print('NO')
	else:
		q = 0
		for i in range(n - len(x) + 1):
			t = s[i:i + len(x)]
			p = 1
			for j in range(len(x)):
				if t[j] == x[j] or t[j] == '?':
					t[j] = x[j]
				else:
					p = 0
					break
			if p == 1:
				if coun(s[:i] + t + s[i + len(x):]) == 1:
					s[i:i + len(x)] = t
					q = 1
					break
		if q == 1:
			for i in range(n):
				if s[i] == '?':
					s[i] = 'z'
			print('YES')
			print(''.join(s))
		else:
			print('NO')


import sys, math, cmath, time
start_time = time.time()

def solve():
	n = inp()
	s = insr()
	a = list(s)
	qw = sum((1 for i in range(len(s)) if s.startswith('abacaba', i)))
	if qw == 0:
		qq = 0
		for i in range(len(a) - 6):
			q = a[i:i + 7]
			if (q[0] == 'a' or q[0] == '?') and (q[1] == 'b' or q[1] == '?') and (q[2] == 'a' or q[2] == '?') and (q[3] == 'c' or q[3] == '?') and (q[4] == 'a' or q[4] == '?') and (q[5] == 'b' or q[5] == '?') and (q[6] == 'a' or q[6] == '?'):
				a[i:i + 7] = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
				qq = 1
			if qq == 1 and sum((1 for i in range(len(s)) if ''.join(a).startswith('abacaba', i))) >= 2:
				a[i:i + 7] = q
				qq = 0
			elif qq == 1:
				break
		if qq == 1:
			print('Yes')
			print(''.join(a).replace('?', 'q'))
		else:
			print('No')
	elif qw == 1:
		print('Yes')
		print(''.join(a).replace('?', 'q'))
	else:
		print('No')

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = (q[ord(a[i]) - 97], 1)
	return q

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))

def transpose(a):
	(n, m) = (len(a), len(a[0]))
	b = [[0] * n for i in range(m)]
	for i in range(m):
		for j in range(n):
			b[i][j] = a[j][i]
	return b
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


for _ in range(int(input())):
	n = int(input())
	s = input()
	s1 = 'abacaba'
	if s1 in s:
		count = 0
		for i in range(len(s) - 6):
			if s[i] == 'a' and s[i:i + 7] == s1:
				count += 1
		if count == 1:
			for i in range(s.count('?')):
				s1 = s.replace('?', 'z')
			print('Yes')
			print(s1)
		else:
			print('No')
	else:
		for i in range(len(s) - 6):
			if s[i] == 'a' or s[i] == '?':
				x = 0
				for j in range(i, i + 7):
					if not (s[j] == s1[x] or s[j] == '?'):
						break
					x += 1
				else:
					s2 = s[:i] + s1 + s[i + 7:]
					s2 = list(s2)
					for i in range(len(s2)):
						if s2[i] == '?':
							s2[i] = 'z'
					s2 = ''.join(s2)
					cnt = 0
					for i in range(len(s) - 6):
						if s2[i] == 'a' and s2[i:i + 7] == s1:
							cnt += 1
					if cnt == 1:
						print('Yes')
						print(''.join(s2))
						break
		else:
			print('No')


for _ in range(int(input())):
	n = int(input())
	s = input()
	cnt = 0
	for i in range(0, n - 6):
		if s[i:i + 7] == 'abacaba':
			cnt += 1
	if cnt == 1:
		print('Yes')
		print(s.replace('?', 'z'))
		continue
	elif cnt > 1:
		print('No')
		continue
	i = 0
	while i < n:
		if s[i] == 'a' or s[i] == '?':
			for j in range(7):
				if i + j >= n:
					break
				if s[i + j] != 'abacaba'[j] and s[i + j] != '?':
					break
			else:
				cnt = 0
				s1 = s[0:i] + 'abacaba' + s[i + 7:]
				for k in range(0, len(s1)):
					if s1[k:k + 7] == 'abacaba':
						cnt += 1
				if cnt == 1:
					break
		i += 1
	if i < n:
		print('Yes')
		print(s[0:i].replace('?', 'z') + 'abacaba' + s[i + 7:].replace('?', 'z'))
	else:
		print('No')


import re

def get_count(s):
	return len(re.findall(f'(?=abacaba)', s))

def replace_all_question_marks(s):
	return s.replace('?', 'd')

def replace_str_index(text, index=0, replacement=''):
	return '%s%s%s' % (text[:index], replacement, text[index + 1:])
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	p = 'abacaba'
	found = False
	for i in range(0, n - len(p) + 1):
		sc = s
		ok = True
		for j in range(len(p)):
			if sc[i + j] != '?' and sc[i + j] != p[j]:
				ok = False
				break
			sc = replace_str_index(sc, i + j, p[j])
		if ok and get_count(sc) == 1:
			sc = replace_all_question_marks(sc)
			print('Yes')
			print(sc)
			found = True
			break
	if not found:
		print('No')


def abacaba(s):
	return (s[0] == 'a' or s[0] == '?') and (s[1] == 'b' or s[1] == '?') and (s[2] == 'a' or s[2] == '?') and (s[3] == 'c' or s[3] == '?') and (s[4] == 'a' or s[4] == '?') and (s[5] == 'b' or s[5] == '?') and (s[6] == 'a' or s[6] == '?')

def solve():
	n = int(input())
	s = input()
	first = s.find('abacaba')
	if first != -1:
		if s.find('abacaba', first + 1) == -1:
			print('Yes\n{}'.format(s.replace('?', 'z')))
		else:
			print('No')
	else:
		printed = False
		for i in range(n - 6):
			if abacaba(s[i:i + 7]):
				if s[max(0, i - 4):i] != 'abac' and s[i + 7:i + 11] != 'caba':
					printed = True
					print('Yes\n{}'.format(s[:i].replace('?', 'z') + 'abacaba' + s[i + 7:].replace('?', 'z')))
					break
		if not printed:
			print('No')
t = int(input())
while t != 0:
	solve()
	t -= 1


tests = int(input())
for test in range(tests):
	n = int(input())
	string = input()
	check = 'abacaba'
	count = 0
	end = 7
	if len(string) < 7:
		print('NO')
	else:
		while end <= len(string):
			string_sub = string[end - 7:end]
			if string_sub == check:
				count += 1
			end += 1
		if count > 1:
			print('NO')
		elif count == 1:
			res = ''
			for letter in string:
				if letter == '?':
					res += 'd'
				else:
					res += letter
			print('YES')
			print(res)
		else:
			end = 7
			res = ''
			status = False
			while end <= len(string):
				string_sub = string[end - 7:end]
				start = 0
				end_res = None
				for letter in string_sub:
					if letter == check[start] or letter == '?':
						start += 1
				if start == 7:
					new_string = string[:end - 7] + 'abacaba' + string[end:]
					start_res = max(0, end - 13)
					status = True
					sub_count = 0
					while start_res + 7 <= len(string) and sub_count <= 13:
						string_sub = new_string[start_res:start_res + 7]
						if string_sub == check and start_res != end - 7:
							status = False
							break
						start_res += 1
						sub_count += 1
					if status:
						end_res = end
						break
				end += 1
			if status:
				start = end_res - 7
				end = end_res
				res = ''
				for letter in string:
					if letter == '?':
						res += 'd'
					else:
						res += letter
				res = res[:start] + 'abacaba' + res[end:]
				print('YES')
				print(res)
			else:
				print('NO')


import re
p = re.compile('[a?][b?][a?][c?][a?][b?][a?]')
T = int(input())
for _ in range(T):
	input()
	s = input()
	if 'abacaba' in s:
		ans = s.replace('?', 'z')
		if 'abacaba' in ans[ans.index('abacaba') + 1:]:
			print('No')
		else:
			print('Yes')
			print(ans)
		continue
	m = p.search(s)
	while m is not None:
		st = m.start()
		ans = f'{s[:st]}abacaba{s[m.end():]}'.replace('?', 'z')
		if 'abacaba' not in ans[ans.index('abacaba') + 1:]:
			print('Yes')
			print(ans)
			break
		m = p.search(s, st + 1)
	else:
		print('No')
		continue


com = ['a', 'b', 'a', 'c', 'a', 'b', 'a']

def check(s, n, c):
	oc = 0
	i = 0
	q = 0
	while q < n:
		t = s.find(c, i)
		if t >= 0:
			i = t + 1
			oc += 1
		q += 1
	return oc
I = input
for _ in range(int(I())):
	n = int(I())
	s = I()
	oc = check(s, n, 'abacaba')
	if oc == 1:
		sl = list(s)
		ans = ''
		print('YES')
		for i in range(n):
			if sl[i] == '?':
				sl[i] = 'z'
		for i in sl:
			ans += i
		print(ans)
	else:
		t = s.find('?')
		if t == -1:
			print('NO')
		else:
			ind = 0
			ist = 0
			iend = n - 1
			ans = []
			iii = -1
			while t != -1:
				ist = t - 6 if t - 6 >= 0 else 0
				iend = t + 6 if t + 6 <= n - 1 else n - 1
				s1 = s[ist:iend + 1]
				ns1 = len(s1)
				iii = ist
				for i in range(ns1):
					iii += 1
					tt = i + 7 if i + 7 < ns1 else ns1
					temp = s1[i:tt]
					ind = 0
					anst = []
					if len(temp) != 7:
						break
					for j in range(7):
						if temp[j] == com[j]:
							continue
						elif temp[j] == '?':
							anst.append([iii + j - 1, com[j]])
						else:
							ind = -1
							anst.clear()
							break
					if ind == 0:
						ans.append(anst)
				t = s.find('?', t + 1)
			sl = list(s)
			if len(ans) == 0:
				print('NO')
			else:
				t = 0
				for i in ans:
					sl1 = sl[:]
					for j in i:
						sl1[j[0]] = j[1]
					for q in range(n):
						if sl1[q] == '?':
							sl1[q] = 'z'
					ans1 = ''
					for q in sl1:
						ans1 += q
					if check(ans1, n, 'abacaba') == 1:
						print('YES')
						print(ans1)
						t = 1
						break
				if t == 0:
					print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	ab = 'abacaba'
	flag = 0
	for i in range(n - 7 + 1):
		if s[i:i + 7] == ab:
			flag += 1
	if flag == 1:
		s = list(s)
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		print('Yes')
		print(''.join(s)[:-1])
	elif flag >= 2:
		print('No')
	else:
		al_flag = False
		s = list(s)[:-1]
		for i in range(n - 7 + 1):
			flags = True
			tar = s[i:i + 7]
			for j in range(7):
				if tar[j] == '?':
					continue
				elif tar[j] == ab[j]:
					continue
				else:
					flags = False
			if al_flag:
				for j in range(7):
					if s[i + j] == '?':
						s[i + j] = 'z'
			elif not al_flag and flags:
				import copy
				ss = copy.deepcopy(s)
				for j in range(7):
					if ss[i + j] == '?':
						ss[i + j] = ab[j]
				cnt = 0
				for j in range(n - 7 + 1):
					if ss[j:j + 7] == list(ab):
						cnt += 1
				if cnt == 1:
					al_flag = True
					for j in range(7):
						if s[i + j] == '?':
							s[i + j] = ab[j]
		if not al_flag:
			print('No')
		else:
			for j in range(n):
				if s[j] == '?':
					s[j] = 'z'
			cnt = 0
			for j in range(n - 7 + 1):
				if s[j:j + 7] == list(ab):
					cnt += 1
			if cnt == 1:
				print('Yes')
				print(''.join(s))
			else:
				print('No')


def count(S, t):
	ret = 0
	for i in range(len(S)):
		if S[i:i + len(t)] == t:
			ret += 1
	return ret

def match(aa, bb):
	if len(aa) != len(bb):
		return False
	for (a, b) in zip(aa, bb):
		if a == '?' or b == '?':
			continue
		if a != b:
			return False
	return True

def ok(S, i):
	t = 'abacaba'
	if not match(S[i:i + len(t)], t):
		return False
	S = list(S)
	S[i:i + len(t)] = list(t)
	S = ''.join(S)
	if count(S, t) == 1:
		return S
	return False

def ans(S):
	c = count(S, 'abacaba')
	if c == 1:
		print('Yes')
		print(S.replace('?', 'z'))
		return
	elif c > 1:
		print('No')
		return
	else:
		for i in range(len(S)):
			r = ok(S, i)
			if r:
				print('Yes')
				print(r.replace('?', 'z'))
				return
		print('No')
T = int(input())
for t in range(T):
	input()
	S = input()
	ans(S)


import sys
import itertools
import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
T = int(input())

def count(s):
	cnt = 0
	s = ''.join(s)
	for i in range(len(s)):
		if s[i:i + len(x)] == x:
			cnt += 1
	return cnt
x = 'abacaba'
for i in range(T):
	n = int(input())
	s = input()
	F = False
	for i in range(n - len(x) + 1):
		ss = list(s)
		ok = True
		for j in range(len(x)):
			if ss[i + j] != '?' and ss[i + j] != x[j]:
				ok = False
				break
			ss[i + j] = x[j]
		if ok and count(ss) == 1:
			for j in range(n):
				if ss[j] == '?':
					ss[j] = 'x'
			F = True
			print('YES')
			print(''.join(ss))
			break
	if not F:
		print('NO')


w = 'abacaba'
T = int(input())

def cal(s):
	ans = 0
	for i in range(len(s) - 6):
		flag = True
		for j in range(7):
			if s[i + j] != w[j]:
				flag = False
				break
		if flag:
			ans += 1
	return ans
while T != 0:
	T -= 1
	n = int(input())
	s = input()
	flag = False
	ans = ''
	cnt = cal(s)
	if cnt > 1:
		pass
	elif cnt == 1:
		flag = True
		ans = s.replace('?', 'e')
	elif '?' not in s:
		pass
	else:
		for i in range(n - 6):
			tmp = list(s)
			for j in range(7):
				if tmp[i + j] != w[j]:
					if tmp[i + j] == '?':
						tmp[i + j] = w[j]
					else:
						break
			tmp = ''.join(tmp)
			if cal(tmp) == 1:
				flag = True
				ans = tmp.replace('?', 'e')
				break
	print('YES' if flag else 'NO')
	if flag:
		print(ans)


needle = 'abacaba'

def occ(s):
	return sum((s[i:i + len(needle)] == needle for i in range(n)))
for _ in range(int(input())):
	n = int(input())
	S = input()
	c = occ(S)
	if c > 1:
		print('No')
	elif c == 1:
		print('Yes')
		print(S.replace('?', 'z'))
	else:
		for i in range(n - len(needle) + 1):
			sol = list(S[:i].replace('?', 'z'))
			for (j, c) in enumerate(needle):
				if S[i + j] in c + '?':
					sol.append(c)
				else:
					break
			else:
				sol.extend(S[i + len(needle):].replace('?', 'z'))
				sol = ''.join(sol)
				if occ(sol) == 1:
					print('Yes')
					print(sol)
					break
		else:
			print('No')


t = int(input())
for i in range(t):
	n = int(input())
	s = list(input())
	count_word = 0
	value = 'abacaba'
	words = []
	for j in range(n - 6):
		word = s[j:j + 7]
		words.append([j, word])
		if ''.join(word) == 'abacaba':
			count_word += 1
	flag = 0
	final = ''
	if count_word > 1:
		print('No')
	elif count_word == 1:
		for j in range(n):
			if s[j] == '?':
				final += 'x'
			else:
				final += s[j]
		print('Yes')
		print(final)
	else:
		for word in words:
			l = word[1]
			pos = word[0]
			broke = 0
			final = ''
			for j in range(7):
				if l[j] == value[j] or l[j] == '?':
					continue
				else:
					broke = 1
					break
			if broke == 0:
				flag = 1
				for j in range(pos):
					if s[j] == '?':
						final += 'x'
					else:
						final += s[j]
				final += value
				for j in range(pos + 7, n):
					if s[j] == '?':
						final += 'x'
					else:
						final += s[j]
				tot = 0
				for j in range(n - 6):
					val = final[j:j + 7]
					if ''.join(val) == 'abacaba':
						tot += 1
				if tot > 1:
					flag = 0
					continue
				else:
					break
		if flag == 0:
			print('No')
		else:
			print('Yes')
			print(final)


import sys

def chk(stt, itt, ntt):
	if (stt[itt] == 'a' or stt[itt] == '?') and (stt[itt + 1] == 'b' or stt[itt + 1] == '?') and (stt[itt + 2] == 'a' or stt[itt + 2] == '?'):
		if (stt[itt + 3] == 'c' or stt[itt + 3] == '?') and (stt[itt + 4] == 'a' or stt[itt + 4] == '?') and (stt[itt + 5] == 'b' or stt[itt + 5] == '?') and (stt[itt + 6] == 'a' or stt[itt + 6] == '?'):
			if itt + 9 < ntt:
				if stt[itt + 7] == 'c' and stt[itt + 8] == 'a' and (stt[itt + 9] == 'b') and (stt[itt + 10] == 'a'):
					return False
				elif itt + 12 < ntt:
					if stt[itt + 7] == 'b' and stt[itt + 8] == 'a' and (stt[itt + 9] == 'c') and (stt[itt + 10] == 'a') and (stt[itt + 11] == 'b') and (stt[itt + 12] == 'a'):
						return False
			if itt - 4 >= 0:
				if stt[itt - 1] == 'c' and stt[itt - 2] == 'a' and (stt[itt - 3] == 'b') and (stt[itt - 4] == 'a'):
					return False
				elif itt - 6 >= 0:
					if stt[itt - 1] == 'b' and stt[itt - 2] == 'a' and (stt[itt - 3] == 'c') and (stt[itt - 4] == 'a') and (stt[itt - 5] == 'b') and (stt[itt - 6] == 'a'):
						return False
			return True
	return False

def replace_main(lst):
	k = 0
	while k <= 6:
		if lst[k] == '?':
			if k % 2:
				if k == 3:
					lst[k] = 'c'
				else:
					lst[k] = 'b'
			else:
				lst[k] = 'a'
		k += 1
	return ''.join(lst)

def replace_z(p):
	if p == '?':
		return 'z'
	return p
t = int(input())
while t:
	t -= 1
	n = int(input())
	s = sys.stdin.readline().strip()
	x = s.count('abacaba')
	if x > 1 or s.count('abacabacaba') or s.count('abacababacaba'):
		print('No')
		continue
	elif x == 1:
		print('Yes')
		print(''.join(list(map(replace_z, s))))
	else:
		i = 0
		j = n - 5
		bul = False
		while i < j:
			bul = chk(s, i, n)
			if bul:
				print('Yes')
				ss = list(s[i:i + 7])
				ss = replace_main(ss)
				s1 = list(s[:i])
				s2 = list(s[i + 7:])
				s1 = ''.join(list(map(replace_z, s1)))
				s2 = ''.join(list(map(replace_z, s2)))
				print(s1 + ss + s2)
				break
			i += 1
		if not bul:
			print('No')


import re
r = re.compile('(?=abacaba)')

def ocount(s, t):
	return len(r.findall(s))

def solve(s, t):
	if ocount(s, t) == 1:
		return s.replace('?', 'x')
	if ocount(s, t) > 1:
		return None
	s = list(s)
	old_s = s[:]
	for i in range(0, len(s) - len(t) + 1):
		for j in range(0, len(t)):
			if s[i + j] == '?':
				s[i + j] = t[j]
		if ocount(''.join(s), t) == 1:
			return ''.join(s).replace('?', 'x')
		s = old_s[:]
t = 'abacaba'
q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	ans = solve(s, t)
	if ans:
		print('Yes', ans, sep='\n')
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase

def main():
	pattern = 'abacaba'
	for _ in range(int(input())):
		n = int(input())
		s = input()
		flag = False
		for i in range(n - 6):
			flag = True
			for j in range(7):
				if s[i + j] != '?' and s[i + j] != pattern[j]:
					flag = False
					break
			if not flag:
				continue
			ans = list(s[:i] + pattern + s[i + 7:])
			ans = ''.join(['z' if i == '?' else i for i in ans])
			cnt = 0
			for i in range(n - 6):
				if ans[i:i + 7] == pattern:
					cnt += 1
			if cnt == 1:
				print('Yes')
				print(ans)
				break
			flag = False
		if not flag:
			print('No')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')
main()


from math import *

def check_match(s, t, ind, start, end):
	for jj in range(start, end):
		if ind + jj > len(s) - 1:
			return False
		if s[ind + jj] != t[jj]:
			return False
	return True

def get_matches(s, t):
	matches = 0
	for i in range(0, len(s) - len(t) + 1):
		success = True
		for j in range(len(t)):
			if s[i + j] != t[j]:
				success = False
				break
		if success:
			matches += 1
	return matches
tests = int(input())
for t in range(tests):
	n = int(input())
	s = input()
	t = 'abacaba'
	matches = get_matches(s, t)
	if matches == 1:
		print('Yes')
		for i in range(len(s)):
			if s[i] == '?':
				print('x', end='')
			else:
				print(s[i], end='')
		print('')
		continue
	if matches > 1:
		print('No')
		continue
	matches = 0
	i = 0
	while i < len(s) - len(t) + 1:
		res = list(s)
		success = True
		for j in range(len(t)):
			if s[i + j] != '?' and s[i + j] != t[j]:
				success = False
				break
			if s[i + j] == '?':
				res[i + j] = t[j]
		if success:
			matches = get_matches(res, t)
			if matches == 1:
				break
		i += 1
	for i in range(len(s)):
		if res[i] == '?':
			res[i] = 'x'
	matches = get_matches(res, t)
	if matches == 1:
		print('Yes')
		for i in range(len(res)):
			print(res[i], end='')
		print('')
	else:
		print('No')


def solve():
	n = int(input())
	origin = input()
	find = 'abacaba'
	i = origin.find(find)
	if i != -1:
		origin = origin.replace('?', 'z')
	x = [i for i in origin]
	app = 0
	for i in range(n - 6):
		cmp = x[i:i + 7]
		for j in range(7):
			if cmp[j] == find[j]:
				continue
			elif cmp[j] == '?':
				if app == 0:
					cmp[j] = find[j]
				else:
					x[i + j] = 'z'
					break
			else:
				break
		else:
			(m, p) = (0, 0)
			old = x.copy()
			old[i:i + 7] = cmp
			test_s = ''.join(old)
			while m != -1 and p < 2:
				m = test_s.find(find, m)
				if m != -1:
					p += 1
					m += 1
			if p == 1:
				app += 1
				x = old
	if app == 1:
		print('YES')
		out = ''.join(x)
		out = out.replace('?', 'z')
		print(out)
	else:
		print('NO')
t = int(input())
for test in range(t):
	solve()


import sys
input = sys.stdin.readline

def check(strt, word, l):
	ind = 0
	co = 0
	for i in range(strt, len(word) + strt):
		if word[ind] == l[i] or l[i] == '?':
			co += 1
		ind += 1
	if co < len(word):
		return []
	else:
		temp = []
		same = 0
		ind = 0
		for i in range(strt, len(word) + strt):
			temp += [l[i]]
			l[i] = word[ind]
			ind += 1
		for i in range(len(l) - len(word) + 1):
			if l[i:i + len(word)] == word:
				same += 1
				if same == 2:
					break
		if same == 1:
			return l
		else:
			ind = 0
			for i in range(strt, len(word) + strt):
				l[i] = temp[ind]
				ind += 1
			return []
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(str, input().strip()))
	word = list(map(str, 'abacaba'.strip()))
	flag = 0
	for i in range(n + 1 - len(word)):
		if len(check(i, word, l)) > 0:
			flag = 1
			break
	if flag == 1:
		print('YES')
		for i in range(n):
			if l[i] == '?':
				l[i] = 'z'
		print(''.join(l))
	else:
		print('NO')


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from fractions import Fraction
INF = float('inf')
mod = int(1000000000.0) + 7
for t in range(int(data())):
	n = int(data())
	s = list(data())
	s1 = s[:]
	a = 'abacaba'
	cnt = 0
	for i in range(n - 6):
		flag = True
		for j in range(7):
			if s[i + j] == a[j]:
				continue
			flag = False
			break
		if flag == True:
			cnt += 1
	if cnt > 1:
		out('NO')
		continue
	elif cnt == 1:
		out('YES')
		for i in range(n):
			if s[i] == '?':
				s[i] = 'd'
		out(''.join(s))
		continue
	flag = False
	for i in range(n - 6):
		flag = True
		s1 = s[:]
		for j in range(7):
			if s[i + j] == a[j] or s[i + j] == '?':
				continue
			flag = False
			break
		if flag == True:
			for j in range(7):
				if s1[i + j] == '?':
					s1[i + j] = a[j]
			cnt = 0
			for i in range(n - 6):
				flag = True
				for j in range(7):
					if s1[i + j] == a[j]:
						continue
					flag = False
					break
				if flag == True:
					cnt += 1
			if cnt > 1:
				flag = False
			else:
				flag = True
				break
	if flag == False:
		out('NO')
	else:
		out('YES')
		for i in range(n):
			if s1[i] == '?':
				s1[i] = 'd'
		out(''.join(s1))


def check(s):
	n = len(s)
	ct = 0
	for i in range(n - 6):
		if ''.join(s[i:i + 7]) == 'abacaba':
			ct += 1
		if ct == 2:
			return False
	return ct == 1
t = int(input())
x = 'abacaba'
for _ in range(t):
	n = int(input())
	s = input().strip()
	ct = 0
	ans = []
	for i in range(n - 6):
		for j in range(7):
			if s[i + j] != x[j] and s[i + j] != '?':
				break
		else:
			ans.append(i)
	if not ans:
		print('No')
		continue
	for i in ans:
		ss = list(s)
		ct = 0
		for j in range(i, i + 7):
			ss[j] = x[ct]
			ct += 1
		if check(ss):
			print('Yes')
			print(''.join(ss).replace('?', 'z'))
			break
	else:
		print('No')


import re
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	sub = 'abacaba'
	res = [i for i in range(n) if s.startswith(sub, i)]
	if len(res) > 1:
		print('No')
		continue
	elif len(res) == 1:
		s = s.replace('?', 'x')
		print('Yes')
		print(s)
		continue
	else:
		man = 0
		for i in range(n - 6):
			news = s[i:i + 7]
			count = 0
			for k in range(7):
				if news[k] == '?' or news[k] == sub[k]:
					count += 1
			if count == 7:
				ret = s[:i] + sub + s[i + 7:]
				res = [i for i in range(n) if ret.startswith(sub, i)]
				if len(res) == 1:
					ret = ret.replace('?', 'x')
					print('Yes')
					print(ret)
					man = 1
					break
		if man == 0:
			print('No')


def kek(s):
	c = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == 'abacaba':
			c += 1
	return c
t = int(input())
gg = 'abacaba'
for tt in range(t):
	n = int(input())
	s = input()
	if kek(s) > 1:
		print('No')
		continue
	elif kek(s) == 1:
		print('Yes')
		print(s.replace('?', 'z'))
		continue
	for i in range(n - 6):
		good = True
		for j in range(7):
			good = good and (s[i + j] == '?' or s[i + j] == gg[j])
		if good:
			t = (s[:i] + 'abacaba' + s[i + 7:]).replace('?', 'z')
			if kek(t) == 1:
				print('Yes')
				print(t)
				break
	else:
		print('No')


import os
from io import BytesIO, IOBase
import sys
ab = 'abacaba'

def check(s, allow=True):
	n = len(s)
	for i in range(n - 6):
		t = True
		s2 = s[i:i + 7]
		for j in range(7):
			if s2[j] == ab[j] or (allow and s2[j] == '?'):
				pass
			else:
				t = False
				break
		if t:
			return True
	return False

def main():

	def f(s):
		t = ''
		for i in range(len(s)):
			if s[i] == '?':
				t += 'z'
			else:
				t += s[i]
		return t
	for _ in range(int(input())):
		n = int(input())
		s = input()
		flag = False
		for i in range(n - 6):
			if check(s[i:i + 7]):
				(t1, t2) = (False, False)
				if i - 4 < 0:
					t1 = True
				else:
					t1 = not check(s[:i] + 'aba', False)
					pass
				if i + 10 >= n:
					t2 = True
				else:
					t2 = not check('aba' + s[i + 7:], False)
					pass
				if t1 and t2:
					flag = True
					print('Yes')
					print(f(s[:i]) + ab + f(s[i + 7:]))
					break
		if not flag:
			print('No')
	return
BUFSIZE = 1048576

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


import copy
for test in range(int(input())):
	n = int(input())
	s = input()
	tt = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == 'abacaba':
			tt += 1
	ss = []
	for i in s:
		ss.append(i)
	s = ss
	if tt > 1:
		print('NO')
	elif tt == 1:
		for j in range(len(s)):
			if s[j] == '?':
				s[j] = 'z'
		s = ''.join(s)
		print('YES')
		print(s)
	else:
		counter = 0
		for i in range(len(s) - 6):
			if (s[i] == 'a' or s[i] == '?') and (s[i + 1] == 'b' or s[i + 1] == '?') and (s[i + 2] == 'a' or s[i + 2] == '?') and (s[i + 3] == 'c' or s[i + 3] == '?') and (s[i + 4] == 'a' or s[i + 4] == '?') and (s[i + 5] == 'b' or s[i + 5] == '?') and (s[i + 6] == 'a' or s[i + 6] == '?'):
				temp = copy.deepcopy(s)
				s[i] = 'a'
				s[i + 1] = 'b'
				s[i + 2] = 'a'
				s[i + 3] = 'c'
				s[i + 4] = 'a'
				s[i + 5] = 'b'
				s[i + 6] = 'a'
				for j in range(len(s)):
					if s[j] == '?':
						s[j] = 'z'
				s = ''.join(s)
				tt = 0
				for j in range(len(s) - 6):
					if s[j:j + 7] == 'abacaba':
						tt += 1
				if tt == 1:
					print('YES')
					print(s)
					counter = 1
					break
				else:
					s = copy.deepcopy(temp)
		if counter == 0:
			print('NO')


from collections import deque, defaultdict
from heapq import heapify, heappop, heappush
it = lambda : list(map(int, input().strip().split()))

def solve():
	p = 'abacaba'
	n = int(input())
	s = input().strip()
	cnt = 0
	for i in range(n):
		if i + 7 <= n:
			if s[i:i + 7] == p:
				cnt += 1
	if cnt > 1:
		return False
	if cnt == 1:
		return s.replace('?', 'z')
	s = list(s)
	for i in range(n):
		if i + 7 <= n:
			ok = True
			for j in range(i, i + 7):
				if s[j] == p[j - i] or s[j] == '?':
					continue
				else:
					ok = False
					break
			if ok:
				idx = []
				for j in range(i, i + 7):
					if s[j] == '?':
						s[j] = p[j - i]
						idx.append(j)
				ok1 = True
				for j in range(max(0, i - 8), i + 7):
					if j != i:
						if j + 7 <= n and ''.join(s[j:j + 7]) == p:
							ok1 = False
							break
				if not ok1:
					for k in idx:
						s[k] = '?'
				else:
					return ''.join(s).replace('?', 'z')
	return False
T = int(input())
for _ in range(T):
	a = solve()
	if a is False:
		print('NO')
	else:
		print('YES')
		print(a)


import re
t = 'abacaba'
p = '(?<!abac)(?<!abacab)' + ''.join((f'({x}|\\?)' for x in t)) + '(?!caba)(?!bacaba)'
for s in [*open(0)][2::2]:
	s = t in s and s or re.sub(p, t, s, 1)
	print(('NO', 'YES ' + s.replace('?', 'd'))[s.find(t) == s.rfind(t) >= 0])


import sys, heapq as h
input = sys.stdin.readline

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input().strip()

def listStr():
	return list(input().strip())
import collections as col
import math
import re

def get_defs(S, targ, N, LT):
	possible = []
	definite = set()
	x = S[:LT]
	for i in range(N - LT + 1):
		if i > 0:
			x = x[1:] + S[i + LT - 1]
		if x == 'abacaba':
			definite.add(i)
			continue
		flag = True
		for j in range(LT):
			if x[j] not in (targ[j], '?'):
				flag = False
				break
		if flag:
			possible.append(i)
	return (possible, definite)

def newstr(S, x, targ, N):
	S = S[:x] + targ + S[x + 7:]
	S = list(S)
	for j in range(N):
		if S[j] == '?':
			S[j] = 'd'
	return ''.join(S)

def solve():
	N = getInt()
	S = getStr()
	targ = 'abacaba'
	LT = len(targ)
	(possible, defs) = get_defs(S, targ, N, LT)
	D = len(defs)
	if D > 1:
		print('No')
		return
	if D == 1:
		print('Yes')
		x = next(iter(defs))
		print(newstr(S, x, targ, N))
		return
	LP = len(possible)
	for i in range(LP):
		p = possible[i]
		(P, defs) = get_defs(S[:p] + targ + S[p + 7:], targ, N, LT)
		D = len(defs)
		if D == 1:
			print('Yes')
			x = next(iter(defs))
			print(newstr(S, x, targ, N))
			return
	print('No')
	return
for _ in range(getInt()):
	solve()


def check(s, ori):
	cnt = 0
	for i in range(len(s)):
		if ori[i] != '?' and s[i] != ori[i]:
			return False
		if i + 7 <= len(s):
			tmp = s[i:i + 7]
			if tmp == 'abacaba':
				cnt += 1
	if cnt == 1:
		return True
	return False

def match(s):
	mode = 'abacaba'
	for i in range(7):
		if s[i] != '?' and s[i] != mode[i]:
			return False
	return True
t = int(input())
for _ in range(t):
	l = int(input())
	s = input()
	tmp = s
	flag = 0
	for i in range(l - 6):
		if match(s[i:i + 7]):
			tmp = s[:i] + 'abacaba' + s[i + 7:]
			tmp = tmp.replace('?', 'f')
			if check(tmp, s):
				print('Yes', tmp, sep='\n')
				flag = 1
				break
	if flag == 0:
		print('No')


import sys

def chk(stt, itt, ntt):
	if (stt[itt] == 'a' or stt[itt] == '?') and (stt[itt + 1] == 'b' or stt[itt + 1] == '?') and (stt[itt + 2] == 'a' or stt[itt + 2] == '?'):
		if (stt[itt + 3] == 'c' or stt[itt + 3] == '?') and (stt[itt + 4] == 'a' or stt[itt + 4] == '?') and (stt[itt + 5] == 'b' or stt[itt + 5] == '?') and (stt[itt + 6] == 'a' or stt[itt + 6] == '?'):
			if itt + 10 < ntt:
				if stt[itt + 7:itt + 11] == 'caba':
					return False
				elif itt + 12 < ntt:
					if stt[itt + 7:itt + 13] == 'bacaba':
						return False
			if itt - 4 >= 0:
				if stt[itt - 4:itt] == 'abac':
					return False
				elif itt - 6 >= 0:
					if stt[itt - 6:itt] == 'abacab':
						return False
			return True
	return False

def replace_z(p):
	if p == '?':
		return 'z'
	return p
t = int(input())
while t:
	t -= 1
	n = int(input())
	s = sys.stdin.readline().strip()
	x = s.count('abacaba')
	if x > 1 or s.count('abacabacaba') or s.count('abacababacaba'):
		print('No')
		continue
	elif x == 1:
		print('Yes')
		print(''.join(list(map(replace_z, s))))
	else:
		i = 0
		j = n - 5
		bul = False
		while i < j:
			bul = chk(s, i, n)
			if bul:
				print('Yes')
				s1 = list(s[:i])
				s2 = list(s[i + 7:])
				s1 = ''.join(list(map(replace_z, s1)))
				s2 = ''.join(list(map(replace_z, s2)))
				print(s1 + 'abacaba' + s2)
				break
			i += 1
		if not bul:
			print('No')


def iin():
	return int(input())

def lin():
	return list(map(int, input().split()))

def main():
	T = iin()
	for _ in range(T):
		n = iin()
		a = list(input())
		t = 'abacaba'
		a1 = [0] * n
		ch = 0
		for i in range(n - 6):
			ch1 = 0
			for j in range(7):
				if a[i + j] != t[j]:
					if a[i + j] == '?':
						ch1 = 1
						continue
					break
			else:
				a1[i] = 1
				if ch1 == 0:
					ch += 1
		if ch > 1:
			print('No')
		else:
			if ch == 1:
				pass
			else:
				for i in range(n - 6):
					if a1[i]:
						if i - 4 >= 0:
							if a1[i - 4]:
								for j in range(i - 4, i):
									if a[j] == '?':
										break
								else:
									continue
						if i + 4 < n:
							if a1[i + 4]:
								for j in range(i + 7, i + 11):
									if a[j] == '?':
										break
								else:
									continue
						for j in range(7):
							if a[i + j] == '?':
								a[i + j] = t[j]
						break
			for i in range(n):
				if a[i] == '?':
					a[i] = 'z'
			ch = 0
			for i in range(n - 6):
				for j in range(7):
					if a[i + j] != t[j]:
						break
				else:
					ch += 1
			if ch == 1:
				print('Yes')
				print(''.join(a))
			else:
				print('No')
main()


t = int(input())

def fun(n, a):
	test = 'abacaba'
	test = list(test)
	flag = 0
	a = list(a)
	for i in range(n):
		if a[i:i + 7] == test:
			flag += 1
	if flag > 1:
		print('No')
	elif flag == 1:
		if a.count('?') == 0:
			print('Yes')
			print(''.join(a))
		else:
			for i in range(n):
				if a[i] == '?':
					a[i] = 'z'
			print('Yes')
			print(''.join(a))
	else:
		flag = 0
		for i in range(n - 6):
			if a[i:i + 7].count('?') != 0:
				b = a.copy()
				for j in range(7):
					if b[i + j] == '?':
						b[i + j] = test[j]
				cou = 0
				for j in range(n):
					if b[j:j + 7] == test:
						cou += 1
				if cou == 1:
					flag += 1
					a = b
					break
			if flag:
				break
		if flag:
			print('Yes')
			for i in range(n):
				if a[i] == '?':
					a[i] = 'z'
			print(''.join(a))
		else:
			print('No')
while t:
	t -= 1
	n = int(input())
	a = input()
	fun(n, a)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))
ceil = lambda x: int(x) if x == int(x) else int(x) + 1
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdarr = lambda : map(int, stdstr().split())
mod = 1000000007
checkstr = 'abacaba'

def my_count(string, substring):
	string_size = len(string)
	substring_size = len(substring)
	count = 0
	for i in range(0, string_size - substring_size + 1):
		if string[i:i + substring_size] == substring:
			count += 1
	return count
for _ in range(stdint()):
	n = stdint()
	s = input()
	l = list(s)
	if checkstr in s:
		c = my_count(s, checkstr)
		if c == 1:
			print('Yes')
			if '?' in s:
				print(s.replace('?', 'd'))
			else:
				print(s)
		else:
			print('No')
	else:
		flag = 0
		for i in range(n - 6):
			c = []
			for j in range(7):
				if l[i + j] == '?':
					c.append(checkstr[j])
				else:
					c.append(l[i + j])
			x = ''
			if x.join(c) == checkstr:
				c = l[:i + j - 6] + c + l[i + j + 1:]
				x = x.join(c)
				count = my_count(x, checkstr)
				if count == 1:
					flag = 1
					print('Yes')
					if '?' in x:
						print(x.replace('?', 'd'))
					else:
						print(x)
					break
				else:
					x.replace('?', 'd')
		if flag == 0:
			print('No')


def f(s):
	t = 'abacaba'
	for i in range(7):
		if s[i] != '?' and t[i] != s[i]:
			return False
	return True

def g(s):
	c = 0
	for i in range(7, len(s) + 1):
		if s[i - 7:i] == 'abacaba':
			c += 1
	return c
for _ in range(int(input())):
	n = int(input())
	s = input()
	if g(s) > 1:
		print('No')
		continue
	if 'abacaba' in s:
		print('Yes')
		print(s.replace('?', 'z'))
		continue
	flag = False
	for i in range(7, len(s) + 1):
		if f(s[i - 7:i]):
			t = (s[:i - 7] + 'abacaba' + s[i:]).replace('?', 'z')
			if g(t) > 1:
				continue
			print('Yes')
			print(t)
			flag = True
			break
	if not flag:
		print('No')


def f(a, b):
	for (x, y) in zip(a, b):
		if x != '?' and x != y:
			return False
	else:
		return True
e = 'abacaba'

def g(a):
	c = 0
	for i in range(len(a) - 7 + 1):
		if a[i:i + 7] == 'abacaba':
			c += 1
	return c == 1
for _ in range(int(input())):
	n = int(input())
	s = input()
	r = list(s)
	i = 0
	c = 0
	while n - i > 6:
		if s[i:i + 7] == e:
			c += 1
		i += 1
	if c > 1:
		print('NO')
	elif c == 1:
		print('YES')
		for (i, x) in enumerate(r):
			if x == '?':
				r[i] = 'z'
		print(''.join(r))
	else:
		i = 0
		while n - i > 6:
			if f(s[i:i + 7], e):
				r = list(s)
				for j in range(n):
					if i <= j < i + 7:
						if r[j] == '?':
							r[j] = e[j - i]
					elif r[j] == '?':
						r[j] = 'z'
				if g(''.join(r)):
					print('YES')
					print(''.join(r))
					break
			i += 1
		else:
			print('NO')


from collections import defaultdict as dd
import sys
input = sys.stdin.readline
t = int(input())
while t:
	n = int(input())
	s = input().split()[0]
	res = ''
	ss = 'abacaba'
	flag = 0
	for i in range(n):
		lol = 0
		si = list(s.strip())
		for j in range(7):
			if i + j < n and (si[i + j] == ss[j] or si[i + j] == '?'):
				si[i + j] = ss[j]
				continue
			else:
				lol = 1
				break
		if lol == 0:
			cou = 0
			for ii in range(0, n):
				lo = 0
				for j in range(7):
					if ii + j == n or si[ii + j] != ss[j]:
						lo = 1
						break
				if lo == 0:
					cou += 1
			if cou == 1:
				print('Yes')
				for i in range(n):
					if si[i] == '?':
						si[i] = 'z'
				print(''.join(si))
				flag = 1
				break
	if flag == 0:
		print('NO')
	t -= 1


import sys
import re

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def solve():
	n = mint()
	s = minp()
	r = re.compile('^[?a][?b][?a][?c][?a][?b][?a]')
	c = [[], []]
	for i in range(n - 6):
		ss = s[i:i + 7]
		if r.match(ss):
			hm = s[:i] + 'abacaba' + s[i + 7:]
			p = 0
			c = 0
			while True:
				p = hm.find('abacaba', p)
				if p == -1:
					break
				c += 1
				p += 1
			if c == 1:
				print('Yes')
				print(hm.replace('?', 'd'))
				return
	print('No')
for i in range(mint()):
	solve()


for _ in range(int(input())):
	n = int(input())
	s = input()
	t = 'abacaba'
	c = 0
	for i in range(n - 6):
		if t == s[i:i + 7]:
			c += 1
	if c > 1:
		print('NO')
	elif c == 1:
		s = list(s)
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		s = ''.join(s)
		print('YES')
		print(s)
	else:
		valid = False
		for i in range(n - 6):
			temp = s[i:i + 7]
			match = True
			for j in range(7):
				if t[j] != temp[j] and temp[j] != '?':
					match = False
					break
			if match:
				if t in t[1:] + s[i + 7:] or t in s[:i] + t[:6]:
					s = list(s)
					for k in range(i, i + 7):
						if s[k] == '?':
							s[k] = 'z'
							break
					s = ''.join(s)
				else:
					valid = True
					sol = s[:i] + t + s[i + 7:]
					break
		if valid:
			sol = list(sol)
			for i in range(n):
				if sol[i] == '?':
					sol[i] = 'z'
			sol = ''.join(sol)
			print('YES')
			print(sol)
		else:
			print('NO')


import sys, copy

def check(sub):
	cnt = 0
	for i in range(len(sub) - 6):
		temp = sub[i:i + 7]
		if temp == base:
			cnt += 1
	return cnt
tc = int(sys.stdin.readline())
for _ in range(tc):
	n = int(sys.stdin.readline())
	s = list(sys.stdin.readline().rstrip())
	base = list('abacaba')
	possible = False
	for i in range(n - 6):
		now = copy.deepcopy(s)
		can = True
		for j in range(7):
			if now[i + j] != '?' and now[i + j] != base[j]:
				can = False
				break
			now[i + j] = base[j]
		if can and check(now) == 1:
			for j in range(n):
				if now[j] == '?':
					now[j] = 'z'
			possible = True
			print('YES')
			print(''.join(now))
			break
	if not possible:
		print('NO')


import re
t = 'abacaba'
for s in [*open(0)][2::2]:
	i = s.find(t) + 1
	if i:
		f = s.rfind(t) < i
	else:
		(s, f) = re.subn('(?<!abac)(?<!abacab)' + ''.join((f'({x}|\\?)' for x in t)) + '(?!caba)(?!bacaba)', t, s, 1)
	print(*(['NO'], ['YES', s.replace('?', 'd')])[f])


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from collections import Counter as cc
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys

def solve(flag):
	i = 0
	while i < n:
		if s[i] == 'a':
			j = i + 7
			z = s[i:j]
			if z == k:
				flag += 1
		i += 1
	return flag
t = int(input())
for _ in range(t):
	n = int(input())
	s = list(input())
	k = list('abacaba')
	i = 0
	flag = 0
	flag = solve(flag)
	if flag == 1:
		print('YES')
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		print(''.join(s))
	elif flag > 1:
		print('NO')
	else:
		i = 0
		flag = 0
		while i < n:
			if s[i] == 'a' or s[i] == '?':
				j = i + 7
				if flag == 0:
					cnt = 0
					seti = set()
					for x in range(i, min(j, n)):
						if s[x] == k[cnt]:
							cnt += 1
							continue
						elif s[x] == '?':
							s[x] = k[cnt]
							seti.add(x)
							cnt += 1
						else:
							break
					z = s[i:j]
					z1 = solve(0)
					if z1 == 1:
						flag += 1
					else:
						for x in seti:
							s[x] = '?'
				else:
					for x in range(i, min(j, n)):
						if s[x] == '?':
							s[x] = 'z'
			i += 1
		if flag == 1:
			flag = solve(0)
			if flag == 1:
				for i in range(n):
					if s[i] == '?':
						s[i] = 'z'
				print('YES')
				print(''.join(s))
			else:
				print('NO')
		else:
			print('NO')


import sys
t = int(sys.stdin.readline())

def check(l):
	n = len(s)
	cnt = 0
	comp = 'abacaba'
	z = 0
	for i in range(n - 6):
		z = 0
		for j in range(7):
			if s[i + j] == comp[j]:
				z += 1
		if z == 7:
			cnt += 1
	if cnt == 1:
		return True
	return False
comp = 'abacaba'
for _ in range(t):
	n = int(sys.stdin.readline())
	s = list(sys.stdin.readline()[:-1])
	z = False
	for i in range(n - 6):
		cur = i
		cnt = 0
		rem = [0 for x in range(7)]
		for j in range(7):
			if s[cur] == comp[j] or s[cur] == '?':
				rem[cnt] = s[cur]
				s[cur] = comp[j]
				cur += 1
				cnt += 1
			else:
				rem[cnt] = s[cur]
				cnt += 1
				cur += 1
		if check(s):
			z = True
			for k in range(n):
				if s[k] == '?':
					s[k] = 'z'
			break
		else:
			cur = i
			for j in range(7):
				s[cur] = rem[j]
				cur += 1
	if z:
		print('YES')
		print(''.join((x for x in s)))
	else:
		print('NO')


import sys
from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))
t = ri()
for _ in range(t):
	mot = 'abacaba'
	n = ri()
	s = input()
	possible = []
	for i in range(n - 6):
		test = True
		for j in range(7):
			if s[i + j] != mot[j] and s[i + j] != '?':
				test = False
		if test == True:
			possible.append(i)
	ans = 'No'
	solution = ''
	for i in possible:
		new = [x for x in s]
		for j in range(7):
			new[i + j] = mot[j]
		for z in range(len(new)):
			if new[z] == '?':
				new[z] = 'd'
		new_s = ''.join(new)
		possible = 0
		for i in range(n - 6):
			test = True
			for j in range(7):
				if new_s[i + j] != mot[j]:
					test = False
			if test == True:
				possible += 1
		if possible == 1:
			ans = 'Yes'
			solution = new_s
	if ans == 'No':
		print('No')
	else:
		print('Yes')
		print(solution)


def solve(s):
	i = s.find('abacaba')
	if i != -1:
		j = s.find('abacaba', i + 1)
		if j == -1:
			news = ''
			for ch in s:
				if ch == '?':
					news += 'd'
				else:
					news += ch
			return ['Yes', news]
		else:
			return ['No']
	elif '?' in s:
		for i in range(n - 6):
			string = ''
			for j in range(7):
				if s[i + j] == 'abacaba'[j] or s[i + j] == '?':
					string += 'abacaba'[j]
				else:
					break
			if string == 'abacaba':
				news = ''
				for ch in s[:i]:
					if ch == '?':
						news += 'd'
					else:
						news += ch
				news += string
				if i + 7 < len(s):
					for ch in s[i + 7:]:
						if ch == '?':
							news += 'd'
						else:
							news += ch
				if valid(news):
					return ['Yes', news]
		return ['No']
	else:
		return ['No']

def valid(string):
	i = string.find('abacaba')
	if i != -1:
		j = string.find('abacaba', i + 1)
		return j == -1
	else:
		return False
T = int(input())
for x in range(T):
	n = int(input())
	s = input()
	results = solve(s)
	for r in results:
		print(r)


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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 value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
key = 'abacaba'
for _ in range(Int()):
	n = Int()
	s = input()
	c = 0
	for i in range(n):
		if s[i] == 'a' and s[i:i + 7] == key:
			c += 1
	if c == 1:
		print('YES')
		for i in s:
			if i == '?':
				print('z', end='')
			else:
				print(i, end='')
		print()
	elif c > 1:
		print('NO')
	else:
		found = -1
		i = 0
		while i < n:
			st = i
			j = 0
			while st < n and j < 7 and (s[st] == key[j] or s[st] == '?'):
				st += 1
				j += 1
			if j == 7 and s[st:st + 7] != key and (s[st:st + 4] != 'caba') and (i - 4 < 0 or s[i - 4:i] != 'abac'):
				found = st - 7
				break
			i += 1
		if found == -1:
			print('NO')
		else:
			print('YES')
			i = 0
			while i < found:
				if s[i] == '?':
					print('z', end='')
				else:
					print(s[i], end='')
				i += 1
			print(key, end='')
			i += 7
			while i < n:
				if s[i] == '?':
					print('z', end='')
				else:
					print(s[i], end='')
				i += 1
			print()


import re
t = 'abacaba'
for s in [*open(0)][2::2]:
	i = 0
	f = 1
	while 1:
		(q, f) = re.subn(''.join((f'({x}|\\?)' for x in t)), t, s[i:], 1)
		q = s[:i] + q
		i += 1
		if f < 1 or q.find(t) == q.rfind(t):
			break
	print(*(['NO'], ['YES', q.replace('?', 'd')])[f])


import os
import sys
from io import BytesIO, IOBase

def matchcount(s, pat):
	count = 0
	for i in range(len(s) - len(pat) + 1):
		if s[i:i + 7] == pat:
			count += 1
	return count

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		s = list(input())
		pat = 'abacaba'
		string = ''.join(s)
		matches = matchcount(string, pat)
		if matches == 1:
			string = string.replace('?', 'd')
			print('Yes')
			print(string)
		elif matches > 1:
			print('No')
		elif matches == 0:
			possible = []
			for i in range(n - 6):
				count = 0
				for j in range(7):
					if s[i + j] == '?':
						count += 1
					elif s[i + j] == pat[j]:
						count += 1
					else:
						break
				if count == 7:
					possible.append(i)
			found = 0
			for i in possible:
				t = s.copy()
				for j in range(7):
					t[i + j] = pat[j]
				string = ''.join(t)
				string = string.replace('?', 'd')
				matches = matchcount(string, pat)
				if matches == 1:
					print('Yes')
					print(string)
					found = 1
					break
				else:
					continue
			if not found:
				print('No')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')
main()


from sys import stdin
input = stdin.readline
a = 'abacaba'

def count(s):
	cnt = 0
	for i in range(len(s) - len(a) + 1):
		if s[i:i + len(a)] == a:
			cnt += 1
	return cnt
for _ in range(int(input())):
	n = int(input())
	s = input()
	for i in range(n - len(a) + 1):
		s2 = list(s)
		for j in range(i, i + len(a)):
			s2[j] = a[j - i]
			if s[j] != '?' and a[j - i] != s[j]:
				break
		else:
			if count(''.join(s2)) < 2:
				print('Yes')
				print(''.join(('z' if j == '?' else j for j in s2)))
				break
	else:
		print('No')


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
T = 'abacaba'
M = len(T)

def check1(S):
	for i in range(M):
		if S[i] != T[i]:
			return False
	return True

def check2(S):
	for i in range(M):
		if S[i] != '?' and S[i] != T[i]:
			return False
	return True
for _ in range(INT()):
	N = INT()
	S = input()
	cnt = 0
	ans = ''
	idx = -1
	for i in range(N - M + 1):
		if check1(S[i:i + M]):
			cnt += 1
			idx = i
	if cnt >= 2:
		No()
		continue
	elif cnt == 1:
		Yes()
		ans = S[:idx] + T + S[idx + M:]
		ans = ans.replace('?', 'x')
		print(ans)
		continue
	idx = -1
	ok = False
	for i in range(N - M + 1):
		if check2(S[i:i + M]):
			idx = i
			ans = S[:idx] + T + S[idx + M:]
			ans = ans.replace('?', 'x')
			cnt = 0
			for i in range(N - M + 1):
				if check1(ans[i:i + M]):
					cnt += 1
			if cnt >= 2:
				continue
			elif cnt == 1:
				ok = True
				break
			else:
				raise Exception
	if ok:
		Yes()
		print(ans)
	else:
		No()


tar = 'abacaba'

def cot(s):
	ct = 0
	z = list(s)
	for n in range(len(z) - 6):
		if z[n:n + 7] == list(tar):
			ct += 1
	return ct

def solv():
	x = int(input())
	s = input()
	ct = cot(s)
	if ct > 1:
		print('No')
		return
	if ct == 1:
		j = list(s)
		print('Yes')
		for n in range(x):
			if j[n] == '?':
				j[n] = 'z'
			print(j[n], end='')
		print()
		return
	n = 0
	s = list(s)
	while n <= x - 7:
		z = s.copy()
		for k in range(n, n + 7):
			if z[k] not in 'abc?':
				break
			if z[k] != '?' and z[k] != tar[k - n]:
				break
			if z[k] == '?':
				z[k] = tar[k - n]
			if cot(z) == 1:
				print('Yes')
				for n in range(x):
					if z[n] == '?':
						z[n] = 'z'
					print(z[n], end='')
				print()
				return
		n += 1
	print('No')
for _ in range(int(input())):
	solv()


import time, math as mt, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def readTree():
	v = int(input())
	adj = [set() for i in range(v + 1)]
	for i in range(v - 1):
		(u1, u2) = In()
		adj[u1].add(u2)
		adj[u2].add(u1)
	return (adj, v)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return
mod = 10 ** 9 + 7

def check(s, i):
	n = ''
	if s[i + 0] != 'a' and s[i + 0] != '?':
		return (False, -1)
	else:
		n += 'a'
	if s[i + 1] != 'b' and s[i + 1] != '?':
		return (False, -1)
	else:
		n += 'b'
	if s[i + 2] != 'a' and s[i + 2] != '?':
		return (False, -1)
	else:
		n += 'a'
	if s[i + 3] != 'c' and s[i + 3] != '?':
		return (False, -1)
	else:
		n += 'c'
	if s[i + 4] != 'a' and s[i + 4] != '?':
		return (False, -1)
	else:
		n += 'a'
	if s[i + 5] != 'b' and s[i + 5] != '?':
		return (False, -1)
	else:
		n += 'b'
	if s[i + 6] != 'a' and s[i + 6] != '?':
		return (False, -1)
	else:
		n += 'a'
	return (True, n)

def solve():
	n = II()
	s = input()
	if 'abacaba' in s:
		cnt = 0
		for i in range(n - 6):
			if s[i:i + 7] == 'abacaba':
				cnt += 1
		if cnt > 1:
			print('NO')
			return
		new = ''
		for i in range(n):
			if s[i] == '?':
				new += 'z'
			else:
				new += s[i]
		print('YES')
		print(new)
		return
	else:
		done = False
		for i in range(n - 6):
			(stm, ne) = check(s, i)
			if stm == True:
				new = s[:i] + ne + s[i + 7:]
				fin = ''
				for i in range(n):
					if new[i] == '?':
						fin += 'z'
					else:
						fin += new[i]
				cnt = 0
				for i in range(n - 6):
					if fin[i:i + 7] == 'abacaba':
						cnt += 1
				if cnt == 1:
					done = True
					print('YES')
					print(fin)
					return
		if done == False:
			print('NO')
			return
t = II()
for i in range(t):
	solve()


def checkA(t, k):
	for i in range(len(t)):
		if t[i] != k[i] and t[i] != '?':
			return False
	return True

def countA(s):
	c = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == 'abacaba':
			c += 1
	return c
m = int(input())
for l in range(m):
	n = int(input())
	s = input()
	if len(s) < 7:
		print('NO')
		break
	k = 'abacaba'
	c = 0
	d = 0
	ar = []
	for i in range(len(s) - 6):
		t = s[i:i + 7]
		if t == k:
			c += 1
		elif checkA(t, k):
			d += 1
			ar.append(i)
	if c > 1:
		print('NO')
	elif c == 1:
		print('YES')
		while '?' in s:
			ind = s.index('?')
			s = s[:ind] + 'z' + s[ind + 1:]
		print(s)
	elif d == 0:
		print('NO')
	else:
		check = True
		for i in ar:
			t = s[:i] + 'abacaba' + s[i + 7:]
			if countA(t) == 1:
				print('YES')
				while '?' in t:
					ind = t.index('?')
					t = t[:ind] + 'z' + t[ind + 1:]
				print(t)
				check = False
				break
		if check:
			print('NO')


def checkQ(ss):
	req = 'abacaba'
	for (a, b) in zip(req, ss):
		if b == a or b == '?':
			continue
		else:
			return False
	return True
for _ in range(int(input())):
	n = int(input())
	ss = input().strip()
	if 'abacaba' in ss:
		ass = ss.replace('?', 'z')
		arr = []
		for i in range(n - 6):
			arr.append(ass[i:i + 7])
		if arr.count('abacaba') == 1:
			print('YES')
			print(ass)
		else:
			print('NO')
		continue
	else:
		i = 3
		done = False
		ans = ''
		while i < n - 2:
			bc = i - 3
			ft = i + 3
			bad = False
			if bc >= 0 and ft < n:
				if checkQ(ss[i - 3:i + 4]):
					if i - 7 >= 0 and ss[i - 7:i - 3] == 'abac':
						bad = True
					else:
						ans = ss[:i - 3]
					if i + 7 < n and ss[i + 4:i + 8] == 'caba':
						bad = True
					else:
						ans += 'abacaba' + ss[i + 4:]
					if not bad:
						if ans == '':
							ans = 'abacaba'
						done = True
						break
					else:
						ans = ''
			i += 1
		if done:
			ans = ans.replace('?', 'z')
			print('YES')
			print(ans)
		else:
			print('NO')


def times(s):
	result = 0
	l = 0
	for r in range(6, len(s)):
		if s[l:r + 1] == target:
			result += 1
		l += 1
	return result

def clean(s):
	for i in range(len(s)):
		if s[i] == '?':
			s[i] = 'z'
	return ''.join(s)
t = int(input())
target = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
for _ in range(t):
	n = int(input())
	s = list(input())
	l = 0
	found = False
	t = times(s)
	if t > 1:
		print('No')
	elif t == 1:
		print('Yes')
		print(clean(s))
	else:
		done = False
		for r in range(6, n):
			index = 0
			newS = s.copy()
			for i in range(l, r + 1):
				if target[index] != newS[i] and newS[i] != '?':
					break
				elif newS[i] != target[index] and newS[i] == '?':
					newS[i] = target[index]
				index += 1
			else:
				found = True
			if found and times(newS) == 1:
				print('Yes')
				print(clean(newS))
				done = True
				break
			l += 1
		if not done:
			print('No')


target = 'abacaba'

def count(s):
	c = 0
	for i in range(len(s) - len(target) + 1):
		c += s[i:i + len(target)] == target
	return c

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		s = input()
		c = count(s)
		if c == 0:
			for i in range(len(s) - len(target) + 1):
				if all((i == '?' or i == j for (i, j) in zip(s[i:i + len(target)], target))):
					temp = s[:i] + target + s[i + len(target):]
					if count(temp) == 1:
						print('YES')
						print(temp.replace('?', 'z'))
						break
			else:
				print('NO')
		elif c == 1:
			print('YES')
			print(s.replace('?', 'z'))
		else:
			print('NO')
main()


import sys
input = sys.stdin.readline
t = int(input())

def CountOccurrences(string, substring):
	count = 0
	start = 0
	while start < len(string):
		pos = string.find(substring, start)
		if pos != -1:
			start = pos + 1
			count += 1
		else:
			break
	return count
for r in range(t):
	n = int(input())
	s = input().strip('\n')
	l = []
	for i in s:
		l.append(i)
	x = 'abacaba'
	lenx = len(x)
	length = n - len(x) + 1
	counter = CountOccurrences(s, x)
	if counter == 1:
		for i in range(n):
			if l[i] == '?':
				l[i] = 'z'
		print('Yes')
		for i in l:
			print(i, end='')
		print()
	else:
		flag = False
		for i in range(length):
			count = 0
			tempFlag = True
			for j in range(i, i + lenx):
				if l[j] != x[count] and l[j] != '?':
					tempFlag = False
					break
				count += 1
			if tempFlag == True:
				cc = 0
				ll = []
				for j in l:
					ll.append(j)
				for j in range(i, i + lenx):
					ll[j] = x[cc]
					cc += 1
				ans = ''
				for i in ll:
					ans += i
				counter = CountOccurrences(ans, x)
				if counter > 1:
					tempFlag = False
				else:
					cc = 0
					l = ll
					flag = True
					break
		for i in range(n):
			if l[i] == '?':
				l[i] = 'z'
		ans = ''
		for i in l:
			ans += i
		counter = CountOccurrences(ans, x)
		if flag == False or counter > 1:
			print('No')
		else:
			print('Yes')
			print(ans)


import math
import sys
t = int(input())
for _ in range(t):
	n = int(input())
	s = 'abacaba'
	s1 = list(input())
	j = 0
	flag = False
	ind1 = []
	for i in range(n - 6):
		cnt = 0
		for j1 in range(7):
			if s1[i + j1] != '?':
				if s1[i + j1] != s[j1]:
					break
				else:
					cnt += 1
			else:
				cnt += 1
		if cnt == 7:
			ind1.append(i)
			flag = True
	if flag:
		l = []
		ans = []
		s3 = []
		for i in range(7):
			s3.append(s[i])
		for i1 in range(len(ind1)):
			s2 = []
			for i2 in range(len(s1)):
				s2.append(s1[i2])
			for i in range(ind1[i1], ind1[i1] + 7):
				if s2[i] == '?':
					s2[i] = s[i - ind1[i1]]
			for i2 in range(len(s1)):
				if s2[i2] == '?':
					s2[i2] = 'z'
			cnt = 0
			for i2 in range(n - 6):
				if s2[i2:i2 + 7] == s3[:]:
					cnt += 1
			if cnt == 1 and len(ans) == 0:
				for i2 in range(len(s2)):
					ans.append(s2[i2])
		if len(ans) > 0:
			print('YES')
			print(*ans, sep='')
		else:
			print('NO')
	else:
		print('NO')


from collections import defaultdict
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange

def print_case_iterable(case_num, iterable):
	print('Case #{}: {}'.format(case_num, ' '.join(map(str, iterable))))

def print_case_number(case_num, iterable):
	print('Case #{}: {}'.format(case_num, iterable))

def print_iterable(A):
	print(' '.join(A))

def read_int():
	return int(f.readline().strip())

def read_int_array():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def read_string():
	return list(f.readline().strip())

def ri():
	return int(f.readline().strip())

def ria():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def rs():
	return list(f.readline().strip())

def bi(x):
	return bin(x)[2:]
from collections import deque
import math
NUMBER = 10 ** 9 + 7

def factorial(n):
	M = NUMBER
	f = 1
	for i in range(1, n + 1):
		f = f * i % M
	return f

def mult(a, b):
	return a * b % NUMBER

def minus(a, b):
	return (a - b) % NUMBER

def plus(a, b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
		return (g, x - b // a * y, y)

def modinv(a):
	m = NUMBER
	(g, x, y) = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m

def choose(n, k):
	if n < k:
		assert false
	return mult(factorial(n), modinv(mult(factorial(k), factorial(n - k)))) % NUMBER
from collections import deque, defaultdict
import heapq
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def dfs(g, timeIn, timeOut, depths, parents):
	cnt = 0
	stack = [[1, 0, 0, 0]]
	while stack:
		(v, neig_i, parent, depth) = stack[-1]
		parents[v] = parent
		depths[v] = depth
		if neig_i == 0:
			timeIn[v] = cnt
			cnt += 1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i += 1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u, 0, v, depth + 1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
cnt = 0

@bootstrap
def dfs(v, adj, timeIn, timeOut, depths, parents, parent=0, depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt += 1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u, adj, timeIn, timeOut, depths, parents, v, depth + 1)
	timeOut[v] = cnt
	cnt += 1
	yield

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def get_num_2_5(n):
	twos = 0
	fives = 0
	while n > 0 and n % 2 == 0:
		n //= 2
		twos += 1
	while n > 0 and n % 5 == 0:
		n //= 5
		fives += 1
	return (twos, fives)

def shift(a, i, num):
	for _ in range(num):
		(a[i], a[i + 1], a[i + 2]) = (a[i + 2], a[i], a[i + 1])

def equal(x, y):
	return abs(x - y) <= 1e-09

def getAngle(a, b, c):
	ang = math.degrees(math.atan2(c[1] - b[1], c[0] - b[0]) - math.atan2(a[1] - b[1], a[0] - b[0]))
	return ang + 360 if ang < 0 else ang

def getLength(a, b):
	return math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
from heapq import heapify, heappush, heappop

def bfs(adj):
	s = set()
	d = defaultdict(set)
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0, 0))
	while len(q) > 0:
		(v, depth) = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth + 1].add(u)
				q.append((u, depth + 1))
	return d

def dfs(u, top, adj, vis):
	vis[u] = 1
	for (v, d) in adj[u]:
		if vis[v] == 2 or d == 0:
			continue
		if vis[v] == 1:
			return 'No'
		if dfs(v, top, adj, vis) == 'No':
			return 'No'
	vis[u] = 2
	top.append(u)

def solution(s, n):
	st = 'abacaba'
	cnt = 0
	i = -1
	for _ in range(2):
		try:
			i = s.index(st, i + 1)
		except ValueError:
			continue
		cnt += 1
	if cnt == 2:
		return 'No'
	if cnt == 1:
		res = []
		for i in range(n):
			if s[i] == '?':
				res.append('z')
			else:
				res.append(s[i])
		return 'Yes\n' + ''.join(res)
	start = []
	for i in range(n - 6):
		flag = True
		for j in range(7):
			if s[i + j] not in [st[j], '?']:
				flag = False
				break
		if flag:
			start.append(i)
	if len(start) == 0:
		return 'No'
	real_start = -1
	j = 0
	while j < len(start):
		if j == len(start) - 1:
			real_start = start[j]
			break
		if start[j + 1] - start[j] == 4:
			if s[start[j] + 7:start[j] + 11] != 'caba':
				real_start = start[j]
				break
			if s[start[j]:start[j] + 4] == 'abac':
				j += 1
			j += 1
			continue
		if start[j + 1] - start[j] == 6:
			if s[start[j] + 7:start[j] + 11] != 'bacaba':
				real_start = start[j]
				break
			if s[start[j]:start[j] + 6] == 'abacab':
				j += 1
			j += 1
		real_start = start[j]
		break
	if real_start == -1:
		return 'No'
	start = real_start
	res = []
	i = 0
	while i < n:
		if i == start:
			for j in range(7):
				res.append(st[j])
			i += 7
			continue
		if s[i] == '?':
			res.append('z')
		else:
			res.append(s[i])
		i += 1
	return 'Yes\n' + ''.join(res)

def main():
	T = 1
	T = ri()
	for i in range(T):
		n = ri()
		s = f.readline().strip()
		x = solution(s, n)
		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			(print >> output, str(x))
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()
if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()
main()


T = 'abacaba'

def check(s):
	cnt = 0
	for i in range(len(s) - 6):
		if ''.join(s[i:i + 7]) == T:
			cnt += 1
	return cnt

def main():
	n = int(input())
	string = list(str(input()))
	cnt = 0
	cnt = check(string)
	if cnt > 1:
		print('No')
		return
	elif cnt == 1:
		for i in range(len(string)):
			if string[i] == '?':
				string[i] = 'z'
		print('Yes')
		print(''.join(string))
	else:
		index = 0
		flag = False
		for i in range(len(string) - 6):
			if (string[i] == '?' or string[i] == 'a') and flag == False:
				string2 = string[i:i + 7]
				index = 0
				for j in range(i, i + 7):
					if string[j] == T[index] or string[j] == '?':
						string[j] = T[index]
						index += 1
					else:
						break
					if index == 7:
						flag = True
				if flag == True:
					if check(string) == 1:
						flag = True
					else:
						flag = False
				if flag == False:
					for k in range(len(string2)):
						string[i + k] = string2[k]
			if flag == True:
				break
		if flag:
			for i in range(len(string)):
				if string[i] == '?':
					string[i] = 'z'
			print('Yes')
			print(''.join(string))
		else:
			print('No')
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


production = True
import sys, math, collections

def input(input_format=0, multi=0):
	if multi > 0:
		return [input(input_format) for i in range(multi)]
	else:
		next_line = sys.stdin.readline()[:-1]
		if input_format >= 10:
			use_list = False
			input_format = int(str(input_format)[-1])
		else:
			use_list = True
		if input_format == 0:
			formatted_input = [next_line]
		elif input_format == 1:
			formatted_input = list(map(int, next_line.split()))
		elif input_format == 2:
			formatted_input = list(map(float, next_line.split()))
		elif input_format == 3:
			formatted_input = list(next_line)
		elif input_format == 4:
			formatted_input = list(map(int, list(next_line)))
		elif input_format == 5:
			formatted_input = next_line.split()
		else:
			formatted_input = [next_line]
		return formatted_input if use_list else formatted_input[0]

def out(output_line, output_format=0, newline=True):
	formatted_output = ''
	if output_format == 0:
		formatted_output = str(output_line)
	elif output_format == 1:
		formatted_output = ' '.join(map(str, output_line))
	elif output_format == 2:
		formatted_output = '\n'.join(map(str, output_line))
	print(formatted_output, end='\n' if newline else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)

def mapl(iterable, format=0):
	if format == 0:
		return list(map(int, iterable))
	elif format == 1:
		return list(map(str, iterable))
	elif format == 2:
		return list(map(list, iterable))

def ch(a, r, n):
	c = 0
	for i in range(n - 6):
		y = a[i:i + 7]
		if y == r:
			c += 1
	return c == 1

def solve():
	n = input(11)
	a = input(3)
	r = list('abacaba')
	for i in range(n - 6):
		y = a[i:i + 7]
		for (x, z) in zip(y, r):
			if not (x == '?' or x == z):
				break
		else:
			s = a[:i] + r + a[i + 7:]
			if ch(s, r, n):
				u = ''
				for j in s:
					if j == '?':
						u += 'z'
					else:
						u += j
				out('Yes')
				out(u)
				return
	out('No')
	return
for i in range(input(11)):
	solve()


TC = int(input())
for tc in range(TC):
	N = int(input())
	S = input()
	T = 'abacaba'
	R = ['z' if s == '?' else s for s in S]
	result = []
	for s1 in range(len(S) - len(T) + 1):
		r = R.copy()
		f = False
		if S[s1] == T[0] or S[s1] == '?':
			f = True
			r[s1] = T[0]
			for i in range(1, len(T)):
				if S[s1 + i] == T[i] or S[s1 + i] == '?':
					r[s1 + i] = T[i]
				else:
					f = False
					break
			if f:
				count = 0
				for s2 in range(len(S) - len(T) + 1):
					if r[s2] == T[0]:
						f2 = True
						for i in range(1, len(T)):
							if r[s2 + i] != T[i]:
								f2 = False
								break
						if f2:
							count += 1
				if count == 1:
					result = r
					break
	if result:
		print('Yes')
		print(''.join(result))
	else:
		print('NO')


S = 'abacaba'
T = int(input())
for _ in range(T):
	N = int(input())
	s = input()
	good = False
	for i in range(N - len(S) + 1):
		ok = True
		for (j, c) in enumerate(S):
			if s[i + j] != '?' and s[i + j] != c:
				ok = False
				break
		if not ok:
			continue
		t = s[:i].replace('?', 'd') + S + s[i + len(S):].replace('?', 'd')
		cnt = 0
		for i in range(N - len(S) + 1):
			if t[i:i + len(S)] == S:
				cnt += 1
		if cnt == 1:
			print('Yes')
			print(t)
			good = True
			break
	if not good:
		print('No')


from math import *
from collections import *
from bisect import *
import sys
input = sys.stdin.readline
t = int(input())
ref = 'abacaba'
ref1 = ref
ref = list(ref)
while t:
	t -= 1
	n = int(input())
	s = input().rstrip('\n')
	co = 0
	gb = 0
	fco = 0
	for i in range(n - 7 + 1):
		x = s[i:i + 7]
		k = 0
		if gb:
			break
		fl = 0
		for j in ref:
			if j == x[k] or x[k] == '?':
				k += 1
				continue
			fl = 1
			break
		if fl:
			continue
		else:
			cou = 0
			x = s[:i] + 'abacaba' + s[i + 7:]
			s1 = s
			for j in range(n - 7 + 1):
				if x[j:j + 7] == 'abacaba' or j == i:
					cou += 1
			if cou == 1:
				print('Yes')
				gb = 1
				for j in s[:i]:
					if j == '?':
						print('z', end='')
					else:
						print(j, end='')
				print('abacaba', end='')
				for j in s[i + 7:]:
					if j == '?':
						print('z', end='')
					else:
						print(j, end='')
				print()
	if gb == 0:
		print('NO')


testcases = int(input())
for i in range(testcases):
	n = int(input())
	input_str = input()
	if n < 7:
		print('NO')
	else:
		req_str = 'abacaba'
		if req_str not in input_str and '?' not in input_str:
			print('NO')
		elif req_str in input_str:
			count = 0
			for j in range(0, n - 6):
				if input_str[j:j + 7] == req_str:
					count += 1
				if count > 1:
					break
			if count > 1:
				print('NO')
			elif '?' not in input_str:
				print('YES')
				print(input_str)
			elif '?' in input_str:
				print('YES')
				for ele in input_str:
					if ele == '?':
						print('d', end='')
					else:
						print(ele, end='')
				print()
		else:
			got_it = False
			for point1 in range(0, n - 6):
				temp = ''
				point3 = 0
				for point2 in range(point1, point1 + 7):
					if input_str[point2] == req_str[point3]:
						temp += input_str[point2]
					elif input_str[point2] != req_str[point3] and input_str[point2] == '?':
						temp += req_str[point3]
					else:
						break
					point3 += 1
					if temp == req_str:
						temp = ''
						for j in range(point1):
							temp += input_str[j]
						for ele in req_str:
							temp += ele
						for j in range(point1 + 7, n):
							temp += input_str[j]
						temp_count = 0
						for j in range(0, n - 6):
							if temp[j:j + 7] == req_str:
								temp_count += 1
							if temp_count > 1:
								break
						if temp_count > 1:
							break
						else:
							got_it = True
							break
				if got_it:
					break
			if not got_it:
				print('NO')
			else:
				print('YES')
				for j in range(point1):
					if input_str[j] == '?':
						print('d', end='')
					else:
						print(input_str[j], end='')
				for ele in req_str:
					print(ele, end='')
				for j in range(point1 + 7, n):
					if input_str[j] == '?':
						print('d', end='')
					else:
						print(input_str[j], end='')
				print()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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 RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)

def toord(c):
	return ord(c) - ord('a')
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def main():
	for _ in range(N()):
		n = N()
		s = input()
		cp = 'abacaba'

		def ck(st):
			num = 0
			for i in range(n - 6):
				if st[i:i + 7] == cp:
					num += 1
			return num
		num = ck(s)
		if num > 1:
			print('No')
		elif num == 1:
			print('Yes')
			print(s.replace('?', 'z'))
		else:
			tag = 0
			for i in range(n - 6):
				for j in range(7):
					if s[i + j] == '?' or s[i + j] == cp[j]:
						continue
					else:
						break
				else:
					nows = s[:i] + cp + s[i + 7:]
					if ck(nows) == 1:
						tag = 1
						print('Yes')
						print(nows.replace('?', 'z'))
						break
			if tag == 0:
				print('No')
main()


import sys
inpy = [x for x in sys.stdin.read().split()]
t = int(inpy[0])
index = 1
mod = 'abacaba'
for _ in range(t):
	n = int(inpy[index])
	s = inpy[index + 1]
	index += 2
	s1 = s.find(mod)
	if s1 == -1:
		flag = True
		for i in range(n - 6):
			flag = True
			for j in range(7):
				if s[i + j] != mod[j] and s[i + j] != '?':
					flag = False
					break
			if flag:
				if i + 11 <= n and s[i + 7:i + 11] == 'caba':
					flag = False
				if i >= 4 and s[i - 4:i] == 'abac':
					flag = False
				if flag:
					s = list(s)
					s[i:i + 7] = list(mod)
					for j in range(n):
						if s[j] == '?':
							s[j] = 'z'
					print('yes')
					print(''.join(s))
					break
		if not flag:
			print('No')
	else:
		s1 = s[s1 + 1:].find(mod)
		if s1 == -1:
			s = list(s)
			for j in range(n):
				if s[j] == '?':
					s[j] = 'z'
			print('yes')
			print(''.join(s))
		else:
			print('No')


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	zz = 0
	for _ in range(ri()):
		n = ri()
		s = rs()
		lo = 'abacaba'
		if len(s) < 7:
			print('NO')
		else:
			ars = ''
			ptr = []
			k = 0
			m = 0
			for i in range(len(s) - 7 + 1):
				ars = s[i:i + 7]
				t = 0
				for j in range(7):
					if ars[j] != '?' and ars[j] != lo[j]:
						t += 1
				if ars == lo:
					m += 1
				if t == 0:
					k = 1
					ptr.append(i)
			if k == 1 and m < 2:
				ans = ['0'] * n
				for i in range(n):
					if s[i] == '?':
						ans[i] = 'd'
					else:
						ans[i] = s[i]
				if m == 0:
					z = ans.copy()
					t = 0
					for j in ptr:
						for i in range(j, j + 7):
							ans[i] = lo[i - j]
						kk = 0
						ars = ''
						anss = ''.join((str(i) for i in ans))
						for l in range(n - 7 + 1):
							ars = anss[l:l + 7]
							if ars == lo:
								kk += 1
						if kk == 1:
							print('YES')
							print(anss)
							t = 1
							break
						ans = z.copy()
					if t == 0:
						print('NO')
				else:
					print('YES')
					anss = ''.join((str(i) for i in ans))
					print(anss)
			else:
				print('NO')
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			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, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			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()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


abacaba = 'abacaba'

def CountOverlappingSubstrings(haystack, needle):
	count = 0
	i = -1
	while True:
		i = haystack.find(needle, i + 1)
		if i == -1:
			return count
		count += 1

def Possible(line):
	for i in range(7):
		if line[i] != abacaba[i] and line[i] != '?':
			return False
	return True
bad_forward_patterns = {'?bacaba', 'a?acaba', 'ab?caba', '??acaba', '?b?caba', 'a??caba', '???caba', 'ab?bacaba', 'a??bacaba', '???bacaba', '?b?bacaba'}
bad_back_patterns = {'abac?ba', 'abaca?a', 'abacab?', 'abac??a', 'abac?b?', 'abaca??', 'abac???', 'ababacab?', 'ababaca??', 'ababac???', 'ababac?b?'}
T = int(input())
ans = []
for _ in range(T):
	input()
	line = input()
	line = '################' + line + '################'
	found_abacaba_cnt = CountOverlappingSubstrings(line, abacaba)
	if found_abacaba_cnt >= 2:
		ans.append('no')
		continue
	i = 16
	while i < len(line) - 16:
		if found_abacaba_cnt == 1:
			break
		if line[i + 4:i + 11] in bad_forward_patterns or line[i + 4:i + 13] in bad_forward_patterns:
			i = i + 4
			continue
		if line[i - 4:i + 3] in bad_back_patterns or line[i - 4:i + 5] in bad_back_patterns:
			i = i + 4
			continue
		if Possible(line[i:i + 7]) and (not ()):
			found_abacaba_cnt += 1
			line = line[:i] + abacaba + line[i + 7:]
			break
		i += 1
	for i in range(len(line)):
		if line[i] == '?':
			line = line[:i] + 'q' + line[i + 1:]
	if found_abacaba_cnt != 0:
		ans.append('yes')
		ans.append(line[16:-16])
	else:
		ans.append('no')
for i in ans:
	print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	c = 0
	for i in range(n - 6):
		if s[i:].startswith('abacaba'):
			c += 1
	if c > 1:
		print('No')
	elif c == 1:
		print('Yes')
		print(s.replace('?', 'z'))
	elif '?' in s:
		i = 0
		while i < n - 6:
			if s[i] == 'a':
				s2 = 'abacaba'
				j = 1
				s1 = list(s)
				while j <= 6:
					if s1[i + j] == s2[j]:
						j += 1
					elif s1[i + j] == '?':
						s1[i + j] = s2[j]
						j += 1
					else:
						break
				if j > 6:
					s1 = ''.join(s1)
					k = 0
					for w in range(n - 6):
						if s1[w:].startswith('abacaba'):
							k += 1
					if k == 1:
						print('Yes')
						print(s1.replace('?', 'z'))
						c = 1
						break
			elif s[i] == '?':
				s2 = 'abacaba'
				j = 1
				s1 = list(s)
				s1[i] = 'a'
				while j <= 6:
					if s1[i + j] == s2[j]:
						j += 1
					elif s1[i + j] == '?':
						s1[i + j] = s2[j]
						j += 1
					else:
						break
				if j > 6:
					s1 = ''.join(s1)
					k = 0
					for w in range(n - 6):
						if s1[w:].startswith('abacaba'):
							k += 1
					if k == 1:
						print('Yes')
						print(s1.replace('?', 'z'))
						c = 1
						break
			i += 1
		if c == 0:
			print('No')
	else:
		print('No')


import sys
input = sys.stdin.readline
I = lambda : list(map(str, input().split()))
(m,) = I()
m = int(m)
while m:
	(n,) = I()
	n = int(n)
	(arr,) = I()
	flag = 0
	if n < 7:
		flag = 1
	if flag == 0:
		c = 0
		for i in range(n):
			if i + 6 < n:
				if arr[i:i + 7] == 'abacaba':
					c += 1
			else:
				break
		if c > 1:
			flag = 1
	if flag == 0 and c == 1:
		for i in range(n):
			if arr[i] == '?':
				arr = arr[:i] + 'd' + arr[i + 1:]
		print('Yes')
		print(arr)
	elif flag == 0:
		string = 'abacaba'
		for i in range(n):
			if flag != -1:
				k = 0
				if i + 6 < n:
					if arr[i] == 'a' or arr[i] == '?':
						temp = 0
						for j in range(i, i + 7):
							if arr[j] == string[k] or arr[j] == '?':
								j += 1
								k += 1
							else:
								temp = 1
								break
						if temp == 0:
							k = 0
							cop = str(arr)
							for j in range(i, i + 7):
								arr = arr[:j] + string[k] + arr[j + 1:]
								k += 1
							for j in range(n):
								if arr[j] == '?':
									arr = arr[:j] + 'd' + arr[j + 1:]
							c = 0
							for ii in range(n):
								if ii + 6 < n:
									if arr[ii:ii + 7] == 'abacaba':
										c += 1
								else:
									break
							if c == 1:
								print('Yes')
								print(arr)
								flag = -1
							else:
								arr = cop
		if flag != -1:
			print('No')
	if flag == 1:
		print('No')
	m -= 1


t = int(input())
for it in range(0, t):
	input()
	A = input()
	C = 'abacaba'
	if A.find(C) != -1 and A.find(C) == A.rfind(C):
		print('YES', A.replace('?', 'z'), sep='\n')
		continue
	for wInd in range(0, len(A)):
		word = A[wInd:wInd + len(C)]
		word = ''.join([a for (a, b) in zip(word, C) if a == b or a is '?'])
		if len(word) == len(C):
			B = A[:wInd] + C + A[wInd + len(C):]
			if B.find(C) != -1 and B.find(C) == B.rfind(C):
				print('YES', B.replace('?', 'z'), sep='\n')
				break
	else:
		print('NO')


t = 'abacaba'

def check(s, n):
	cnt = 0
	for i in range(n - len(t) + 1):
		match = True
		for j in range(len(t)):
			if s[i + j] != t[j]:
				match = False
				break
		if match:
			cnt += 1
	if cnt == 1:
		return True
	return False
T = int(input())
for _ in range(T):
	n = int(input())
	s = input()
	cnt = 0
	ans = ''
	for i in range(n - len(t) + 1):
		match = True
		match_s = s
		for j in range(len(t)):
			if s[i + j] == '?':
				match_s = match_s[:i + j] + t[j] + match_s[i + j + 1:]
				continue
			if s[i + j] != t[j]:
				match = False
				break
		if match:
			if check(match_s, n):
				cnt += 1
				ans = match_s
	if cnt > 0:
		print('YES')
		print(ans.replace('?', 'q'))
	else:
		print('NO')


samp = 'abacaba'
for i in range(int(input())):
	n = int(input())
	s = input()
	inp = 0
	for j in range(n - 6):
		s1 = s[j:j + 7]
		if s1 == samp:
			inp = inp + 1
	if inp > 1:
		print('NO')
	elif inp == 1:
		print('YES')
		s = s.replace('?', 'z')
		print(s)
	else:
		for j in range(n - 6):
			s1 = s[j:j + 7]
			fl = True
			for k in range(7):
				if s1[k] == samp[k] or s1[k] == '?':
					pass
				else:
					fl = False
					break
			if fl:
				inp = 0
				s1 = s[:j] + samp + s[j + 7:]
				for k in range(n - 6):
					s2 = s1[k:k + 7]
					if s2 == samp:
						inp = inp + 1
				if inp == 1:
					s1 = s1.replace('?', 'z')
					print('YES')
					print(s1)
					break
				elif inp > 1:
					inp = 0
					s = s.replace('?', 'z', 1)
		if inp == 0:
			print('NO')


import re

def main():
	for i in range(int(input())):
		t = int(input())
		str1 = input()
		k = len(re.findall('(?=abacaba)', str1))
		if k == 1:
			print('Yes')
			for j in range(len(str1)):
				if str1[j] == '?':
					print('z', end='')
				else:
					print(str1[j], end='')
			print()
		elif k > 1:
			print('No')
		else:
			flag = 0
			for j in range(len(str1) - 6):
				if str1[j] == 'a' or str1[j] == '?':
					if str1[j + 1] == 'b' or str1[j + 1] == '?':
						if str1[j + 2] == 'a' or str1[j + 2] == '?':
							if (str1[j + 3] == 'c' or str1[j + 3] == '?') and (str1[j + 4] == 'a' or str1[j + 4] == '?') and (str1[j + 5] == 'b' or str1[j + 5] == '?') and (str1[j + 6] == 'a' or str1[j + 6] == '?'):
								str2 = str1[0:j] + 'abacaba' + str1[j + 7:]
								k = len(re.findall('(?=abacaba)', str2))
								if k == 1:
									flag = 1
									break
								else:
									continue
			if flag == 0:
				print('No')
			else:
				print('Yes')
				for j in range(len(str2)):
					if str2[j] == '?':
						print('z', end='')
					else:
						print(str2[j], end='')
				print()
main()


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(n,) = I()
	a = input().strip()
	x = list(a)
	r = 'abacaba'
	pos = hv = 0
	pp = []
	for l in range(n - 6):
		cr = a[l:l + 7]
		if cr == r:
			hv += 1
		else:
			tt = 0
			for i in range(7):
				if cr[i] != r[i] and cr[i] != '?':
					tt = 1
					break
			if not tt:
				pp.append(l)
				pos += 1
	if hv > 1 or (hv == 0 and pos < 1):
		print('No')
	elif hv:
		print('Yes')
		print(a.replace('?', 'd'))
	else:
		f = 0
		for p in pp:
			if p >= 4 and a[p - 4:p] == 'abac' or (p + 11 <= n and a[p + 7:p + 11] == 'caba'):
				continue
			else:
				f = 1
				for j in range(p, p + 7):
					if a[j] == '?':
						x[j] = r[j - p]
				break
		for j in range(n):
			if x[j] == '?':
				x[j] = 'd'
		if f:
			print('Yes')
			print(''.join(x))
		else:
			print('No')


from sys import stdin, stdout
from sys import maxsize
input = stdin.readline

def solve():
	pass

def onedarr(a):
	for el in a:
		print(el, end='')
	print()

def cntr(s):
	cnt = 0
	n = len(s)
	s_ = list('abacaba')
	for i in range(n - 6):
		if checker(s_, s[i:i + 7]):
			cnt += 1
	return cnt

def checker(s_, s):
	for i in range(len(s)):
		if s[i] != s_[i]:
			return False
	return True

def check(s_, s):
	for i in range(len(s)):
		if s[i] != '?' and s[i] != s_[i]:
			return False
	return True
test = 1
test = int(input().strip())
for t in range(0, test):
	n = int(input().strip())
	s = list(input().strip())
	s_ = list('abacaba')
	ans = ' ' * n
	flag = False
	cnt = cntr(s)
	if cnt > 1:
		print('No')
	elif cnt == 1:
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		print('Yes')
		onedarr(s)
	else:
		for i in range(n - 6):
			if check(s_, s[i:i + 7]):
				ans = s[:i] + s_ + s[i + 7:]
				if cntr(ans) == 1:
					flag = True
					break
		for i in range(n):
			try:
				if ans[i] == '?':
					ans[i] = 'z'
			except:
				break
		if not flag:
			print('No')
		else:
			print('Yes')
			onedarr(ans)
	ans = solve()


x = 'abacaba'

def match(t):
	for i in range(7):
		if t[i] != x[i] and t[i] != '?':
			return False
	return True

def solve():
	if s.find(x) != s.rfind(x):
		return None
	if s.find(x) >= 0:
		return s.replace('?', 'd')
	for i in range(n - 6):
		if match(s[i:i + 7]):
			k = s[:i] + x + s[i + 7:]
			if k.find(x) == k.rfind(x):
				return k.replace('?', 'd')
	return None
for _ in range(int(input())):
	n = int(input())
	s = input()
	res = solve()
	if res:
		print('Yes')
		print(res)
	elif res is None:
		print('No')


from sys import stdin

def check(string, goal):
	for i in range(len(string)):
		if string[i] != '?' and string[i] != goal[i]:
			return False
	return True

def check2(string, goal):
	for i in range(len(string)):
		if string[i] != goal[i]:
			return False
	return True
for _ in range(int(stdin.readline())):
	goal = 'abacaba'
	array = list(goal)
	count = 0
	length = int(stdin.readline())
	string = stdin.readline().strip()
	ans = list(string)
	flag = False
	temp = ans[:]
	for i in range(length - 6):
		temp = ans[:]
		count = 0
		if check(string[i:i + 7], goal):
			temp[i:i + 7] = array
			temp = [temp[i] if temp[i] != '?' else 'z' for i in range(length)]
			for j in range(length - 6):
				if check2(temp[j:j + 7], goal):
					count += 1
			if count != 1:
				continue
			else:
				flag = True
				break
	if flag:
		print('YES')
		print(''.join(temp))
	else:
		print('NO')


def solve():
	n = int(input())
	s = input()
	check = 'abacaba'
	cpy = s[:]

	def mycnt(string):
		cnt = 0
		for i in range(n - 6):
			if string[i:i + 7] == check:
				cnt += 1
		return cnt
	cnt = mycnt(s)
	if cnt == 1:
		print('YES')
		print(s.replace('?', 'z'))
	elif cnt > 1:
		print('NO')
	else:
		found = False
		for i in range(n - 6):
			s = list(cpy)
			for j in range(7):
				if s[i + j] != check[j] and s[i + j] != '?':
					break
				s[i + j] = check[j]
			else:
				st = ''.join(s)
				if mycnt(st) == 1:
					found = True
					break
		if found:
			print('YES' + '\n' + st.replace('?', 'z'))
		else:
			print('NO')
for _ in range(int(input())):
	solve()


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = int(input())
	S = input().strip()
	count = 0
	KEY = 'abacaba'
	for i in range(n):
		if S[i:i + 7] == KEY:
			count += 1
	if count >= 2:
		print('No')
		continue
	if count == 1:
		ANS = []
		for s in S:
			if s != '?':
				ANS += [s]
			else:
				ANS += ['z']
		print('Yes')
		print(''.join(ANS))
		continue
	flag = 0
	for i in range(n - 6):
		for j in range(7):
			if S[i + j] == KEY[j] or S[i + j] == '?':
				True
			else:
				break
		else:
			ANSST = S[:i] + KEY + S[i + 7:]
			count = 0
			for k in range(n):
				if ANSST[k:k + 7] == KEY:
					count += 1
			if count == 1:
				ANS = []
				for s in ANSST:
					if s != '?':
						ANS += [s]
					else:
						ANS += ['z']
				print('Yes')
				print(''.join(ANS))
				flag = 1
				break
		if flag:
			break
	if flag == 0:
		print('No')


def cnt(s, search):
	res = 0
	for i in range(len(s) - len(search) + 1):
		if s[i:i + len(search)] == search:
			res += 1
	return res
t = int(input())
length = []
strings = []
for i in range(t):
	length.append(int(input()))
	strings.append(input())
correct = 'abacaba'
for i in range(t):
	l = length[i]
	s = strings[i]
	if cnt(s, correct) > 2:
		print('No')
	elif cnt(s, correct) == 1:
		print('Yes')
		tmp = ''
		for j in range(len(s)):
			if s[j] == '?':
				tmp += 'd'
			else:
				tmp += s[j]
		print(tmp)
	else:
		cand = []
		for k in range(len(s) - 6):
			flg = 1
			tmp_s = s[k:k + 7]
			for j in range(len(tmp_s)):
				if tmp_s[j] != '?' and tmp_s[j] != correct[j]:
					flg = 0
			if flg:
				cand.append(k)
		flg = 0
		ans = ''
		for c in cand:
			tmp_s = s[:c] + correct + s[c + 7:]
			if cnt(tmp_s, correct) == 1:
				flg = 1
				for j in range(len(tmp_s)):
					if tmp_s[j] == '?':
						ans += 'd'
					else:
						ans += tmp_s[j]
				break
		if flg:
			print('Yes')
			print(ans)
		else:
			print('No')


from sys import stdin, stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007

def occurrences(string, sub):
	count = start = 0
	while True:
		start = string.find(sub, start) + 1
		if start > 0:
			count += 1
		else:
			return count

def do(s):
	s = list(s)
	for i in range(len(s)):
		if s[i] == '?':
			s[i] = 'd'
	return ''.join(s)
s1 = 'abacaba'
tc = ii1()
for _ in range(tc):
	n = ii1()
	s = is1()
	if s1 in s:
		if occurrences(s, s1) > 1:
			print('No')
		else:
			print('Yes')
			s = do(s)
			print(s)
	else:
		s = list(s)
		for i in range(len(s) - len(s1) + 1):
			if s[i] == 'a' or s[i] == '?':
				cur = i
				k = 0
				while k < len(s1):
					if s[cur] == s1[k] or s[cur] == '?':
						cur += 1
						k += 1
					else:
						break
				else:
					cur = i
					k = 0
					s2 = s[:]
					while k < len(s1):
						s2[cur] = s1[k]
						cur += 1
						k += 1
					s2 = do(s2)
					if occurrences(s2, s1) == 1:
						print('Yes')
						print(s2)
						break
		else:
			print('No')


import sys
input = sys.stdin.readline

def checkS(s):
	count = 0
	for i in range(n - 6):
		if s[i:i + 7] == 'abacaba':
			count += 1
	return count

def main(n, s):
	text = 'abacaba'
	count = checkS(s)
	if count == 1:
		print('Yes')
		return s.replace('?', 'z')
	elif count >= 1 or s.count('?') == 0:
		return 'No'
	for i in range(n - 6):
		s1 = s
		for j in range(7):
			if s1[i:][j] == '?':
				s1 = s1[:i] + s1[i:][:j] + text[j] + s1[i:][j + 1:]
		val = checkS(s1)
		if val == 1:
			print('Yes')
			return s1.replace('?', 'z')
	return 'No'
for _ in range(int(input())):
	n = int(input())
	s = input()[:-1]
	print(main(n, s))


for __ in range(int(input())):
	n = int(input())
	ar = list(input())
	lol = 0
	for i in range(n - 6):
		kek = ''
		for j in range(i, i + 7):
			kek += ar[j]
		if kek == 'abacaba':
			lol += 1
	if lol > 1:
		print('No')
	elif lol == 0:
		flag = True
		for i in range(n - 6):
			kek = ''
			ar1 = ar.copy()
			for j in range(i, i + 7):
				if ar[j] == '?':
					if (j - i) % 2 == 0:
						ar1[j] = 'a'
					elif (j - i) % 4 == 1:
						ar1[j] = 'b'
					else:
						ar1[j] = 'c'
				kek += ar1[j]
			fii = 0
			for j in range(n - 6):
				lek = ''
				for z in range(j, j + 7):
					lek += ar1[z]
				if lek == 'abacaba':
					fii += 1
			if kek == 'abacaba' and fii == 1:
				lol = 1
				flag = False
				ar = ar1.copy()
				break
		for i in range(n):
			if ar[i] == '?':
				ar[i] = 'z'
		if lol == 1:
			print('Yes')
			print(''.join(ar))
		else:
			print('No')
	else:
		print('Yes')
		for i in range(n):
			if ar[i] == '?':
				ar[i] = 'z'
		print(''.join(ar))


t = int(input())
m = 'abacaba'

def is_correct(s):
	pos = [i for i in range(len(s) - 6) if s[i:i + 7] == m]
	if len(pos) > 1:
		return False
	else:
		return True
for _ in range(t):
	n = int(input())
	s = str(input())
	if m in s:
		if not is_correct(s):
			print('No')
		else:
			print('Yes')
			print(s.replace('?', 'z'))
	else:
		matched = 0
		flag = False
		i = 0
		while i < n:
			if s[i] == m[matched] or s[i] == '?':
				matched += 1
			else:
				i -= max(matched - 1, -1)
				matched = 0
				continue
			if matched == 7:
				tmp = s[:i - 6].replace('?', 'z') + m + s[i + 1:].replace('?', 'z')
				if is_correct(tmp):
					flag = True
					break
				else:
					i -= 5
					matched = 0
					continue
			i += 1
		if flag:
			print('Yes')
			print(s[:i - 6].replace('?', 'z') + m + s[i + 1:].replace('?', 'z'))
		else:
			print('No')


n = int(input())
str_line = 'abacaba'
for i in range(n):
	m = int(input())
	s = input()
	prev = ''
	for j in range(0, m - 6):
		result = ''
		for k in range(7):
			e = s[j + k]
			if e == '?':
				result += str_line[k]
			elif e == str_line[k]:
				result += e
			else:
				break
		if result == str_line:
			new = s[j + 7:]
			nnew = ''
			for e in new:
				if e == '?':
					nnew += 'd'
				else:
					nnew += e
			new = nnew
			finish = prev + str_line + new
			count = 0
			for m in range(len(finish) - 6):
				if finish[m:m + 7] == str_line:
					count += 1
			if count == 1:
				print('YES')
				print(finish)
				break
			elif s[j] == '?':
				prev += 'd'
			else:
				prev += s[j]
		elif s[j] == '?':
			prev += 'd'
		else:
			prev += s[j]
	else:
		print('NO')


t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	n = int(input())
	s = input()
	flag = True
	ex = 'abacaba'
	ind = s.find(ex)
	if ind != -1:
		if s[ind + 1:].find(ex) == -1:
			print('YES')
			print(s.replace('?', 'z'))
		else:
			print('NO')
	else:
		for i in range(n - 6):
			flag = True
			for j in range(7):
				if not (s[i + j] == ex[j] or s[i + j] == '?'):
					flag = False
					break
			if flag:
				r = s[:i] + ex + s[i + 7:]
				if r[i + 1:].find(ex) != -1 or r.find(ex) != i:
					flag = False
				else:
					print('YES')
					print(r.replace('?', 'z'))
					break
			if not flag:
				continue
	if not flag:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd, log
from collections import Counter

def main():
	n = int(input())
	s = input()
	r = 'abacaba'
	s = s + '*' + r
	m = len(r)
	ans = ['z'] * n
	for i in range(n):
		if s[i] != '?':
			ans[i] = s[i]
	ans = ''.join(ans)
	for i in range(n - m + 1):
		b = True
		for j in range(m):
			if s[i + j] == r[j] or s[i + j] == '?':
				continue
			b = False
			break
		t = s
		s = s[:i] + r + s[i + m:]
		if b:
			ind = s.index(r)
			if ind < n:
				ind2 = s.index(r, ind + 1)
				if ind2 > n:
					print('YES')
					a = ans[:i] + r + ans[i + m:]
					assert len(a) == n
					print(a)
					return
		s = t
	print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')
for _ in range(int(input())):
	main()


def check(s):
	c = 0
	for i in range(n - 6):
		if s[i] == 'a':
			if s[i + 1] == 'b':
				if s[i + 2] == 'a':
					if s[i + 3] == 'c':
						if s[i + 4] == 'a':
							if s[i + 5] == 'b':
								if s[i + 6] == 'a':
									c += 1
	return c
for _ in range(int(input())):
	n = int(input())
	s = input()
	t = []
	f = 0
	if 'abacaba' in s:
		if check(s) == 1:
			print('Yes')
			s = list(s)
			for i in range(n):
				if s[i] == '?':
					s[i] = 'z'
			print(''.join(s))
		else:
			print('No')
	else:
		for i in range(n - 6):
			t = list(s)
			if t[i] == 'a' or t[i] == '?':
				t[i] = 'a'
				if t[i + 1] == 'b' or t[i + 1] == '?':
					t[i + 1] = 'b'
					if t[i + 2] == 'a' or t[i + 2] == '?':
						t[i + 2] = 'a'
						if t[i + 3] == 'c' or t[i + 3] == '?':
							t[i + 3] = 'c'
							if t[i + 4] == 'a' or t[i + 4] == '?':
								t[i + 4] = 'a'
								if t[i + 5] == 'b' or t[i + 5] == '?':
									t[i + 5] = 'b'
									if t[i + 6] == 'a' or t[i + 6] == '?':
										t[i + 6] = 'a'
										if check(t) == 1:
											f = 1
											break
		if f:
			print('Yes')
			for i in range(len(t)):
				if t[i] == '?':
					t[i] = 'z'
			print(''.join(t))
		else:
			print('No')


for _ in range(0, int(input())):
	n = int(input())
	l = list(input().strip())
	c = list('abacaba')
	prev = 0
	flag5 = 0
	for i in range(0, n - 7 + 1):
		if l[i:i + 7] == c:
			prev += 1
	if prev > 1:
		print('No')
		flag5 = 0
	elif prev == 1:
		for i in range(0, n):
			if l[i] == '?':
				l[i] = 'd'
		print('Yes')
		flag5 = 1
		print(''.join((str(x) for x in l)))
	else:
		for i in range(0, n - 7 + 1):
			tem = [a for a in l[i:i + 7]]
			for j in range(0, 7):
				if tem[j] == '?':
					tem[j] = c[j]
			if tem == c:
				orig = [a for a in l]
				l = [a for a in l[:i] + tem + l[i + 7:]]
				prevee = 0
				for i in range(0, n - 7 + 1):
					if l[i:i + 7] == c:
						prevee += 1
				if prevee != 1:
					l = [a for a in orig]
				else:
					flag5 = 1
					print('Yes')
					break
		if flag5 == 1:
			for i in range(0, n):
				if l[i] == '?':
					l[i] = 'd'
			print(''.join((str(x) for x in l)))
		else:
			print('No')
			flag5 = 0


for _ in range(int(input())):
	n = int(input())
	s = list(input())
	c = list('abacaba')
	flag = False
	i = 0
	ans = 0
	while i < n - 6:
		j = 0
		cou = 0
		while j < len(c):
			if s[i + j] == c[j]:
				cou += 1
				j += 1
			else:
				break
			if cou == 7:
				ans += 1
		i += 1
	if ans == 1:
		print('YES')
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		print(*s, sep='')
	elif ans > 1:
		print('NO')
	else:
		i = 0
		while i < n - 6:
			ans = 0
			s1 = [ele for ele in s]
			j = 0
			cou = 0
			while j < len(c):
				if s1[i + j] == c[j] or s1[i + j] == '?':
					cou += 1
					if s1[i + j] == '?':
						s1[i + j] = c[j]
					j += 1
				else:
					break
			if cou == 7:
				for zo in range(n):
					if s1[zo] == '?':
						s1[zo] = 'z'
				i1 = 0
				while i1 < n - 6:
					j1 = 0
					cou1 = 0
					while j1 < len(c):
						if s1[i1 + j1] == c[j1]:
							cou1 += 1
							j1 += 1
						else:
							break
					if cou1 == 7:
						ans += 1
					i1 += 1
				if ans == 1:
					flag = True
					break
			if flag:
				break
			else:
				i += 1
		if flag:
			print('YES')
			print(*s1, sep='')
		else:
			print('NO')


gi = lambda : list(map(int, input().split()))

def cn(s):
	ln = len(s)
	flag = False
	cnt = 0
	k = 0
	while k < ln:
		if 'abacaba' in s[k:]:
			cnt += 1
			k = s.index('abacaba', k) + 1
		else:
			break
	return cnt
for tt in range(gi()[0]):
	(n,) = gi()
	s = input()
	ss = list(s)
	if cn(s) == 1:
		print('Yes')
		for k in range(n):
			if ss[k] == '?':
				ss[k] = 'd'
		print(''.join(ss))
		continue
	if cn(s) > 1:
		print('No')
		continue
	t = 'abacaba'
	flag = False
	for k in range(n - 6):
		flag = True
		tmp = ''
		for j in range(k, k + 7):
			if s[j] == '?' or s[j] == t[j - k]:
				tmp += t[j - k]
			else:
				flag = False
				break
		if flag:
			tmp = s[:k] + tmp + s[k + 7:]
			if cn(tmp) == 1:
				ss = list(tmp)
				break
			else:
				flag = False
	for k in range(n):
		if ss[k] == '?':
			ss[k] = 'd'
	if flag:
		print('Yes')
		print(''.join(ss))
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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 main():
	for t in range(int(input())):
		n = int(input())
		s = input()
		pos = []
		tent = []
		all_a = []
		req = 'abacaba'
		for i in range(n):
			if s[i] == 'a' or s[i] == '?':
				seen = False
				for j in range(7):
					if i + j > n - 1:
						break
					if s[i + j] != req[j] and s[i + j] != '?':
						break
					elif s[j + i] == '?':
						seen = True
				else:
					tent.append(i)
		sel = []
		flag = True
		for st_ind in range(len(tent)):
			st = tent[st_ind]
			tmp = list(s)
			sel = []
			for i in range(st, st + 7):
				if tmp[i] == '?':
					sel.append((i, req[i - st]))
				tmp[i] = req[i - st]
			pos = []
			for i in range(n):
				if tmp[i] == 'a':
					seen = False
					for j in range(7):
						if i + j > n - 1:
							break
						if tmp[i + j] != req[j]:
							break
					else:
						pos.append(i)
			if len(pos) > 1:
				continue
			elif len(pos) == 1:
				break
		if len(pos) == 1:
			print('Yes')
			for i in range(n):
				if s[i] == '?':
					for k in sel:
						if k[0] == i:
							print(k[1], end='')
							break
					else:
						print('z', end='')
				else:
					print(s[i], end='')
			print()
		else:
			print('No')
main()


check = 'abacaba'

def compare(s, t):
	res = True
	for i in range(len(s)):
		res &= s[i] == t[i] or s[i] == '?' or t[i] == '?'
	return res
for _ in range(int(input())):
	n = int(input())
	s = input()
	ans = 'No'
	res = ''
	for i in range(n - 6):
		t = s
		test = t[i:i + 7]
		if compare(test, check):
			t = s[:i] + check + s[i + 7:]
			t = t.replace('?', 'z')
			count = 0
			for j in range(n - 6):
				if t[j:j + 7] == check:
					count += 1
			if count == 1:
				ans = 'Yes'
				res = t
	print(ans)
	if ans == 'Yes':
		print(res)


t = 'abacaba'
for _ in range(int(input())):
	n = int(input())
	s = input()
	pos = []
	for i in range(n - 6):
		flag = True
		for j in range(i, i + 7):
			if s[j] != t[j - i] and s[j] != '?':
				flag = False
				break
		if flag:
			pos.append(i)
	if not len(pos):
		print('No')
	else:
		ans = ''
		for p in pos:
			tmp = ''
			for i in range(p):
				if s[i] == '?':
					tmp += 'f'
				else:
					tmp += s[i]
			tmp += t
			for i in range(p + 7, n):
				if s[i] == '?':
					tmp += 'f'
				else:
					tmp += s[i]
			cnt = 0
			for i in range(n - 6):
				if tmp[i:i + 7] == t:
					cnt += 1
			if cnt == 1:
				ans = tmp
				break
			else:
				ans = '777'
		if ans == '777':
			print('No')
		else:
			print('Yes', ans, sep='\n')


t = int(input())
for loop in range(t):
	n = int(input())
	s = input()
	if n < 7:
		print('No')
		continue
	target = 'abacaba'
	count = 0
	for i in range(n - 6):
		st = s[i:i + 7]
		if st == target:
			count += 1
	if count > 1:
		print('No')
	elif count == 1:
		for i in range(n):
			if s[i] == '?':
				s = s[:i] + 'z' + s[i + 1:]
		print('Yes')
		print(s)
	else:
		ans = -1
		for i in range(n - 6):
			st = s[i:i + 7]
			j = 0
			flag = 0
			while j < 7:
				if st[j] != target[j]:
					if st[j] == '?':
						st = st[:j] + target[j] + st[j + 1:]
					else:
						flag = 1
						break
				j += 1
			if flag == 0:
				news = s[:i] + st + s[i + 7:]
				count = 0
				for j in range(n - 6):
					newst = news[j:j + 7]
					if newst == target:
						count += 1
				if count == 1:
					ans = 1
					break
		if ans == 1:
			for i in range(n):
				if news[i] == '?':
					news = news[:i] + 'z' + news[i + 1:]
			print('Yes')
			print(news)
		else:
			print('No')


t = int(input())
cs = 'abacaba'
for i in range(t):
	n = int(input())
	s = input()
	counter = 0
	for j in range(n - 6):
		if cs == s[j:j + 7]:
			counter += 1
	if counter > 1:
		print('No')
	elif counter == 1:
		print('Yes')
		s2 = ''
		for c in s:
			if c == '?':
				s2 += 'z'
			else:
				s2 += c
		print(s2)
	else:
		printed = False
		for j in range(n - 6):
			is_valid = True
			for k in range(7):
				if s[j + k] != cs[k] and s[j + k] != '?':
					is_valid = False
					break
			if is_valid:
				final_string = s[:j] + cs + s[j + 7:]
				new_counter = 0
				for j2 in range(n - 6):
					if cs == final_string[j2:j2 + 7]:
						new_counter += 1
				if new_counter == 1:
					print('Yes')
					printed = True
					final_s2 = ''
					for c in final_string:
						if c == '?':
							final_s2 += 'z'
						else:
							final_s2 += c
					print(final_s2)
					break
		if not printed:
			print('No')


def issub(s):
	s = list(s)
	sb = list('abacaba')
	results = 0
	sub_len = len(sb)
	for i in range(len(s) - 1):
		if s[i:i + sub_len] == sb:
			results += 1
	return results
for _ in range(int(input())):
	n = int(input())
	s = input()
	n = len(s)
	f = 0
	c = issub(s)
	if c > 1:
		print('NO')
	elif c == 1:
		print('YES')
		print(s.replace('?', 'z'))
	else:
		t = list(s)
		for i in range(n - 6):
			temp = t[i:i + 7]
			ans = list('abacaba')
			for j in range(7):
				if temp[j] != ans[j] and temp[j] != '?':
					break
				elif temp[j] != ans[j] and temp[j] == '?':
					temp[j] = ans[j]
			if ans == temp:
				f = 1
				for j in range(i, i + 7):
					t[j] = ans[j - i]
				if issub(t) == 1:
					break
				else:
					t = list(s)
		if f == 1:
			for i in range(len(s)):
				if t[i] == '?':
					t[i] = 'z'
		if f == 1 and issub(t) == 1:
			print('YES')
			print(''.join(t))
		else:
			print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	b = []
	s = input()
	for j in s:
		b.append(j)
	j = 0
	f = 0
	c = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
	while j < n - 6:
		if s[j:j + 7] == 'abacaba':
			f += 1
		j += 1
	if f > 1:
		print('No')
	elif f == 1:
		for j in range(n):
			if b[j] == '?':
				b[j] = 'z'
		print('Yes')
		print(''.join(b))
	else:
		j = 0
		while j < n - 6:
			p = j
			q = 0
			while p <= j + 6:
				if b[p] == '?':
					pass
				elif b[p] == c[p - j]:
					pass
				else:
					q = 1
					break
				p += 1
			if q == 0:
				p = j
				d = []
				for q in b:
					d.append(q)
				while p <= j + 6:
					if b[p] == '?':
						d[p] = c[p - j]
					p += 1
				g = 0
				y = 0
				while y < n - 6:
					if d[y:y + 7] == c:
						g += 1
					y += 1
				if g == 1:
					f = 1
					break
			j += 1
		if f == 1:
			for j in range(n):
				if d[j] == '?':
					d[j] = 'z'
			print('Yes')
			print(''.join(d))
		else:
			print('No')


sa = 'abacaba'

def check(s):
	return ''.join([s[i] if s[i] != '?' else sa[i] for i in range(7)]) == sa

def count(s):
	return sum([int(s[i:i + 7] == sa) for i in range(n - 6)])
t = int(input())
for it in range(t):
	n = int(input())
	s = input()
	for i in range(n - 6):
		if check(s[i:i + 7]):
			z = s.replace('?', 'z')
			z = z[:i] + sa + z[i + 7:]
			if count(z) == 1:
				print('Yes', z, sep='\n')
				break
	else:
		print('No')


def check(s):
	n = len(s)
	c = 0
	for i in range(0, n - 6):
		if s[i:i + 7] == p:
			c += 1
	if c == 1:
		return 1
	else:
		return 0
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	p = 'abacaba'
	for i in range(0, n - 6):
		temp = s[i:i + 7]
		for j in range(7):
			if temp[j] != '?' and temp[j] != p[j]:
				break
		else:
			var = ''
			c = 0
			for j in range(n):
				if j < i or j >= i + 7:
					if s[j] != '?':
						var += s[j]
					else:
						var += 'x'
				else:
					var += p[c]
					c += 1
			if check(var):
				print('yes')
				print(var)
				break
	else:
		print('no')


base = 'abacaba'
t = int(input())
for case in range(t):
	n = int(input())
	s = input()
	cnt = 0
	for i in range(n):
		if s[i:i + 7] == base:
			cnt += 1
	if cnt == 1:
		print('Yes')
		ans = s.replace('?', 'd')
		print(ans)
	elif cnt >= 2:
		print('No')
	else:
		ans = ''
		for i in range(n - 6):
			bl = True
			for (e1, e2) in zip(s[i:i + 7], base):
				if e1 == '?':
					continue
				if e1 != e2:
					bl = False
			if bl:
				cand = s[:i].replace('?', 'd') + base + s[i + 7:].replace('?', 'd')
				cnt = 0
				for j in range(n):
					if cand[j:j + 7] == base:
						cnt += 1
				if cnt == 1:
					ans = cand
					break
		if ans:
			print('Yes')
			print(ans)
		else:
			print('No')


s = 'abacaba'

def check(x):
	if x == s:
		return 2
	for i in range(7):
		if not (x[i] == s[i] or x[i] == '?'):
			return 0
	return 1

def c(n, x):
	t = False
	for i in range(n - 6):
		g = check(x[i:i + 7])
		if g == 2 and t:
			return False
		elif g == 2:
			t = 1
	return True
T = int(input())
for t in range(T):
	n = int(input())
	a = input()
	d = False
	t = 0
	o = 0
	ois = []
	for i in range(n - 6):
		x = check(a[i:i + 7])
		if x == 2:
			t += 1
		elif x == 1:
			o += 1
			ois.append(i)
	if t > 1 or (t == 0 and o == 0):
		print('NO')
		continue
	if t == 1:
		print('YES')
		for i in range(n):
			if a[i] == '?':
				print('z', end='')
			else:
				print(a[i], end='')
		print()
		continue
	else:
		s2 = s
		for oi in ois:
			sc = ''
			for i in range(n):
				if i - oi >= 0 and i - oi < 7:
					sc += s[i - oi]
				elif a[i] == '?':
					sc += 'z'
				else:
					sc += a[i]
			if c(n, sc):
				print('YES')
				print(sc)
				d = True
				break
			if d:
				break
	if not d:
		print('NO')


from sys import stdin
TT = int(stdin.readline())
for loop in range(TT):
	n = int(stdin.readline())
	S = stdin.readline()
	S = S[:-1]
	for i in range(n - 6):
		last = S[:i] + 'abacaba' + S[i + 7:]
		flag = True
		for j in range(n):
			if S[j] != '?' and S[j] != last[j]:
				flag = False
		if not flag:
			continue
		tmp = 0
		for j in range(n - 6):
			if last[j:j + 7] == 'abacaba':
				tmp += 1
		if tmp == 1:
			print('Yes')
			ans = list(last)
			for i in range(n):
				if ans[i] == '?':
					ans[i] = 'z'
			print(''.join(ans))
			break
	else:
		print('No')


import sys, io, os, time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
want = 'abacaba'
T = int(input())
for _ in range(T):
	n = int(input())
	s = input().strip()
	l = list(s)
	for i in range(n - 6):
		ll = l[:]
		works = True
		for c in range(7):
			if ll[c + i] == want[c] or ll[c + i] == '?':
				ll[c + i] = want[c]
			else:
				works = False
		if works:
			for j in range(n - 6):
				if i != j and ll[j:j + 7] == list(want):
					break
			else:
				print('Yes')
				for j in range(n):
					if ll[j] == '?':
						ll[j] = 'd'
				print(''.join(ll))
				break
	else:
		print('No')


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	n = int(stdin.readline())
	s = list(stdin.readline().strip())
	my = list('abacaba')
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == my:
			cnt += 1
	if cnt > 1:
		print('NO')
		continue
	if cnt == 1:
		s = ''.join(s)
		s = s.replace('?', 'z')
		print('YES')
		print(s)
		continue
	ok = False
	for i in range(n - 6):
		temp = s[:]
		for j in range(7):
			if temp[i + j] == my[j]:
				continue
			if temp[i + j] != my[j] and temp[i + j] != '?':
				break
			if temp[i + j] == '?':
				temp[i + j] = my[j]
				cnt = 0
				for k in range(n - 6):
					if temp[k:k + 7] == my:
						cnt += 1
				if cnt == 1:
					s = temp
					ok = True
					break
		if ok:
			break
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == my:
			cnt += 1
	if cnt > 1:
		print('NO')
		continue
	if cnt == 1:
		s = ''.join(s)
		s = s.replace('?', 'z')
		print('YES')
		print(s)
		continue
	print('NO')


for i in range(int(input())):
	n = int(input())
	s = input()
	y = 'abacaba'
	p = 0
	go = False
	if 'abacaba' in s:
		x = s.find('abacaba')
		if 'abacaba' in s[x + 1:]:
			print('NO')
		else:
			print('YES')
			s = s.replace('?', 'f')
			print(s)
	else:
		for j in range(n - 6):
			for k in s[j:j + 7]:
				if k == y[p] or k == '?':
					go = True
					p += 1
				else:
					go = False
					p = 0
					break
			p = 0
			if go:
				q = s[:j] + y + s[j + 7:]
				v = q.find('abacaba')
				if 'abacaba' in q[v + 1:]:
					go = False
				else:
					print('YES')
					q = q.replace('?', 'f')
					print(q)
					break
		else:
			print('NO')


def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = len(li) - 1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def mex(li):
	check = [0] * 1001
	for i in li:
		check[i] += 1
	for i in range(len(check)):
		if check[i] == 0:
			return i

def sumdigits(n):
	ans = 0
	while n != 0:
		ans += n % 10
		n //= 10
	return ans

def product(li):
	ans = 1
	for i in li:
		ans *= i
	return ans

def maxpower(n, k):
	cnt = 0
	while n > 1:
		cnt += 1
		n //= k
	return cnt

def cnt(string):
	c = 0
	for i in range(len(string) - 6):
		if string[i:i + 7] == 'abacaba':
			c += 1
	return c
from math import *
from collections import deque
max_steps = 100005
for _ in range(int(input())):
	n = int(input())
	st = input()
	s = list(st)
	f = 0
	check = list('abacaba')
	ans = []
	for i in range(n - 6):
		(cnt1, cnt2) = (0, 0)
		for j in range(i, i + 7):
			if s[j] == check[j - i]:
				cnt1 += 1
			elif s[j] == '?':
				cnt2 += 1
		if cnt1 + cnt2 == 7:
			ans.append(i)
	for i in range(len(ans)):
		string = st[:ans[i]] + 'abacaba' + st[ans[i] + 7:]
		string.replace('?', 'z')
		if cnt(string.replace('?', 'z')) == 1:
			f = 1
			print('YES')
			print(string.replace('?', 'z'))
			break
		else:
			continue
	if f == 0:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	s = input()
	comp = 'abacaba'
	comp = list(comp)
	ans = 'NO'
	for i in range(n - 6):
		tmp = list(s)
		for (j, x) in enumerate(comp):
			if tmp[j + i] in (x, '?'):
				tmp[j + i] = x
			else:
				tmp = None
				break
		if tmp != None:
			count = 0
			for j in range(n - 6):
				if tmp[j:j + 7] == comp:
					count += 1
			if count == 1:
				ans = 'YES'
				break
	print(ans)
	if ans == 'YES':
		for (i, x) in enumerate(tmp):
			if x == '?':
				tmp[i] = 'z'
		print(''.join(tmp))


x = 'abacaba'

def match(ss):
	for k in range(7):
		if ss[k] != x[k] and ss[k] != '?':
			return False
	return True

def solve():
	if s.find(x) != s.rfind(x):
		return None
	if s.find(x) >= 0:
		return s.replace('?', 'd')
	for i in range(n - 6):
		if match(s[i:i + 7]):
			y = s[:i] + x + s[i + 7:]
			if y.find(x) == y.rfind(x):
				return y.replace('?', 'd')
	return None
for _ in range(int(input())):
	n = int(input())
	s = input()
	res = solve()
	if res is not None:
		print('Yes')
		print(res)
	else:
		print('No')


def solve():
	n = int(input())
	s = input()
	check = 'abacaba'
	cpy = s[:]

	def mycnt(string):
		cnt = 0
		for i in range(n - 6):
			if string[i:i + 7] == check:
				cnt += 1
		return cnt
	cnt = mycnt(s)
	if cnt == 1:
		print('YES')
		print(s.replace('?', 'z'))
	elif cnt > 1:
		print('NO')
	else:
		for i in range(n - 6):
			for j in range(7):
				if s[i + j] != check[j]:
					if s[i + j] != '?':
						break
					s = s[:i + j] + check[j] + s[i + j + 1:]
			else:
				if mycnt(s) == 1:
					print('YES')
					print(s.replace('?', 'z'))
					break
			s = cpy
		else:
			print('NO')
for _ in range(int(input())):
	solve()


def occurrences(string, sub):
	count = start = 0
	while True:
		start = string.find(sub, start) + 1
		if start > 0:
			count += 1
		else:
			return count

def modinv(n, p):
	return pow(n, p - 2, p)

def main():
	for case in range(int(input())):
		n = int(input())
		s = [x for x in input()]
		temp = ''.join(s)
		possible = False
		c = occurrences(temp, 'abacaba')
		if c > 1:
			print('No')
			continue
		if c == 1:
			for i in range(n):
				if s[i] == '?':
					s[i] = 'z'
			print('Yes')
			print(*s, sep='')
			continue
		for i in range(n - 6):
			if s[i] in 'a?' and s[i + 1] in 'b?' and (s[i + 2] in 'a?') and (s[i + 3] in 'c?') and (s[i + 4] in 'a?') and (s[i + 5] in 'b?') and (s[i + 6] in 'a?'):
				t = s[max(0, i - 7):min(n, i + 14)]
				j = i - max(0, i - 7)
				t[j] = 'a'
				t[j + 1] = 'b'
				t[j + 2] = 'a'
				t[j + 3] = 'c'
				t[j + 4] = 'a'
				t[j + 5] = 'b'
				t[j + 6] = 'a'
				temp = ''.join(t)
				if occurrences(temp, 'abacaba') == 1:
					s[i] = 'a'
					s[i + 1] = 'b'
					s[i + 2] = 'a'
					s[i + 3] = 'c'
					s[i + 4] = 'a'
					s[i + 5] = 'b'
					s[i + 6] = 'a'
					possible = True
				if possible:
					break
		if not possible:
			print('No')
		else:
			for i in range(n):
				if s[i] == '?':
					s[i] = 'z'
			print('Yes')
			print(*s, sep='')
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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')
main()


import sys
input = sys.stdin.readline
Q = int(input())
for _ in range(Q):
	N = int(input())
	S = input().rstrip()
	P = 'abacaba'
	ans = []
	for i in range(N - 6):
		T = list(S)
		ok = True
		for j in range(7):
			if T[i + j] == '?':
				T[i + j] = P[j]
			elif S[i + j] != P[j]:
				ok = False
				break
		for j in range(N):
			if T[j] == '?':
				T[j] = 'd'
		count = 0
		for j in range(N - 6):
			if T[j:j + 7] == list(P):
				count += 1
		if ok and count == 1:
			ans = T
			break
	if not ans:
		print('No')
	else:
		print('Yes')
		print(''.join(ans))


for _ in range(int(input())):
	n = int(input())
	s = input()
	temp = 'abacaba'
	f = 0
	c = 0
	for i in range(n - 6):
		if s[i:i + 7] == temp:
			c += 1
	if c >= 2:
		print('NO')
		continue
	if c == 1:
		print('YES')
		for i in range(n):
			if s[i] == '?':
				print('d', end='')
			else:
				print(s[i], end='')
		print(end='\n')
		continue
	f = 0
	k = 0
	for i in range(n - 6):
		s1 = list(s)
		k = 0
		f = 0
		if s1[i] == temp[0] or s1[i] == '?':
			k = 0
			s1[i] = temp[k]
			k += 1
			f = 0
			for j in range(i + 1, n):
				if k >= len(temp):
					f = 1
					break
				if s1[j] != '?' and s1[j] != temp[k]:
					break
				if s1[j] == temp[k]:
					k += 1
					continue
				if s1[j] == '?':
					s1[j] = temp[k]
					k += 1
		if f == 1 or k >= len(temp):
			c = 0
			s1 = ''.join(s1)
			for i in range(n - 6):
				if s1[i:i + 7] == temp:
					c += 1
			if c >= 2:
				f = 0
				k = 0
				continue
			print('YES')
			s1 = list(s1)
			for i in range(len(s1)):
				if s1[i] == '?':
					s1[i] = 'd'
			print(''.join(s1))
			break
		f = 0
		k = 0
	if f == 0 and k < len(temp):
		print('NO')


for _ in range(int(input())):
	n = int(input())
	s = input()
	sub_str = 'abacaba'
	s_replace = s.replace('?', 'd')
	cnt = 0
	for i in range(len(s_replace)):
		if s_replace[i:i + 7] == sub_str:
			cnt += 1
	if cnt == 1:
		ans = 'Yes'
		print(ans)
		print(s_replace)
		continue
	elif cnt > 1:
		ans = 'No'
		print(ans)
		continue
	ans = 'NO'
	for i in range(n):
		arr = list(s)
		ok = True
		for j in range(len(sub_str)):
			if i + j < len(arr) and (arr[i + j] == '?' or arr[i + j] == sub_str[j]):
				arr[i + j] = sub_str[j]
			else:
				ok = False
				break
		if not ok:
			continue
		s_replace = ''.join(arr).replace('?', 'd')
		if s_replace.count(sub_str) == 0:
			continue
		cnt = 0
		for i in range(len(s_replace)):
			if s_replace[i:i + 7] == sub_str:
				cnt += 1
			if cnt > 1:
				break
		if cnt == 1:
			ans = 'YES'
			print(ans)
			print(s_replace)
			break
	else:
		print(ans)


def ch(s, n):
	cou = 0
	for i in range(n - 6):
		if s[i:i + 7] == 'abacaba':
			cou += 1
	return cou == 1

def eq(s):
	for i in range(7):
		if s[i] != '?' and s[i] != 'abacaba'[i]:
			return False
	return True

def main(s, n):
	cou = 0
	for i in range(n - 6):
		if s[i:i + 7] == 'abacaba':
			cou += 1
	if cou == 1:
		print('Yes')
		for w in range(n):
			if s[w] != '?':
				print(s[w], end='')
			else:
				print('z', end='')
		print()
	elif cou > 1:
		print('No')
	else:
		s = list(s)
		c = s[:]
		for i in range(n - 6):
			if eq(''.join(s[i:i + 7])):
				for w in range(7):
					c[i + w] = 'abacaba'[w]
				Cou = 0
				for j in range(max(0, i - 7), min(n, i + 7)):
					if ''.join(c[j:j + 7]) == 'abacaba':
						Cou += 1
				if Cou == 1:
					print('Yes')
					for w in range(n):
						if c[w] != '?':
							print(c[w], end='')
						else:
							print('z', end='')
					print()
					return 0
				for w in range(7):
					c[i + w] = s[i + w]
		print('No')
for q in range(int(input())):
	n = int(input())
	s = input()
	main(s, n)


t = 'abacaba'
tl = len(t)
for _ in range(int(input())):
	n = int(input())
	s = input()
	if n < tl:
		print('NO')
		continue
	ct = 0
	f_occ_idx = -1
	for i in range(n - tl + 1):
		if s[i:i + tl] == t:
			ct += 1
			f_occ_idx = i
			continue
		elif s[i] == 'a' or s[i] == '?':
			match = True
			for j in range(1, tl):
				if not (s[i + j] == '?' or s[i + j] == t[j]):
					match = False
					break
			if match:
				if f_occ_idx < 0:
					f_occ_idx = i
				else:
					diff = f_occ_idx + tl - i
					if diff == 1 or diff == 3:
						ff = s[f_occ_idx:i].find('?')
						fs = s[i + diff:i + tl].find('?')
						if ff == fs == -1:
							f_occ_idx = -1
						elif ff > fs == -1:
							f_occ_idx = i
	if ct <= 1 and f_occ_idx >= 0:
		print('YES')
		print((s[:f_occ_idx] + t + s[f_occ_idx + tl:]).replace('?', 'z'))
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	ch = 'abacaba'
	for (i, v) in enumerate(s):
		ss = s
		tak = ss[i:i + 7]
		for (j, vj) in enumerate(tak):
			if vj == '?':
				ss = ss[:i + j] + ch[j] + ss[i + j + 1:]
		for (j, vj) in enumerate(ss):
			if vj == '?':
				ss = ss[:j] + 'x' + ss[j + 1:]
		col = 0
		for (j, vj) in enumerate(ss):
			if ch == ss[j:j + 7]:
				col += 1
			if j + 7 == n:
				break
		if col == 1:
			print('Yes')
			print(ss)
			break
		if i + 7 == n:
			print('NO')
			break


for _ in range(int(input())):
	num = int(input())
	s = input()
	sub = 'abacaba'
	if sub in s:
		s = list(s)
		sub = list(sub)
		count = 0
		for i in range(num):
			if s[i] == 'a':
				j = 0
				k = i
				while j < 7 and k < num:
					if s[k] != sub[j]:
						break
					j += 1
					k += 1
				if j == 7:
					count += 1
		if count == 1:
			print('Yes')
			for i in range(num):
				if s[i] == '?':
					s[i] = 'z'
			print(''.join(s))
		else:
			print('No')
	else:
		s = list(s)
		sub = list(sub)
		index = []
		for i in range(num):
			if s[i] == 'a' or s[i] == '?':
				j = 0
				k = i
				while j < 7 and k < num:
					if s[k] != sub[j] and s[k] != '?':
						break
					j += 1
					k += 1
				if j == 7:
					index.append(i)
		if len(index) == 0:
			print('No')
		else:
			flag = 1
			for x in index:
				temp = list(s)
				k = 0
				for j in range(x, x + 7):
					temp[j] = sub[k]
					k += 1
				count = 0
				for i in range(num):
					if temp[i] == 'a':
						j = 0
						k = i
						while j < 7 and k < num:
							if temp[k] != sub[j]:
								break
							j += 1
							k += 1
						if j == 7:
							count += 1
				if count == 1:
					flag = 0
					print('Yes')
					for i in range(num):
						if temp[i] == '?':
							temp[i] = 'z'
					print(''.join(temp))
					break
			if flag:
				print('No')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	n = int(inp())
	s = list(inp())
	t = list('abacaba')
	for i in range(n - 6):
		f = True
		for j in range(7):
			if s[i + j] == '?':
				continue
			elif s[i + j] == t[j]:
				continue
			else:
				f = False
				break
		if f:
			new = deepcopy(s)
			for j in range(7):
				if new[i + j] == '?':
					new[i + j] = t[j]
			for j in range(n):
				if new[j] == '?':
					new[j] = 'z'
			cnt = 0
			for j in range(n - 6):
				if new[j:j + 7] == t:
					cnt += 1
			if cnt == 1:
				print('YES')
				print(''.join(new))
				return
	print('NO')
testcase(int(inp()))


for _ in range(int(input())):
	n = int(input())
	s = list(input())
	i = 0
	st = 'abacaba'
	found = False
	while i < n - 6:
		if not found:
			flag = True
			for j in range(7):
				if s[i + j] == '?':
					continue
				elif s[i + j] != st[j]:
					flag = False
					break
			if flag:
				ans = [x for x in s]
				for j in range(7):
					ans[i + j] = st[j]
				check = 0
				for j in range(n - 6):
					if ans[j:j + 7] == list(st):
						check += 1
				if check == 1:
					found = True
					for i in range(n):
						if ans[i] == '?':
							ans[i] = 'd'
					print('Yes')
					print(''.join((x for x in ans)))
					break
		i += 1
	if not found:
		print('No')

def a():
	found = False
	two = False
	for i in range(n - 6):
		if s[i:i + 7] == list('abacaba'):
			if found:
				two = True
			else:
				found = True
	if two:
		print('No')
	elif found:
		print('Yes')
		ans = ''
		for i in s:
			if i == '?':
				ans += 'd'
			else:
				ans += i
		print(ans)
	else:
		for i in range(n - 6):
			st = 'abacaba'
			found = False
			flag = True
			for j in range(7):
				if s[i + j] == '?':
					continue
				elif s[i + j] != st[j]:
					flag = False
					break
			if flag:
				found = True
				ans = []
				for j in s:
					if j == '?':
						ans.append('d')
					else:
						ans.append(j)
				for j in range(7):
					ans[i + j] = st[j]
				break
		if found:
			print('Yes')
			print(''.join((x for x in ans)))
		else:
			print('No')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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 countsub(vals, need):
	n = len(vals)
	count = 0
	for s in range(n + 1 - 7):
		sub = vals[s:s + 7]
		broke = False
		for b in range(len(sub)):
			if sub[b] == need[b]:
				continue
			else:
				broke = True
				break
		if broke == False:
			count += 1
	return count
testcases = int(input())
need = [b for b in 'abacaba']
for j in range(testcases):
	n = int(input())
	vals = [b for b in input()]
	count = countsub(vals, need)
	if count == 1:
		print('Yes')
		for s in range(n):
			if vals[s] == '?':
				vals[s] = 'x'
		print(''.join(vals))
	elif count >= 2:
		print('No')
	else:
		found = False
		for s in range(n + 1 - 7):
			temp = vals.copy()
			sliced = temp[s:s + 7]
			for b in range(len(sliced)):
				if sliced[b] == need[b]:
					continue
				elif sliced[b] == '?':
					sliced[b] = need[b]
					temp[s + b] = need[b]
				else:
					break
			num = countsub(temp, need)
			if num == 1:
				found = True
				vals = temp + []
				break
		if found == True:
			print('Yes')
			for s in range(n):
				if vals[s] == '?':
					vals[s] = 'x'
			print(''.join(vals))
		else:
			print('No')


tests = int(input())

def string_count(s, target):
	(cnt, n, m) = (0, len(s), len(target))
	for i in range(n - m + 1):
		if s[i:i + m] == target:
			cnt += 1
	return cnt

def main(t):
	n = int(input())
	s = input()
	target = 'abacaba'
	cnt = string_count(s, target)
	m = len(target)
	if cnt > 1:
		print('No')
		return
	elif cnt == 1:
		print('Yes\n{}'.format(s.replace('?', 'z')))
		return
	for i in range(n - m + 1):
		for j in range(m):
			if s[i + j] != '?' and s[i + j] != target[j]:
				break
		else:
			x = s[:i] + target + s[i + m:]
			if string_count(x, target) == 1:
				print('Yes\n{}'.format(x.replace('?', 'z')))
				return
	print('No')
for t in range(tests):
	main(t)


import sys
import math
from functools import reduce
import bisect

def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def input():
	return sys.stdin.readline().rstrip()

def index(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return -1
	return i
for _ in range(int(input())):
	n = getN()
	s = input()
	string = 'abacaba'
	l = 0
	for i in range(len(s)):
		if s[i:i + len(string)] == string:
			l += 1
	if l == 1:
		s = s.replace('?', 'z')
		print('Yes')
		print(s)
	elif l > 1:
		print('No')
	else:
		segs = []
		for i in range(n - 6):
			check = True
			for j in range(i, i + 7):
				if not (s[j] == string[j - i] or s[j] == '?'):
					check = False
					break
			if check:
				segs.append((i, i + 6))
		if not segs:
			print('No')
		else:
			check = False
			for (x, y) in segs:
				if x > 3:
					if s[x - 4:x] == 'abac':
						continue
				if x > 5:
					if s[x - 6:x] == 'abacab':
						continue
				if y < n - 4:
					if s[y + 1:y + 5] == 'caba':
						continue
				if y < n - 6:
					if s[y + 1:y + 7] == 'bacaba':
						continue
				s = s[:x] + string + s[y + 1:]
				s = s.replace('?', 'z')
				check = True
				break
			if check:
				print('YES')
				print(s)
			else:
				print('NO')


import re
cnd = 'abacaba'
t = int(input())

def get_count(string):
	return len(re.findall('(?=' + cnd + ')', string))
for one in range(t):
	n = int(input())
	string = input()
	flag = False
	find_len = get_count(string)
	final_string = ''
	if find_len == 1:
		flag = True
		final_string = string
	elif find_len == 0:
		i = 0
		while i < n - 6:
			count = 0
			temp = ''
			for (cnd_char, char) in zip(cnd, string[i:i + 7]):
				if cnd_char == char or char == '?':
					temp += cnd_char
					count += 1
					continue
				else:
					break
			if count == 7:
				flag = True
				final_string = string[:i] + temp + string[i + 7:]
				if get_count(final_string) == 1:
					break
			i += 1
	final_string = final_string.replace('?', 'd')
	if len(re.findall('(?=' + cnd + ')', final_string)) != 1:
		flag = False
	if flag:
		print('YES')
		print(final_string)
	else:
		print('NO')


t = int(input())

def cout(t, sub):
	c = 0
	for i in range(0, len(t) - 6):
		if t[i:i + 7] == sub:
			c += 1
		if c > 1:
			return True
	return False
for i in range(t):
	n = int(input())
	p = input().strip(' ')
	sub = 'abacaba'
	if sub in p:
		if cout(p, sub):
			print('No')
			continue
		print('Yes')
		pnew = p.replace('?', 'z')
		print(pnew)
		continue
	else:
		for i in range(0, n - 6):
			for j in range(i, i + 7):
				if not (p[j] == sub[j - i] or p[j] == '?'):
					break
			else:
				pnew = p[:i] + sub + p[i + 7:]
				pnew = pnew.replace('?', 'z')
				if cout(pnew, sub):
					continue
				print('Yes')
				print(pnew)
				break
		else:
			print('No')


import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

def solve(arr):
	console('----- solving ------')
	appear_once = False
	cnt = 0
	idxs = []
	for (i, (a, b, c, d, e, f, g)) in enumerate(zip(*[arr[i:] for i in range(7)])):
		if (a == 'a' or a == '?') and (b == 'b' or b == '?') and (c == 'a' or c == '?') and (d == 'c' or d == '?') and (e == 'a' or e == '?') and (f == 'b' or f == '?') and (g == 'a' or g == '?'):
			appear_once = True
			idxs.append(i)
		if a + b + c + d + e + f + g == 'abacaba':
			cnt += 1
	console(arr)
	console(cnt, appear_once, idxs)
	if cnt > 1:
		print('No')
		return
	if not appear_once:
		print('No')
		return
	if cnt == 1:
		arr = arr.replace('?', 'z')
		print('Yes')
		print(arr)
		return

	def count(brr):
		cnt = 0
		for (i, (a, b, c, d, e, f, g)) in enumerate(zip(*[brr[i:] for i in range(7)])):
			if a + b + c + d + e + f + g == 'abacaba':
				cnt += 1
		console(brr, cnt)
		return cnt
	for idx in idxs:
		crr = ''.join([x for x in arr[:idx]]) + 'abacaba' + ''.join([y for y in arr[idx + 7:]])
		crr = crr.replace('?', 'q')
		if count(crr) == 1:
			print('Yes')
			print(crr)
			return
	print('No')

def console(*args):
	return
for case_num in range(int(input())):
	_ = int(input())
	strr = input()
	_ = solve(strr)


q = []
pat = 'abacaba'

def Count(s):
	count = 0
	s = ''.join(s)
	n = len(s)
	for i in range(len(s)):
		if i + 7 <= n and s[i:i + 7] == pat:
			count += 1
	return count

def Solve():
	n = int(input())
	s = input()
	flag = -1
	for i in range(n):
		t_s = list(s)
		k = 0
		for j in range(i, i + 7):
			if j < n and (t_s[j] == '?' or t_s[j] == pat[k]):
				t_s[j] = pat[k]
				k += 1
			else:
				break
		if Count(t_s) == 1:
			q.append('YES')
			for l in range(n):
				if t_s[l] == '?':
					t_s[l] = 'z'
			q.append(''.join(t_s))
			flag = 1
			break
	if flag == -1:
		q.append('NO')
for _ in range(int(input())):
	Solve()
for i in q:
	print(i)


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
t = list('abacaba')

def count(s):
	cnt = 0
	for i in range(len(s) - 6):
		if t == s[i:i + 7]:
			cnt += 1
	return cnt
for _ in range(ii()):
	n = ii()
	s = list(input())
	m = count(s)
	if m == 1:
		s = [c if c != '?' else 'd' for c in s]
		print('Yes')
		print(''.join(s))
	elif m > 1:
		print('No')
		continue
	else:
		F = False
		for i in range(n - 6):
			ss = [c for c in s]
			ok = True
			for j in range(7):
				if ss[i + j] != t[j] and ss[i + j] != '?':
					ok = False
					break
				ss[i + j] = t[j]
			if ok and count(ss) == 1:
				for j in range(n):
					if ss[j] == '?':
						ss[j] = 'd'
				F = True
				print('Yes')
				print(''.join(ss))
				break
		if not F:
			print('No')


import sys
input = sys.stdin.readline

def count_x(s):
	x = 'abacaba'
	count = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == x:
			count += 1
	return count

def main():
	t = int(input())
	for _ in range(t):
		N = int(input())
		S = input().strip()
		x = 'abacaba'
		count = count_x(S)
		if count >= 2:
			print('No')
			continue
		elif count == 1:
			ans = list(S)
			for i in range(N):
				if ans[i] == '?':
					ans[i] = 'z'
			print('Yes')
			print(''.join(ans))
		else:
			for i in range(N - 6):
				f = True
				for j in range(7):
					if S[i + j] != '?' and S[i + j] != x[j]:
						f = False
						break
				if f:
					tmpcount = count_x(S[:i] + x + S[i + 7:])
					if tmpcount == 1:
						print('Yes')
						ans = list(S[:i] + x + S[i + 7:])
						for i in range(N):
							if ans[i] == '?':
								ans[i] = 'z'
						print(''.join(ans))
						break
			else:
				print('No')
main()


def abc(x):
	if len(x) != 7:
		return 0
	c = 'abacaba'
	i = 0
	while i < 7:
		if x[i] == '?':
			i += 1
		elif c[i] == x[i]:
			i += 1
		else:
			break
	return i == 7

def cd(x):
	ans = 0
	for i in range(len(x)):
		if x[i:i + 7] == 'abacaba':
			ans += 1
	return ans == 1
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	ans = 0
	for i in range(n):
		if s[i:i + 7] == 'abacaba':
			ans += 1
	s = list(s)
	if ans == 0:
		flag = 0
		for i in range(n):
			x = abc(s[i:i + 7])
			m = max(0, i - 6)
			if x and cd(''.join(s[m:i]) + 'abacaba' + ''.join(s[i + 7:i + 13])):
				x = ''
				for j in range(i):
					if s[j] == '?':
						x += 'z'
					else:
						x += s[j]
				x += 'abacaba'
				for j in range(i + 7, n):
					if s[j] == '?':
						x += 'z'
					else:
						x += s[j]
				print('Yes')
				print(x)
				flag = 1
				break
		if not flag:
			print('No')
	elif ans == 1:
		print('Yes')
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		print(''.join(s))
	else:
		print('No')


import sys
input = sys.stdin.readline
check = 'abacaba'
t = int(input())
for _ in range(t):
	n = int(input())
	s = list(input())
	cnt = 0
	flag = False
	for i in range(n - 6):
		if ''.join(map(str, s[i:i + 7])) == check:
			cnt += 1
	if cnt >= 2:
		pass
	elif cnt == 1:
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		flag = True
	else:
		for i in range(n - 6):
			for j in range(7):
				if s[i + j] != '?' and s[i + j] != check[j]:
					break
			else:
				if i + 10 < n and ''.join(map(str, s[i + 7:i + 11])) == 'caba':
					continue
				if i - 4 >= 0 and ''.join(map(str, s[i - 4:i])) == 'abac':
					continue
				else:
					for j in range(7):
						s[i + j] = check[j]
					for i in range(n):
						if s[i] == '?':
							s[i] = 'z'
					flag = True
					break
		else:
			pass
	if flag == False:
		print('No')
	else:
		ans = ''
		for i in range(n):
			ans += s[i]
		print('Yes')
		print(ans)


import re
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	count = len(re.findall('(?=abacaba)', s))
	if count > 1:
		print('No')
	elif count == 1:
		s = s.replace('?', 'z')
		print('Yes')
		print(s)
	else:
		a = 'abacaba'
		pos = 0
		i = 0
		found = False
		sind = 0
		while i < len(s):
			c = s[i]
			if a[pos] == c:
				pos += 1
			elif c == '?':
				pos += 1
			else:
				pos = 0
				i = sind
				sind += 1
			if pos == len(a):
				prevs = s
				s = s[:sind] + 'abacaba' + s[sind + len(a):]
				s = s.replace('?', 'z')
				count = len(re.findall('(?=abacaba)', s))
				if count > 1:
					s = prevs
					pos = 0
					i = sind
					sind += 1
				elif count == 1:
					found = True
					print('Yes')
					print(s)
					break
			i += 1
		if not found:
			print('No')


cases = int(input())
for i in range(cases):
	n = int(input())
	s = input()
	count = 0
	for a in range(len(s) - 6):
		ele = s[a]
		temp = ele
		for b in s[a + 1:a + 7]:
			temp += b
			if temp == 'abacaba':
				count += 1
	if count > 1:
		print('NO')
	elif s.count('?') == len(s):
		print('YES')
		ans = 'abacaba'
		rest = len(s) - 7
		ans += rest * 'd'
		print(ans)
	elif count == 1:
		if '?' not in s:
			print('YES')
			print(s)
		else:
			s = list(s)
			for c in range(len(s)):
				ele = s[c]
				if ele == '?':
					s[c] = 'd'
			print('YES')
			print(''.join(s))
	elif count == 0 and '?' in s:
		target = 'abacaba'
		for d in range(len(s) - 6):
			possible = False
			scopy = list(s)
			ele = scopy[d]
			temp = ele
			for e in scopy[d + 1:d + 7]:
				temp += e
			if '?' in temp:
				temp = list(temp)
				target = list(target)
				arr = []
				for j in range(7):
					ele1 = temp[j]
					ele2 = target[j]
					if ele1 != ele2 and ele1 == '?':
						temp[j] = ele2
						arr.append(j)
				if temp == target:
					possible = True
					for f in arr:
						scopy[d + f] = temp[f]
				count2 = 0
				if possible:
					for a in range(len(scopy) - 6):
						ele3 = scopy[a]
						temp2 = ele3
						for b in scopy[a + 1:a + 7]:
							temp2 += b
							if temp2 == 'abacaba':
								count2 += 1
					if count2 != 1:
						possible = False
					elif count2 == 1:
						possible = True
						print('YES')
						for s2 in range(len(scopy)):
							beta = scopy[s2]
							if beta == '?':
								scopy[s2] = 'd'
						print(''.join(scopy))
						break
		if not possible:
			print('NO')
	elif count == 0 and '?' not in s:
		print('NO')


def main():
	purpose = [s for s in 'abacaba']
	T = int(input())
	for _ in range(T):
		N = int(input())
		S = [s for s in input()]
		flag = False
		cnt = 0
		has_q_cnt = 0
		q_idx = []
		for i in range(N - 7 + 1):
			has_q = False
			for (s, t) in zip(S[i:i + 7], purpose):
				if s != '?' and s != t:
					break
				if s == '?':
					has_q = True
			else:
				flag = True
				if has_q:
					if has_q_cnt == 0:
						has_q_cnt += 1
					q_idx.append(i)
				else:
					cnt += 1
			if 1 < cnt:
				break
		if q_idx:
			if cnt == 0:
				for q in q_idx:
					tmp = S[q:q + 7][:]
					S[q:q + 7] = purpose
					p_cnt = 0
					for i in range(N - 7 + 1):
						for (s, t) in zip(S[i:i + 7], purpose):
							if s != t:
								break
						else:
							p_cnt += 1
					if p_cnt > 1:
						S[q:q + 7] = tmp
						continue
					else:
						break
				else:
					has_q_cnt = 0
			else:
				has_q_cnt = 0
		if flag and has_q_cnt + cnt == 1:
			print('Yes')
			print(''.join([s if s != '?' else 'e' for s in S]))
		else:
			print('No')
main()


from math import ceil
for _ in range(int(input())):
	n = int(input())
	s = input()
	cntalr = 0
	cntpos = []
	ok = 'abacaba'
	for i in range(n - 6):
		cur = s[i:i + 7]
		if cur == ok:
			cntalr += 1
		else:
			cnt = 0
			for j in range(7):
				if i + j == n:
					break
				if s[i + j] == '?':
					cnt += 1
				elif s[i + j] == ok[j]:
					cnt += 1
			if cnt == 7:
				cntpos.append(i)
	if cntalr >= 2:
		print('No')
	elif cntalr == 1:
		print('Yes')
		for i in range(n):
			if s[i] == '?':
				print('z', end='')
			else:
				print(s[i], end='')
		print()
	else:
		c = True
		for x in cntpos:
			t = s[:x] + ok + s[x + 7:]
			cou = 0
			for i in range(n - 6):
				cur = t[i:i + 7]
				if cur == ok:
					cou += 1
			if cou == 1:
				print('Yes')
				for i in range(n):
					if t[i] == '?':
						print('z', end='')
					else:
						print(t[i], end='')
				print()
				c = False
				break
		if c:
			print('No')


target = 'abacaba'

def countSubstr(s):
	n = len(s)
	res = 0
	for i in range(n - 7 + 1):
		flag = True
		k = 0
		for j in range(i, i + 7):
			if s[j] == target[k]:
				k += 1
			else:
				flag = False
				break
		if flag:
			res += 1
	return res
t = int(input())
while t:
	t -= 1
	n = int(input())
	s = input()
	count = countSubstr(s)
	if count > 1:
		print('No')
		continue
	elif count == 1:
		print('Yes')
		ns = s.replace('?', 'z')
		print(ns)
		continue
	else:
		flag2 = False
		for i in range(n - 7 + 1):
			k = 0
			flag = True
			ns = ''
			for j in range(i, i + 7):
				if s[j] == target[k]:
					ns += s[j]
					k += 1
				elif s[j] == '?':
					ns += target[k]
					k += 1
				else:
					flag = False
					break
			ns = s[:i] + ns + s[i + 7:]
			ns = ns.replace('?', 'z')
			if flag and countSubstr(ns) == 1:
				print('Yes')
				print(ns)
				flag2 = True
				break
		if not flag2:
			print('No')


pattern = 'abacaba'
for _ in range(int(input())):
	n = int(input())
	s = input()
	yes = 0
	for i in range(n - 6):
		yes = 1
		for j in range(7):
			if s[i + j] != '?' and s[i + j] != pattern[j]:
				yes = 0
				break
		if not yes:
			continue
		tmp = ['z' if x == '?' else x for x in s[:i] + pattern + s[i + 7:]]
		tmp = ''.join((x for x in tmp))
		if sum([1 if tmp[i:i + 7] == pattern else 0 for i in range(n - 6)]) == 1:
			print('YES\n' + tmp)
			break
		yes = 0
	if not yes:
		print('NO')


from sys import stdin, stdout

def KMPSearch(pat, txt, lps):
	M = len(pat)
	N = len(txt)
	f = 0
	j = 0
	i = 0
	while i < N:
		if pat[j] == txt[i]:
			i += 1
			j += 1
		if j == M:
			f += 1
			j = lps[j - 1]
		elif i < N and pat[j] != txt[i]:
			if j != 0:
				j = lps[j - 1]
			else:
				i += 1
	return f

def computeLPSArray(pat, M, lps):
	ln = 0
	lps[0] = 0
	i = 1
	while i < M:
		if pat[i] == pat[ln]:
			ln += 1
			lps[i] = ln
			i += 1
		elif ln != 0:
			ln = lps[ln - 1]
		else:
			lps[i] = 0
			i += 1
chk = 'abacaba'
lps = [0] * 7
computeLPSArray(chk, 7, lps)
for _ in range(int(input())):
	n = int(input())
	s = stdin.readline()
	s = s[:len(s) - 1]
	f = False
	i = 0
	while i + 6 < n:
		j = 0
		temps = list(s)
		while j < len(chk) and (chk[j] == s[i + j] or s[i + j] == '?'):
			temps[i + j] = chk[j]
			j += 1
		if j == 7:
			c = KMPSearch(chk, temps, lps)
			if c == 1:
				f = True
				break
		i += 1
	if f:
		stdout.write('Yes\n')
		for i in range(n):
			if temps[i] == '?':
				temps[i] = 'z'
		ans = ''.join(temps)
		stdout.write(ans + '\n')
	else:
		stdout.write('No\n')


for _ in range(int(input())):
	n = int(input())
	s = input()
	s1 = 'abacaba'
	if s1 in s:
		ind = s.index(s1)
		if s1 in s[ind + 1:]:
			print('NO')
		else:
			print('YES')
			print(s.replace('?', 'd'))
	else:
		f = 0
		for q in range(n - 6):
			f = 0
			for (i, j) in zip(s[q:q + 7], s1):
				if not i in [j, '?']:
					f = 1
					break
			if f == 0:
				r = s.replace('?', 'd')
				r = r[:q] + s1 + r[q + 7:]
				if s1 not in r[r.index(s1) + 1:]:
					print('YES')
					print(r)
					break
				else:
					f = 1
		if f == 1:
			print('NO')


from collections import defaultdict
con = 10 ** 9 + 7
INF = float('inf')

def getlist():
	return list(map(int, input().split()))

def abacaba(s):
	ans = 'abacaba'
	judge = 'absolute'
	for i in range(7):
		if ans[i] != s[i]:
			if s[i] == '?':
				judge = 'able'
			else:
				judge = 'No'
				break
	return judge

def main():
	T = int(input())
	for _ in range(T):
		N = int(input())
		s = input()
		judge = 'No'
		for i in range(N - 6):
			t = s[i:i + 7]
			jud = abacaba(t)
			if jud != 'No':
				s2 = s[:i] + 'abacaba' + s[i + 7:]
				cnt = 0
				for j in range(N - 6):
					jud = abacaba(s2[j:j + 7])
					if jud == 'absolute':
						cnt += 1
				if cnt == 1:
					ans = s2.replace('?', 'z')
					print('Yes')
					print(ans)
					judge = 'Yes'
					break
		if judge == 'No':
			print('No')
main()


import sys, os.path
from collections import deque
from fractions import Fraction as f

def IO():
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
		print = sys.stdout.write

def nextInt():
	return int(input())

def nextTuple():
	return [int(a) for a in input().split()]

def nextArray():
	return list(map(int, input().split()))

def nextLine():
	return input()

def nextStringArray():
	return list(input().split())
IO()
sb = ''

def match_str(s1, s2):
	for i in range(7):
		if s1[i] != '?' and s1[i] != s2[i]:
			return False
	return True
tomatch = 'abacaba'
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	if len(s) < 7:
		print('NO')
		continue
	flag = 0
	p = ''
	for i in range(7, n + 1):
		if match_str(s[i - 7:i], tomatch):
			p = s[0:i - 7] + tomatch + s[i:]
			count = 0
			for j in range(7, len(p) + 1):
				if p[j - 7:j] == tomatch:
					count += 1
			if count == 1:
				flag = 1
				break
	if flag == 1:
		print('YES')
		for i in range(n):
			if p[i] != '?':
				print(p[i], end='')
			else:
				print('z', end='')
		print()
	else:
		print('NO')


abacaba = 'abacaba'
for _ in range(int(input())):
	n = int(input())
	s = input()
	foundAns = False
	for i in range(n - len(abacaba) + 1):
		works = True
		for j in range(len(abacaba)):
			if s[i + j] != abacaba[j] and s[i + j] != '?':
				works = False
		if not works:
			continue
		newString = []
		for j in range(n):
			if j < i or j >= i + len(abacaba):
				if s[j] == '?':
					newString.append('z')
				else:
					newString.append(s[j])
			else:
				newString.append(abacaba[j - i])
		ans = ''.join(newString)
		occ = 0
		for j in range(n - len(abacaba) + 1):
			if ans[j:j + len(abacaba)] == abacaba:
				occ += 1
		if occ == 1:
			foundAns = True
			print('YES')
			print(ans)
			break
	if not foundAns:
		print('NO')


case = int(input())

def abacnt(n, s):
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == 'abacaba':
			cnt += 1
	return cnt

def anaumeprint(n, s):
	s = list(s)
	for i in range(n):
		if s[i] == '?':
			s[i] = 'z'
	print('Yes')
	print(''.join(s))

def abadetect(n, s):
	startpoint = []
	for i in range(n - 6):
		check = s[i:i + 7]
		switch = True
		for j in range(7):
			if check[j] == 'abacaba'[j] or check[j] == '?':
				continue
			else:
				switch = False
		if switch == True:
			startpoint.append(i)
	return startpoint

def anaume_and_check(n, s, start):
	tmp = list(s)
	num = 0
	for i in range(start, start + 7):
		if tmp[i] == '?':
			tmp[i] = 'abacaba'[num]
		num += 1
	for i in range(n):
		if tmp[i] == '?':
			tmp[i] = 'z'
	tmp = ''.join(tmp)
	count = abacnt(n, tmp)
	if count == 1:
		return tmp
	else:
		return False
for _ in range(case):
	n = int(input())
	s = input()
	p = abacnt(n, s)
	if p >= 2:
		print('No')
	elif p == 1:
		anaumeprint(n, s)
	else:
		lst = abadetect(n, s)
		if len(lst) == 0:
			print('No')
		else:
			switch = 0
			for i in lst:
				result = anaume_and_check(n, s, i)
				if result:
					print('Yes')
					print(result)
					switch = 1
					break
			if switch == 0:
				print('No')


inp = lambda cast=int: [cast(x) for x in input().split()]
printf = lambda s='', *args, **kwargs: print(str(s).format(*args), flush=True, **kwargs)

def countS(string, sub):
	count = start = 0
	while True:
		start = string.find(sub, start) + 1
		if start > 0:
			count += 1
		else:
			return count
T = 'abacaba'
(t,) = inp()
for _ in range(t):
	(n,) = inp()
	(S,) = inp(str)
	if countS(S, T) > 1 and '?' not in S:
		print('No')
		continue
	S = list(S)
	for i in range(n):
		for j in range(len(T)):
			if i + j >= n:
				break
			if S[i + j] == '?':
				S[i + j] = T[j].upper()
			elif S[i + j] != T[j]:
				for k in range(j):
					if S[i + k].isupper():
						S[i + k] = '?'
				break
		else:
			R = ''.join(S).lower()
			if countS(R, T) > 1:
				for k in range(len(T)):
					if i + k >= n:
						break
					if S[i + k].isupper():
						S[i + k] = '?'
			else:
				break
	for i in range(n):
		if S[i] == '?':
			S[i] = 'd'
	R = ''.join(S).lower()
	if countS(R, T) == 1:
		print('Yes')
		print(R)
	else:
		print('No')


def fu(a):
	f = 0
	for i in range(n - 6):
		b = 'abacaba'
		e = 0
		for j in range(7):
			if a[i + j] == b[j]:
				e += 1
		if e == 7:
			f += 1
	return f
t = int(input())
for _ in range(t):
	n = int(input())
	a = input()
	if fu(a) == 1:
		print('Yes')
		b = list(a)
		for i in range(n):
			if b[i] == '?':
				b[i] = 't'
		print(''.join(b))
	elif fu(a) > 1:
		print('No')
	else:
		f = 'abacaba'
		e = 0
		for i in range(n - 6):
			b = list(a)
			for j in range(7):
				if b[i + j] == '?':
					b[i + j] = f[j]
			for j in range(n):
				if b[j] == '?':
					b[j] = 't'
			if fu(b) == 1:
				e = 1
				print('Yes')
				print(''.join(b))
				break
		if e == 0:
			print('No')


import re
p1 = re.compile('(?=[a?][b?][a?][c?][a?][b?][a?])')
p2 = re.compile('(?=abacaba)')
for _ in range(int(input())):
	n = int(input())
	s = input()
	opportunities = list(re.finditer(p1, s))
	dones = list(re.finditer(p2, s))
	if len(dones) > 1:
		print('No')
	elif dones:
		print('Yes')
		print(''.join((_ if _ != '?' else 'z' for _ in s)))
	elif opportunities:
		for opp in opportunities:
			c = list(s)
			c[opp.start():opp.start() + 7] = list('abacaba')
			c = ''.join((_ if _ != '?' else 'z' for _ in c))
			if len(list(re.finditer(p2, c))) == 1:
				print('Yes')
				print(c)
				break
		else:
			print('No')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	s = str(input())
	a = 'abacaba'
	b = 0
	for j in range(n - 6):
		if s[j:j + 7] == a:
			b += 1
	if b > 1:
		print('No')
	elif b == 1:
		print('Yes')
		for j in range(n):
			if s[j] == '?':
				s = s[:j] + 's' + s[j + 1:]
		print(s)
	else:
		l = 0
		temp = s
		arr = []
		for j in range(n - 6):
			str1 = s[j:j + 7]
			c = 0
			for k in range(7):
				if str1[k] == a[k] or str1[k] == '?':
					c += 1
			if c == 7:
				l += 1
				arr.append(j)
		if l > 0:
			g = 0
			for j in range(l):
				temp = s[:arr[j]] + a + s[arr[j] + 7:]
				b = 0
				for k in range(n - 6):
					if temp[k:k + 7] == a:
						b += 1
				if b == 1:
					g += 1
					s = temp
					break
			if g == 1:
				for j in range(n):
					if s[j] == '?':
						s = s[:j] + 's' + s[j + 1:]
				print('Yes')
				print(s)
			else:
				print('No')
		else:
			print('No')


t = int(input())
import copy
for _ in range(t):
	n = int(input())
	s = str(input())
	p = 'abacaba'
	cnt = 0
	for i in range(n - 7 + 1):
		for j in range(7):
			if s[i + j] != p[j]:
				break
		else:
			cnt += 1
	if cnt == 1:
		print('Yes')
		print(s.replace('?', 'z'))
		continue
	for i in range(n - 7 + 1):
		s_ = copy.copy(s)
		s_ = list(s_)
		for j in range(7):
			if s_[i + j] != p[j]:
				if s_[i + j] == '?':
					s_[i + j] = p[j]
				else:
					break
		else:
			for i in range(n):
				if s_[i] == '?':
					s_[i] = 'z'
			s_ = ''.join(s_)
			cnt = 0
			for i in range(n - 7 + 1):
				for j in range(7):
					if s_[i + j] != p[j]:
						break
				else:
					cnt += 1
			if cnt == 1:
				print('Yes')
				print(s_)
				break
	else:
		print('No')


r = 'abacaba'

def count(s):
	a = [0]
	a += [s[i] for i in range(6)]
	out = 0
	z = 0
	for i in range(n - 6):
		a.pop(0)
		a.append(s[i + 6])
		for j in range(7):
			if a[j] == r[j]:
				z += 1
		if z == 7:
			out += 1
		z = 0
	return out

def make(s):
	for j in range(len(s)):
		if s[j] == '?':
			s[j] = 'x'
	return s
for _ in range(int(input())):
	n = int(input())
	w = input()
	s = [i for i in w]
	if count(s) > 1:
		print('No')
	elif count == 1:
		print('YES')
		s = make(s)
		print(''.join(s))
	else:
		temp = 0
		a = [0]
		poss = 0
		a += [s[i] for i in range(6)]
		for i in range(n - 6):
			a.pop(0)
			a.append(s[i + 6])
			for j in range(7):
				if a[j] == r[j] or a[j] == '?':
					temp += 1
			if temp == 7:
				S = [i for i in s]
				for j in range(7):
					S[i + j] = r[j]
				S = make(S)
				if count(S) == 1:
					print('YES')
					print(''.join(S))
					poss = 1
					break
			temp = 0
		if poss == 0:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	t = list('abacaba')
	s = list(input())
	c = 0
	for i in range(n):
		if i + 7 <= n:
			check = s[i:i + 7]
			if check == t:
				c += 1
	if c > 1:
		print('NO')
		continue
	if c != 1:
		flag2 = 0
		for i in range(n):
			if i + 7 <= n:
				ss = s[:]
				flag = 1
				for j in range(i, i + 7):
					if ss[j] == t[j - i]:
						pass
					elif ss[j] == '?':
						pass
					else:
						flag = 0
						break
				if flag == 1:
					for j in range(i, i + 7):
						ss[j] = t[j - i]
					for j in range(i + 7, n):
						if ss[j] == '?':
							ss[j] = 'z'
					c = 0
					for i in range(n):
						if i + 7 <= n:
							check = ss[i:i + 7]
							if check == t:
								c += 1
					if c == 1:
						s = ss
						flag2 = 1
						break
				if flag2:
					break
	for i in range(n):
		if s[i] == '?':
			s[i] = 'z'
	c = 0
	for i in range(n):
		if i + 7 <= n:
			check = s[i:i + 7]
			if check == t:
				c += 1
	if c == 1:
		print('YES')
		print(''.join(s))
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def getc(s):
	c = 0
	for i in range(len(s) - 7, -1, -1):
		st = 'abacaba'
		if s[i:i + 7] == st:
			c += 1
	return c
for _ in range(int(input()) if True else 1):
	n = int(input())
	s = input()
	found = False
	c = 0
	for i in range(len(s) - 7, -1, -1):
		st = 'abacaba'
		if s[i:i + 7] == st:
			c += 1
	if c >= 2:
		print('NO')
		continue
	if c == 1:
		print('YES')
		print(s.replace('?', 'z'))
		continue
	if c == 0:
		s2 = s
		s3 = ''
		found = False
		for i in range(len(s) - 7, -1, -1):
			st = 'abacaba'
			pos = True
			s = list(s2)
			for j in range(i, i + 7):
				if s[j] == st[j - i]:
					continue
				elif s[j] == '?':
					s[j] = st[j - i]
					continue
				else:
					pos = False
					break
			s3 = ''.join(s)
			if getc(s3) == 1:
				found = True
				break
		if not found:
			print('NO')
		else:
			print('YES')
			print(s3.replace('?', 'z'))


for _ in range(int(input())):
	n = int(input())
	s = input()
	t = 'abacaba'
	count = lambda s: sum((s[i:i + 7] == t for i in range(n - 6)))
	if count(s) > 1:
		print('No')
	elif count(s) == 1:
		print('Yes')
		print(s.replace('?', 'z'))
	else:
		ans = ''
		for i in range(n - 6):
			flag = True
			for j in range(i, i + 7):
				if s[j] not in ['?', t[j - i]]:
					flag = False
					break
			if flag:
				z = s[:i] + t + s[i + 7:]
				z = z.replace('?', 'z')
				if count(z) == 1:
					ans = z
					break
		if ans:
			print('Yes')
			print(ans)
		else:
			print('No')


def solve(s, n):
	sub = 'abacaba'
	for i in range(n - 6):
		cond = True
		for j in range(7):
			if s[i + j] != '?' and s[i + j] != sub[j]:
				cond = False
				break
		if cond == False:
			continue
		elif cond == True:
			temp = s[:i] + sub + s[i + 7:]
			temp = temp.replace('?', 'z')
			if sum([1 if temp[i:i + 7] == sub else 0 for i in range(n - 6)]) == 1:
				print('Yes')
				print(temp)
				return
	print('No')
	return
for _ in range(int(input())):
	n = int(input())
	s = input()
	solve(s, n)


import sys
input = sys.stdin.readline
import heapq
import copy
import math
import decimal

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def insr2():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	mod = 1000000007
	limit = 10 ** 18
	ans = 0
	stack = []
	hashm = {}
	arr = []
	heapq.heapify(arr)
	for test in range(tests):

		def helper(s, target):
			count = 0
			itr = 0
			for i in range(len(s)):
				if s[i] == 'c':
					if i - 3 >= 0 and i + 3 < len(s):
						curr = s[i - 3:i + 4]
						if curr == target:
							count = count + 1
			if count != 1:
				return 0
			else:
				return 1
		n = inp()
		s1 = insr()
		s = copy.deepcopy(s1)
		target = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
		itr = 0
		flag = 0
		for i in range(3, len(s) - 3):
			curr = s[i - 3:i + 4]
			itr = 0
			found = 1
			for j in range(i - 3, i + 4):
				if s[j] == target[itr]:
					itr = itr + 1
				elif s[j] == '?':
					s[j] = target[itr]
					itr = itr + 1
				else:
					found = 0
					break
			if found == 1:
				a = helper(s, target)
				if a == 1:
					flag = 1
					break
			s = copy.deepcopy(s1)
			itr = 0
		if flag == 0:
			print('NO')
			continue
		for i in range(len(s)):
			if s[i] == '?':
				s[i] = 'z'
		print('YES')
		print(''.join(s))
main()


mark = 'abacaba'
nmark = len(mark)

def check(s):
	if len(s) != nmark:
		return False
	for i in range(nmark):
		if s[i] != mark[i] and s[i] != '?':
			return False
	return True

def count(s):
	return sum([1 for i in range(len(s)) if s[i:i + nmark] == mark])

def solve(n, input_string):
	for i in range(n):
		if check(input_string[i:i + nmark]):
			s = input_string[:i] + mark + input_string[i + nmark:]
			t = s.replace('?', 'x')
			if count(t) == 1:
				return 'YES\n{}'.format(t)
	return 'NO'
t = int(input())
ans = []
for _ in range(t):
	n = int(input())
	string = input()
	ans.append(solve(n, string))
print('\n'.join(ans))


for _ in range(int(input())):
	n = int(input())
	s = list(input())
	s1 = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
	c = 0
	c2 = 0
	s2 = []
	for i in range(n - 6):
		if s[i:i + 7] == s1:
			c += 1
	if c == 0:
		for i in range(n - 6):
			for j in range(7):
				if s[j + i] == '?' or s[j + i] == s1[j]:
					c1 = 1
				else:
					c1 = 0
					break
			if c1 == 1:
				c2 = 0
				s2 = s[:i] + s1 + s[i + 7:]
				for k in range(n - 6):
					if s2[k:k + 7] == s1:
						c2 += 1
			if c2 == 1:
				break
		s2 = ''.join(map(str, s2))
		s2 = s2.replace('?', 'z')
		if c2 == 1:
			print('Yes')
			print(s2)
		elif c2 == 0 or c2 > 1:
			print('No')
	elif c == 1:
		s = ''.join(map(str, s))
		s = s.replace('?', 'z')
		print('Yes')
		print(s)
	else:
		print('No')


from sys import *

def count(ss, n):
	cnt = 0
	for i in range(n - 7 + 1):
		if ss[i:i + 7] == 'abacaba':
			cnt += 1
	return cnt
t = int(stdin.readline())
ref = 'abacaba'
while t > 0:
	n = int(stdin.readline())
	s = stdin.readline()
	gf = False
	for i in range(n - 7 + 1):
		ss = list(s)
		flag = True
		for j in range(7):
			if ss[i + j] != '?' and ref[j] != ss[i + j]:
				flag = False
				break
			ss[i + j] = ref[j]
		ss = ''.join(ss)
		if flag and count(ss, n) == 1:
			ss = list(ss)
			for j in range(n):
				if ss[j] == '?':
					ss[j] = 'z'
			gf = True
			print('yes')
			print(''.join(ss), end='')
			break
	if gf == False:
		print('no')
	t -= 1


t = int(input())
n = 0
s = 'akj'

def hasa(i):
	if i % 2 == 0:
		return 'a'
	elif i == 3:
		return 'c'
	else:
		return 'b'

def replace(st, ed):
	global s
	l = []
	for i in range(7):
		if s[st + i] == '?':
			s = ''.join(s[:st + i] + hasa(i) + s[st + i + 1:])
			l.append(st + i)
	return l

def replace1(l):
	global s
	for i in l:
		s = ''.join(s[:i] + '?' + s[i + 1:])

def count():
	global s
	global n
	ct = 0
	for i in range(6, n):
		if s[i - 6:i + 1] == 'abacaba':
			ct = ct + 1
	return ct
for i in range(t):
	n = int(input())
	s = str(input())
	f = 0
	for i in range(6, n):
		l = replace(i - 6, i)
		ct = count()
		if ct == 1:
			s = s.replace('?', 'z')
			print('yes')
			print(s)
			f = 1
			break
		replace1(l)
	if f == 0:
		print('no')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	s = input().rstrip()
	hard = 0
	soft = 0
	indexes = []
	for i in range(n - 7 + 1):
		if 'abacaba' == s[i:i + 7]:
			hard += 1
		else:
			ok = True
			for (ch, ref) in zip(s[i:i + 7], 'abacaba'):
				if ch != ref and ch != '?':
					ok = False
			if ok:
				indexes.append(i)
				soft += 1
	if hard > 1:
		print('No')
		continue
	if hard == 0 and soft == 0:
		print('No')
		continue
	reps = s.replace('?', 'z')
	if hard == 1:
		print('Yes')
		print(reps)
		continue
	ok = False
	for index in indexes:
		ret = reps[:index] + 'abacaba' + reps[index + 7:]
		cnt = 0
		for i in range(n - 7 + 1):
			if 'abacaba' == ret[i:i + 7]:
				cnt += 1
		if cnt == 1:
			ok = True
			break
	if ok:
		print('Yes')
		print(ret)
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	ans = 'No'
	s1 = 'abacaba'
	a = 0
	b = 0
	for j in range(n - 6):
		if s[j] == '?' or s[j] == 'a':
			c = 0
			for k in range(7):
				if s[j + k] == s1[k] or s[j + k] == '?':
					c += 1
				else:
					break
			if c == 7:
				if s[j + 7:j + 11] != 'caba' and s[max(0, j - 4):j] != 'abac' and (s[j + 7:j + 13] != 'bacaba') and (s[max(0, j - 6):j] != 'abacab'):
					ans = 'Yes'
					a = j
					break
	for j in range(n - 6):
		if s[j:j + 7] == s1:
			b += 1
	if b == 1:
		l = list(s)
		for j in range(n):
			if l[j] == '?':
				l[j] = 'z'
		print('Yes')
		print(''.join(l))
	elif b > 1:
		print('No')
	else:
		print(ans)
		l = list(s)
		if ans == 'Yes':
			for j in range(a, a + 7):
				if l[j] == '?':
					l[j] = s1[j - a]
			for j in range(n):
				if l[j] == '?':
					l[j] = 'z'
			print(''.join(l))


o = 'abacaba'

def solve(s):
	occ = sum((s[i:i + len(o)] == o for i in range(len(s))))
	if occ == 1:
		return s.replace('?', 'z')
	elif occ > 1:
		return None
	for i in range(len(s) - len(o) + 1):
		if all((s[i + j] == o[j] or s[i + j] == '?' for j in range(len(o)))):
			if i - len(o) + 1 >= 0 and o[:-1] == s[i - len(o) + 1:i]:
				continue
			if i - len(o) + 3 >= 0 and o[:-3] == s[i - len(o) + 3:i]:
				continue
			if i + 2 * len(o) - 1 <= len(s) and o[1:] == s[i + len(o):i + 2 * len(o) - 1]:
				continue
			if i + 2 * len(o) - 3 <= len(s) and o[3:] == s[i + len(o):i + 2 * len(o) - 3]:
				continue
			res = s[:i] + o + s[i + len(o):]
			return res.replace('?', 'z')
	return None
t = int(input())
for _ in range(t):
	input()
	s = input()
	res = solve(s)
	if res:
		print('Yes')
		print(res)
	else:
		print('No')


search = 'abacaba'

def is_find(string, i):
	with_question = False
	if i + len(search) > len(string):
		return (False, False)
	for s in search:
		if string[i] == '?':
			with_question = True
		elif string[i] != s:
			return (False, False)
		i += 1
	return (True, with_question)

def check_left(string, i):
	s = string[0:i] + search + string[i + len(search):]
	from_ = i - len(search) if i > len(search) else 0
	for j in range(from_, i - 1):
		(f, q) = is_find(s, j)
		if f and (not q):
			return (False, s)
	for j in range(i + 1, i + len(string)):
		(f, q) = is_find(s, j)
		if f and (not q):
			return (False, s)
	return (True, s)

def solve():
	n = int(input())
	string = input()
	found = {}
	for i in range(n):
		ch = string[i]
		if ch == search[0] or ch == '?':
			(f, q) = is_find(string, i)
			if f:
				found[i] = q
	without_question = list(filter(lambda question: not question, found.values()))
	if len(without_question) == 1:
		return (True, string.replace('?', 'z'))
	if len(without_question) > 1:
		return (False, string)
	for i in found:
		(f, s) = check_left(string, i)
		if f:
			return (True, s.replace('?', 'z'))
	return (False, string)
t = int(input())
for c in range(t):
	(a, strng) = solve()
	if a:
		print('Yes')
		print(strng)
	else:
		print('No')


import os
import re
import sys
from io import BytesIO, IOBase
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def check(temp, test):
	for i in range(7):
		if temp[i] != test[i] and temp[i] != '?':
			return False
	return True

def verify(a, n, test):
	ans = 0
	for i in range(n - 6):
		if a[i:i + 7] == test:
			ans += 1
	return ans
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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))

def input():
	return sys.stdin.readline().rstrip('\r\n')
testCase = int(input())
test = 'abacaba'
for _ in range(testCase):
	flag = 0
	n = inp()
	s = input()
	for i in range(n - 6):
		if s[i] == 'a' or s[i] == '?':
			temp = s[i:i + 7]
			if check(temp, test):
				another = s[:i] + test + s[i + 7:]
				if verify(another, n, test) == 1:
					s = another
					flag = 1
					break
	if flag == 1:
		print('YES')
		for i in range(n):
			if s[i] == '?':
				print('z', end='')
			else:
				print(s[i], end='')
		print()
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	sub = 'abacaba'
	ans = ''
	cnt = 0
	for i in range(6, n):
		if s[i - 6:i + 1] == sub:
			cnt += 1
	if cnt > 1:
		print('No')
	elif cnt == 1:
		for i in range(n):
			if s[i] == '?':
				ans = ans + 'z'
			else:
				ans = ans + s[i]
		print('Yes')
		print(ans)
	else:
		arr = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
		sub = 'abacaba'
		flag = 0
		ans = ''
		f = 0
		for i in range(6, n):
			flag = 0
			s1 = s[i - 6:i + 1]
			ans = ''
			for j in range(7):
				if s1[j] != arr[j] and s1[j] != '?':
					flag = 1
					break
			if flag == 0:
				ans = ''
				k = 0
				for j in range(n):
					if i - 6 <= j <= i:
						ans = ans + arr[k]
						k += 1
					elif s[j] == '?':
						ans = ans + 'z'
					else:
						ans = ans + s[j]
				cnt = 0
				for j in range(6, n):
					if ans[j - 6:j + 1] == sub:
						cnt += 1
				if cnt == 1:
					f = 1
					break
		if f == 1:
			print('Yes')
			print(ans)
		else:
			print('No')


t = int(input(''))
while t > 0:
	n = int(input(''))
	s = input('')
	count = 0
	actual_count = 0
	ans = ''
	ans1 = 0
	possibles = []
	for i in range(n - 6):
		sub = s[i:i + 7]
		possible = s[:i]
		for x in range(7):
			if x == 0 or x == 2 or x == 4 or (x == 6):
				if not (sub[x] == 'a' or sub[x] == '?'):
					flag = 0
					break
				else:
					possible += 'a'
			elif x == 1 or x == 5:
				if not (sub[x] == 'b' or sub[x] == '?'):
					flag = 0
					break
				else:
					possible += 'b'
			elif not (sub[x] == 'c' or sub[x] == '?'):
				flag = 0
				break
			else:
				possible += 'c'
		else:
			flag = 1
		if flag == 1:
			count += 1
			possible += s[i + 7:]
			possibles.append(possible)
			if '?' not in sub:
				actual_count += 1
	if actual_count > 1:
		ans1 = 0
	elif actual_count == 1:
		ans1 = 1
		for i in s:
			if i == '?':
				ans += 'f'
			else:
				ans += i
	else:
		for p in possibles:
			p_count = 0
			for j in range(len(p) - 6):
				subp = p[j:j + 7]
				if subp == 'abacaba':
					p_count += 1
			if p_count == 1:
				ans1 = 1
				for i in p:
					if i == '?':
						ans += 'f'
					else:
						ans += i
				break
	if ans1 == 0:
		print('No')
	else:
		print('Yes')
		print(ans)
	t -= 1


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	s = input()
	s = list(s)
	req = 'abacaba'
	req = list(req)
	i = 0
	ct = 0
	while i < n - 6:
		f = 0
		if s[i] == 'a':
			f = 1
			tem = s[i:i + 7]
			j = 0
			while j < 7:
				f = 0
				if tem[j] != req[j]:
					break
				if tem[j] == req[j]:
					f = 1
				j += 1
			if j == 7:
				j = 0
				ct += 1
		i += 1
	if ct > 1:
		print('No')
		continue
	if ct == 1:
		i = 0
		string = ''
		while i < n:
			if s[i] == '?':
				s[i] = 'z'
			string += s[i]
			i += 1
		print('Yes')
		print(string)
		continue

	def check(temp):
		req = 'abacaba'
		req = list(req)
		p = 0
		while p < 7:
			if temp[p] != req[p] and temp[p] != '?':
				return False
			if temp[p] == req[p] or temp[p] == '?':
				p += 1
			if p == 7:
				return True
	i = 0
	while i < n - 6:
		flag = 0
		if s[i] == 'a' or s[i] == '?':
			temp = s[i:i + 7]
			val = check(temp)
			if val == False:
				flag = 0
			if val == True:
				bef = s[:i]
				aft = s[i + 7:]
				sfinal = bef + req + aft
				y = 0
				ct = 0
				while y < n - 6:
					f = 0
					if sfinal[y] == 'a':
						f = 1
						tem = sfinal[y:y + 7]
						j = 0
						while j < 7:
							f = 0
							if tem[j] != req[j]:
								break
							if tem[j] == req[j]:
								f = 1
							j += 1
						if j == 7:
							j = 0
							ct += 1
					y += 1
				if ct > 1:
					flag = 0
				if ct == 1:
					z = 0
					string = ''
					while z < n:
						if sfinal[z] == '?':
							sfinal[z] = 'z'
						string += sfinal[z]
						z += 1
					print('Yes')
					print(string)
					flag = 1
					break
		i += 1
	if flag == 1:
		continue
	if flag == 0:
		print('No')


import re
cases = int(input())
output = ''
for t in range(cases):
	n = int(input())
	s = input()
	f1 = s.find('abacaba')
	f2 = s.find('abacaba', f1 + 1)
	if f1 > -1 and f2 > -1:
		output += 'No\n'
	elif f1 > -1:
		if '?' in s:
			s = s.replace('?', 'm')
		output += 'Yes\n' + s + '\n'
	else:
		rp = '(a|\\?)(b|\\?)(a|\\?)(c|\\?)(a|\\?)(b|\\?)(a|\\?)'
		f = 0
		for i in range(n - 6):
			s1 = s[i:i + 7]
			v = re.search(rp, s1)
			if v:
				vf = v
				start = i
				end = i + 7
				s2 = s
				s2 = s2.replace('?', 'm')
				s2 = s2[:start] + 'abacaba' + s2[end:]
				f4 = s2.find('abacaba')
				f3 = s2.find('abacaba', f4 + 1)
				if f4 > -1 and f3 > -1:
					continue
				else:
					output += 'Yes\n' + s2 + '\n'
					f = 1
					break
		if f == 0:
			output += 'No\n'
print(output)


from sys import stdin, stdout, setrecursionlimit
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log, log2
from random import seed, randint
from datetime import datetime
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
from collections import defaultdict as dd
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def def_value():
	return 0

def def_inf():
	return inf

def cnt(s, x):
	c = 0
	for i in range(n - 6):
		if s[i:i + 7] == x:
			c += 1
	return c
for _ in range(iinp()):
	n = iinp()
	s = inp()
	x = 'abacaba'
	c = cnt(s, x)
	if c > 1:
		print('NO')
	elif c == 1:
		ans = ''
		for i in range(n):
			if s[i] == '?':
				ans += 'x'
			else:
				ans += s[i]
		print('YES')
		print(ans)
	else:
		ans = ''
		flg = False
		for i in range(n - 6):
			ans = ''
			f = True
			for j in range(7):
				if s[i + j] != x[j] and s[i + j] != '?':
					f = False
					break
			if f:
				for j in range(i):
					if s[j] == '?':
						ans += 'x'
					else:
						ans += s[j]
				ans += x
				for j in range(i + 7, n):
					if s[j] == '?':
						ans += 'x'
					else:
						ans += s[j]
				if cnt(ans, x) == 1:
					flg = True
					break
		if flg:
			print('YES')
			print(ans)
		else:
			print('NO')


from collections import deque
import sys

def inp():
	return sys.stdin.readline().strip()
global s, target, tval, res

def check(s):
	global target, tval, res
	f = 0
	val = 0
	mul = 1
	for i in range(7):
		val += mul * (ord(s[i]) - ord('a') + 1)
		mul *= 29
	mul //= 29
	for i in range(7, len(s)):
		if val == tval:
			f += 1
		val -= ord(s[i - 7]) - ord('a') + 1
		val //= 29
		val += (ord(s[i]) - ord('a') + 1) * mul
	if val == tval:
		f += 1
	if f == 1:
		res = list(s)
	return f == 1
for _ in range(int(inp())):
	n = int(inp())
	s = inp()
	res = []
	s = [i for i in s]
	target = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
	tval = 0
	mul = 1
	for i in target:
		tval += mul * (ord(i) - ord('a') + 1)
		mul *= 29
	found = False
	for i in range(n - 7 + 1):
		f = True
		pairs = []
		for j in range(7):
			if s[i + j] == '?':
				pairs.append((i + j, target[j]))
			elif s[i + j] != target[j]:
				f = False
				break
		if not f:
			continue
		temp = list(s)
		for p in pairs:
			temp[p[0]] = p[1]
		if check(temp):
			found = True
			res = list(temp)
			break
	if found:
		print('yes')
		for i in range(n):
			if res[i] == '?':
				res[i] = 'd'
		print(''.join(res))
	else:
		print('No')


base = 'abacaba'
t = int(input())
for case in range(t):
	n = int(input())
	s = input()
	rep = s.replace('?', 'd')
	ans = ''
	for i in range(n - 6):
		bl = True
		for (e1, e2) in zip(s[i:i + 7], base):
			if e1 == '?':
				continue
			if e1 != e2:
				bl = False
		if bl:
			cnd = rep[:i] + base + rep[i + 7:]
			cnt = 0
			for j in range(n - 6):
				if cnd[j:j + 7] == base:
					cnt += 1
			if cnt == 1:
				ans = cnd
	if ans:
		print('Yes')
		print(ans)
	else:
		print('No')


abacaba = 'abacaba'

def check_once(s, i):
	s = s[:i] + abacaba + s[i + len(abacaba):]
	idx = s.find(abacaba)
	if idx != i:
		return False
	if s.find(abacaba, i + 1) != -1:
		return False
	return True

def solve(s):
	for i in range(len(s)):
		cur_cnt = 0
		if i + len(abacaba) <= len(s):
			for j in range(len(abacaba)):
				if s[i + j] == '?' or s[i + j] == abacaba[j]:
					cur_cnt += 1
		if cur_cnt == len(abacaba) and check_once(s, i):
			return i
	return -1
for _ in range(int(input())):
	n = int(input())
	s = input()
	cnt = 0
	idx = s.find(abacaba)
	if idx == -1:
		ans = solve(s)
		if ans == -1:
			print('NO')
		else:
			s = s[:ans] + abacaba + s[ans + len(abacaba):]
			s = s.replace('?', 'd')
			print('YES')
			print(s)
	elif s.find(abacaba, idx + 1) == -1:
		print('YES')
		print(s.replace('?', 'd'))
	else:
		print('NO')


from os import path
import sys
from heapq import heappush, heappop
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')
file = 1

def solve():
	for _ in range(ii()):
		n = ii()
		s = list(si())
		x = 'abacaba'
		f1 = 0
		for i in range(n - 6):
			s1 = s[i:i + 7]
			f = 0
			for j in range(7):
				if s1[j] == '?' or s1[j] == x[j]:
					pass
				else:
					f = 1
					break
			if f == 0:
				tmp = ['0'] * n
				for j in range(i):
					if s[j] == '?':
						tmp[j] = 'z'
					else:
						tmp[j] = s[j]
				for j in range(i, i + 7):
					tmp[j] = x[j - i]
				for j in range(i + 7, n):
					if s[j] == '?':
						tmp[j] = 'z'
					else:
						tmp[j] = s[j]
				cnt = 0
				for j in range(n - 6):
					s1 = ''.join(tmp[j:j + 7])
					if s1 == x:
						cnt += 1
				if cnt == 1:
					f1 = 1
					break
		if f1:
			print('YES')
			print(''.join(tmp))
		else:
			print('NO')
if file:
	if path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
from collections import defaultdict
from itertools import permutations
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')
for _ in range(int(input())):
	n = int(input())
	s = input()
	c = 'abacaba'
	d = list(c)
	ct1 = 0
	ct2 = 0
	for i in range(n - 6):
		if s[i:i + 7] == c:
			ct1 += 1
		else:
			k = 0
			corr = 0
			for j in range(i, i + 7):
				if s[j] == c[k] or s[j] == '?':
					corr += 1
				k += 1
			if corr == 7:
				ct2 += 1
	if ct1 > 1 or (ct1 == 0 and ct2 == 0):
		print('No')
	elif ct1 == 1:
		print('Yes')
		for i in s:
			if i == '?':
				print('z', end='')
			else:
				print(i, end='')
		print()
	else:
		r = list(s)
		count = 0
		for i in range(n - 6):
			k = 0
			corr = 0
			q = 0
			for j in range(i, i + 7):
				if r[j] == c[k] or r[j] == '?':
					corr += 1
				k += 1
			if corr == 7:
				temp = list(s)
				t1 = 0
				k = 0
				for j in range(i, i + 7):
					if temp[j] == '?':
						temp[j] = c[k]
					k += 1
				k = 0
				for j in range(n - 6):
					if temp[j:j + 7] == d:
						t1 += 1
				if t1 == 1:
					count += 1
					k = 0
					for j in range(i, i + 7):
						if r[j] == '?':
							r[j] = c[k]
						k += 1
			if count > 0:
				break
		for i in range(n):
			if r[i] == '?':
				r[i] = 'z'
		if count == 0:
			print('No')
		else:
			print('Yes')
			print(*r, sep='')


pat = 'abacaba'

def substring_count(string):
	count = 0
	start = 0
	while start < len(string):
		pos = string.find(pat, start)
		if pos != -1:
			start = pos + 1
			count += 1
		else:
			break
	return count

def process(s, n):
	for i in range(n + 1 - 7):
		temp = s
		flag = True
		for j in range(7):
			if temp[i + j] != '?' and temp[i + j] != pat[j]:
				flag = False
				break
			else:
				temp = temp[:i + j] + pat[j] + temp[i + j + 1:]
		if flag and substring_count(temp) == 1:
			return temp

def solve():
	n = int(input())
	s = str(input())
	if substring_count(s) == 1:
		for i in range(len(s)):
			if s[i] == '?':
				s = s[:i] + 'x' + s[i + 1:]
			else:
				s[i]
		print('Yes')
		print(s)
	elif substring_count(s) > 1:
		print('No')
	elif process(s, n):
		res = process(s, n)
		for i in range(len(res)):
			if res[i] == '?':
				res = res[:i] + 'x' + res[i + 1:]
			else:
				res[i]
		print('Yes')
		print(res)
	else:
		print('No')

def main():
	test_case = int(input())
	while test_case != 0:
		solve()
		test_case = test_case - 1
main()


import sys
input = sys.stdin.readline
read = lambda : map(int, input().split())
read_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(councils, a, k):
	summ = 0
	for x in a:
		summ += min(x, councils)
	return summ // councils >= k
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys

def contains(s):
	s = list(s)
	c = 0
	for i in range(len(s) - 6):
		if ''.join(s[i:i + 7]) == 'abacaba':
			c += 1
	return c

def process(s):
	ans = ''
	for x in s:
		if x == '?':
			ans = ans + 'd'
		else:
			ans = ans + x
	return ans

def solve():
	n = int(input())
	s = input().rstrip()
	c = contains(s)
	if c == 1:
		print('YES')
		print(process(s))
		return
	if c > 1:
		print('NO')
		return
	t = 'abacaba'
	for i in range(n - 6):
		string = list(s)
		f = True
		for j in range(7):
			if string[i + j] != '?' and string[i + j] != t[j]:
				f = False
				break
			string[i + j] = t[j]
		if f and contains(string) == 1:
			print('YES')
			print(process(string))
			return
	print('NO')
for _ in range(int(input())):
	solve()


def compare(temp, s):
	for i in range(len(s)):
		if temp[i] == s[i] or temp[i] == '?':
			continue
		else:
			return False
	return True

def contains(s):
	n = len(s)
	aux = 'abacaba'
	count = 0
	for i in range(n - 6):
		temp = s[i:i + 7]
		if temp == aux:
			count += 1
	return count == 1

def string(s):
	count = 0
	n = len(s)
	t = 'abacaba'
	for i in range(n - 6):
		temp = s[i:i + 7]
		if temp == t:
			count += 1
	res = ''
	if count:
		if count > 1:
			print('NO')
			return
		else:
			for i in range(n):
				if s[i] == '?':
					res += 'd'
				else:
					res += s[i]
			print('YES')
			print(res)
			return
	for i in range(n - 6):
		temp = s[i:i + 7]
		if compare(temp, t):
			left = s[:i]
			right = s[i + 7:]
			for i in range(len(left)):
				if left[i] == '?':
					res += 'd'
				else:
					res += left[i]
			res = res + t
			for i in range(len(right)):
				if right[i] == '?':
					res += 'd'
				else:
					res += right[i]
			if contains(res):
				print('YES')
				print(res)
				return
			else:
				res = ''
	print('NO')
	return
t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	string(s)


def CountOccurrences(string, substring):
	count = 0
	start = 0
	while start < len(string):
		pos = string.find(substring, start)
		if pos != -1:
			start = pos + 1
			count += 1
		else:
			break
	return count
for _ in range(int(input())):
	n = int(input())
	s = input()
	temp = 'abacaba'
	count = 0
	f = 0
	for i in range(n - len(temp) + 1):
		tmp = list(s)
		f = 1
		for j in range(len(temp)):
			if tmp[i + j] != '?' and tmp[i + j] != temp[j]:
				f = 0
				break
			tmp[i + j] = temp[j]
		tmp = ''.join(tmp)
		if f == 1 and CountOccurrences(tmp, temp) == 1:
			tmp = list(tmp)
			for k in range(n):
				if tmp[k] == '?':
					tmp[k] = 'z'
			f = 1
			print('Yes')
			print(''.join(tmp))
			break
		else:
			f = 0
	if f == 0:
		print('No')


def calc(s, t='abacaba'):
	if s == '':
		return 0
	count = 0
	for i in range(len(s)):
		ind = 0
		if s[i] == t[ind]:
			j = i
			while s[j] == t[ind]:
				j += 1
				ind += 1
				if j == len(s) or ind == len(t):
					break
			if ind == len(t):
				count += 1
	return count

def xz(s, t='abacaba'):
	index = 0
	variations = []
	while index < len(s):
		pos_s = index
		pos_t = 0
		s_answ = ''
		while s[pos_s] == t[pos_t] or s[pos_s] == '?':
			s_answ += t[pos_t] if s[pos_s] == '?' else s[pos_s]
			pos_s += 1
			pos_t += 1
			if pos_s == len(s) or pos_t == len(t):
				break
		if pos_t == len(t):
			s_answ = s[:index] + s_answ + s[index + len(t):]
			variations.append(s_answ)
		index += 1
	return variations
t = int(input())
while t:
	n = int(input())
	s = input()
	variations = xz(s)
	answ = ''
	for var in variations:
		ch = var.replace('?', 'z')
		if calc(ch) == 1:
			answ = ch
			break
	if answ == '':
		print('no')
	else:
		print('yes')
		print(answ)
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	ans = []
	v = 0
	m = 'abacaba'
	for i in range(n - len(m) + 1):
		if s[i:i + len(m)] == m:
			v = v + 1
	if v > 1:
		print('NO')
	elif v == 1:
		for i in range(n):
			if s[i] == '?':
				s = s[:i] + 'z' + s[i + 1:]
		print('YES')
		print(s)
	else:
		for i in range(n - len(m) + 1):
			for j in range(len(m)):
				if s[i + j] != m[j] and s[i + j] != '?':
					break
				elif j == len(m) - 1:
					ans.append(i)
		p = 0
		for i in range(len(ans)):
			st = s
			st = st[:ans[i]] + m + st[ans[i] + len(m):]
			p = 0
			for j in range(n - len(m) + 1):
				for k in range(len(m)):
					if st[j + k] != m[k]:
						break
					if k == len(m) - 1:
						p = p + 1
			if p == 1:
				s = st
				break
		if p == 0 or p > 1:
			print('NO')
		else:
			for i in range(n):
				if s[i] == '?':
					s = s[:i] + 'z' + s[i + 1:]
			print('YES')
			print(s)


import sys
input = sys.stdin.readline

def check(N, S, k):
	ABA = 'abacaba'
	for j in range(7):
		S[k + j] = ABA[j]
	ans = 0
	for i in range(N - 6):
		c_flag = True
		for j in range(7):
			if S[i + j] != ABA[j]:
				c_flag = False
		if c_flag:
			ans += 1
	if ans == 1:
		print('Yes')
		for i in range(N):
			if S[i] == '?':
				S[i] = 'z'
		print(''.join(S))
		return True
	return False

def solution():
	N = int(input())
	S = list(input().rstrip())
	ABA = 'abacaba'
	idx = []
	for i in range(N - 6):
		c_flag = True
		for j in range(7):
			if S[i + j] != '?' and S[i + j] != ABA[j]:
				c_flag = False
		if c_flag:
			idx.append(i)
	for i in idx:
		if check(N, S[:], i):
			return
	print('No')
T = int(input())
for _ in range(T):
	solution()


def counter(s):
	t = 'abacaba'
	count = 0
	for i in range(len(s) - len(t) + 1):
		if s[i:i + len(t)] == t:
			count = count + 1
	return count

def solve():
	q = input()
	s = input()
	t = 'abacaba'
	n = len(s)
	m = len(t)
	count = 0
	for i in range(len(s) - len(t) + 1):
		if s[i:i + m] == t:
			count = count + 1
	if count < 1:
		p = True
		for i in range(n - m + 1):
			cond = True
			ss = s
			for j in range(m):
				if s[i + j] != '?' and s[i + j] != t[j]:
					cond = False
					break
			if cond:
				ss = s[:i] + t + s[i + m:]
				if counter(ss) == 1:
					ss = ss.replace('?', 'd')
					print('Yes')
					print(ss)
					p = False
					break
			if p == False:
				break
		if p == True:
			print('No')
	elif count == 1:
		s = s.replace('?', 'd')
		print('Yes')
		print(s)
	else:
		print('No')
for _ in range(int(input())):
	solve()


def checkAngela(ans):
	count = 0
	s = 'abacaba'
	n = len(ans)
	for i in range(n - 6):
		if ''.join(ans[i:i + 7]) == s:
			count += 1
	if count == 1:
		return True
	return False

def main():
	for _ in range(int(input())):
		n = int(input())
		a = input()
		s = 'abacaba'
		count = 0
		for i in range(n - 6):
			if a[i:i + 7] == s:
				count += 1
		if count > 1:
			print('NO')
			continue
		if count == 1:
			print('YES')
			ans = ''
			for v in a:
				if v == '?':
					ans += 'd'
				else:
					ans += v
			print(ans)
		else:
			darci = 0
			for i in range(n - 6):
				j = 0
				while j < 7:
					if s[j] == a[i + j] or a[i + j] == '?':
						j += 1
					else:
						break
				if j == 7:
					ans = list(a[:i] + s + a[i + 7:])
					for i in range(n):
						if ans[i] == '?':
							ans[i] = 'd'
					if checkAngela(ans):
						darci = 1
						print('YES')
						print(''.join(ans))
						break
			if darci == 0:
				print('NO')
main()


sa = 'abacaba'

def count(s):
	return sum([int(s[i:i + 7] == sa) for i in range(n - 6)])
for l in range(int(input())):
	n = int(input())
	s = input()
	for i in range(n - 6):
		z = s[:i] + ''.join([s[j] if s[j] != '?' else sa[j - i] for j in range(i, i + 7)]) + s[i + 7:]
		z = z.replace('?', 'z')
		if count(z) == 1:
			print('Yes', z, sep='\n')
			break
	else:
		print('No')


from sys import stdin

def count(string, substring):
	count = 0
	start = 0
	while start < len(string):
		pos = string.find(substring, start)
		if pos != -1:
			start = pos + 1
			count += 1
		else:
			break
	return count
for _ in range(int(input())):
	n = int(input())
	s = 'abacaba'
	r = input()
	x = count(r, s)
	if x > 1:
		print('No')
		continue
	if x == 1:
		r = list(r)
		for i in range(n):
			if r[i] == '?':
				r[i] = 'z'
		print('Yes')
		print(''.join(r))
		continue
	r = list(r)
	lis = []
	for i in range(n - 6):
		lis.append(r[:])
	for i in range(n - 6):
		for j in range(7):
			if lis[i][i + j] == s[j] or lis[i][i + j] == '?':
				lis[i][i + j] = s[j]
				continue
			break
		for k in range(n):
			if lis[i][k] == '?':
				lis[i][k] = 'z'
	for i in lis:
		x = ''.join(i)
		c = count(x, s)
		if c == 1:
			print('Yes')
			print(x)
			break
	else:
		print('No')


t = 'abacaba'
m = len(t)
valid = lambda s: all((a in [b, '?'] for (a, b) in zip(s, t)))
cnt = lambda s: sum((int(s[i:i + m] == t) for i in range(len(s) - m + 1)))
for _ in range(int(input())):
	n = int(input())
	s = input()
	if cnt(s) > 1:
		print('NO')
		continue
	res = ''
	for i in range(n - m + 1):
		if not valid(s[i:i + m]):
			continue
		new_string = s[:i] + t + s[i + m:]
		if cnt(new_string) == 1:
			res = new_string
			break
	if res:
		print('YES')
		print(res.replace('?', 'z'))
	else:
		print('NO')


def si():
	return int(input())

def mp():
	return map(int, input().split())
s = 'abacaba'

def check(s, s1):
	for i in range(7):
		if s[i] == s1[i] or s1[i] == '?':
			pass
		else:
			return 0
	return 1
for _ in range(si()):
	a = si()
	b = input()
	ans = ''
	for j in range(a - 6):
		s1 = b[j:j + 7]
		if check(s, s1):
			q = b[:j] + s + b[j + 7:]
			q = q.replace('?', 'z')
			t = 0
			for count in range(a - 6):
				if q[count:count + 7] == s:
					t += 1
			if t == 1:
				ans = 'YES'
				b = q
	if ans:
		print('YES')
		print(b)
	else:
		print('NO')


t = int(input())
for test in range(t):
	n = int(input())
	s = input()
	target = 'abacaba'
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == 'abacaba':
			cnt += 1
	res = ''
	pos = False
	if cnt == 0:
		for i in range(len(s) - 6):
			valid = True
			for j in range(7):
				if s[i + j] != target[j] and s[i + j] != '?':
					valid = False
			if valid:
				corner = False
				if i >= 6:
					if s[i - 6:i] == target[0:6]:
						corner = True
				if i >= 4:
					if s[i - 4:i] == target[0:4]:
						corner = True
				if i + 13 <= n:
					if s[i + 7:i + 13] == target[1:7]:
						corner = True
				if i + 11 <= n:
					if s[i + 7:i + 11] == target[3:7]:
						corner = True
				if not corner:
					res = s[0:i] + target + s[i + 7:len(s)]
					pos = True
					break
	elif cnt == 1:
		res = s
		pos = True
	if pos:
		fres = ''
		for i in range(n):
			if res[i] == '?':
				fres += 'z'
			else:
				fres += res[i]
		print('YES')
		print(fres)
	else:
		print('NO')


vall = 'abacaba'
t = int(input())
for hh in range(0, t):
	n = int(input())
	s = input()
	done = 0
	for i in range(0, n - 6):
		s3 = ''
		s3 += s
		s2 = list(s3)
		flag = 0
		for j in range(0, 7):
			if s2[i + j] == vall[j]:
				continue
			elif s2[i + j] == '?':
				s2[i + j] = vall[j]
				continue
			else:
				flag = 1
				break
		if flag == 1:
			continue
		for j in range(0, n):
			if s2[j] == '?':
				s2[j] = 'z'
		cnt = 0
		for k in range(0, n - 6):
			flag = 0
			for j in range(0, 7):
				if s2[k + j] == vall[j]:
					continue
				elif s2[k + j] == '?':
					continue
				else:
					flag = 1
					break
			if flag == 0:
				cnt += 1
		if cnt == 1:
			print('Yes')
			print(''.join(s2))
			done = 1
			break
	if done != 1:
		print('No')


import sys

def input():
	return sys.stdin.readline().rstrip()

def input_split():
	return [int(i) for i in input().split()]
testCases = int(input())
answers = []

def count_string_in_other(s, to_find):
	count = 0
	for i in range(len(s) - len(to_find) + 1):
		if s[i:i + len(to_find)] == to_find:
			count += 1
	return count
for _ in range(testCases):
	n = int(input())
	s = input()
	original = s
	x = s.count('abacaba')
	desired = 'abacaba'
	ans = None
	count = 0
	for i in range(n - 6):
		temp = ''
		can_be = True
		for j in range(7):
			if not (desired[j] == original[i + j] or original[i + j] == '?'):
				can_be = False
				break
		if can_be:
			temp = s[:i] + desired + s[i + 7:]
			temp = temp.replace('?', 'z')
			if count_string_in_other(temp, desired) == 1:
				ans = 'YES\n' + temp
				break
	if ans is None:
		ans = 'NO'
	answers.append(ans)
print(*answers, sep='\n')


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	s = str(stdin.readline().strip('\n'))
	n = len(s)
	cs = 'abacaba'
	chk = False
	ans = ''
	cnt = 0
	for i in range(n - 7 + 1):
		tmp = s[i:i + 7]
		if tmp == cs:
			cnt += 1
	if cnt >= 2:
		chk = False
	elif cnt == 1:
		chk = True
		for i in s:
			if i != '?':
				ans += i
			else:
				ans += 'd'
	else:
		for j in range(n - 7 + 1):
			tmp = s[j:j + 7]
			c2 = True
			for i in range(len(tmp)):
				if tmp[i] != '?':
					if tmp[i] != cs[i]:
						c2 = False
						break
			if c2:
				for k in range(j):
					if s[k] != '?':
						ans += s[k]
					else:
						ans += 'd'
				ans += cs
				for k in range(len(ans), len(s)):
					if s[k] != '?':
						ans += s[k]
					else:
						ans += 'd'
				cn = 0
				for i in range(n - 7 + 1):
					tmp = ans[i:i + 7]
					if tmp == cs:
						cn += 1
				if cn == 1:
					chk = True
					break
				else:
					ans = ''
	if chk:
		print('YES')
		print(ans)
	else:
		print('NO')


import math
from collections import defaultdict, deque
from bisect import bisect_left, bisect_right
from sys import stdin

def mp():
	return map(int, stdin.readline().split())

def ml():
	return list(map(int, stdin.readline().split()))
toFind = 'abacaba'

def cntStr(st, sst=toFind):
	(count, start) = (0, 0)
	while start < len(st):
		pos = st.find(sst, start)
		if pos != -1:
			start = pos + 1
			count += 1
		else:
			break
	return count

def canMake(pat):
	if len(pat) < 7:
		return False
	flag = True
	for i in range(7):
		if pat[i] == toFind[i] or pat[i] == '?':
			continue
		else:
			flag = False
			break
	return flag
for _ in range(int(input())):
	n = int(input())
	s = input()
	cnt = cntStr(s, toFind)
	if cnt > 1:
		print('No')
	elif cnt == 1:
		print('Yes')
		print(s.replace('?', 'z'))
	else:
		ans = ''
		for i in range(n - 6):
			if canMake(s[i:i + 7]) and cntStr(s[:i] + toFind + s[i + 7:]) == 1:
				ans = s[:i] + toFind + s[i + 7:]
				break
		if ans != '':
			print('Yes')
			print(ans.replace('?', 'z'))
		else:
			print('No')


from sys import stdin, stdout

def check(string):
	f = 0
	for xx in range(len(s) - 6):
		if string[xx:xx + 7] == 'abacaba':
			f += 1
	return f

def is_abacaba(l, r):
	global s
	st = 'abacaba'
	for k in range(l, r):
		if s[k] != st[k - l] and s[k] != '?':
			return False
	return True
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	s = stdin.readline().strip()
	fl = check(s)
	if fl >= 2:
		stdout.write('No\n')
	elif fl == 1:
		stdout.write('Yes\n')
		stdout.write(s.replace('?', 'd') + '\n')
	else:
		fl = 1
		for i in range(len(s) - 6):
			if is_abacaba(i, i + 7):
				fin = s[:i].replace('?', 'd') + 'abacaba' + s[i + 7:].replace('?', 'd')
				if check(fin) == 1:
					fl = 0
					stdout.write('Yes\n')
					stdout.write(fin + '\n')
					break
		if fl:
			stdout.write('No\n')


def count(list1):
	p = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
	i = 0
	count = 0
	while i <= len(list1) - 7:
		temp = list1[i:i + 7]
		if temp == p:
			count += 1
		i += 1
	return count
t = int(input())
while t != 0:
	n = int(input())
	s = list(input())
	p = count(s)
	if p > 1:
		print('NO')
	elif p == 1:
		for i in range(len(s)):
			if s[i] == '?':
				s[i] = 'z'
		print('YES')
		print(*s, sep='')
	else:
		done = 0
		for i in range(len(s) - 6):
			tt = 'abacaba'
			if s[i] == 'a' or s[i] == '?':
				k = 0
				lot = []
				for j in range(i, i + 7):
					lot.append(s[j])
					if s[j] == '?':
						s[j] = tt[k]
					k += 1
				temp = count(s)
				if temp == 1:
					for j in range(len(s)):
						if s[j] == '?':
							s[j] = 'z'
					done = 1
					break
				else:
					k = 0
					for j in range(i, i + 7):
						s[j] = lot[k]
						k += 1
		if done == 1:
			print('YES')
			print(*s, sep='')
		else:
			print('NO')
	t -= 1


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
from typing import List
mark = 'abacaba'
nmark = len(mark)

def check(s):
	if len(s) != nmark:
		return False
	for i in range(len(mark)):
		if s[i] != mark[i] and s[i] != '?':
			return False
	return True

def count(s):
	return sum([1 for i in range(len(s)) if s[i:i + nmark] == mark])

def solve(N, S):
	for i in range(N):
		if check(S[i:i + len(mark)]):
			s = S[:i] + mark + S[i + nmark:]
			t = s.replace('?', 'x')
			if count(t) == 1:
				return 'YES\n{}'.format(t)
	return 'NO'
T = int(input())
ans = []
for ti in range(T):
	N = int(input())
	S = input()
	ans.append(solve(N, S))
print('\n'.join(ans))


for _ in range(int(input())):
	n = int(input())
	s = input()
	ct = 0
	t = 'abacaba'
	for i in range(len(s) - 6):
		if s[i:i + 7] == t:
			ct += 1
			if ct > 1:
				break
	if ct == 1:
		print('Yes')
		print(s.replace('?', 'z'))
	elif ct == 0:
		lf = -1
		for i in range(len(s) - 6):
			cflag = True
			for j in range(i, i + 7):
				if s[j] != t[j - i] and s[j] != '?':
					cflag = False
					break
			if cflag == True:
				rflag = True
				for k in range(1, min(7, 1 + len(s) - i - 7)):
					if t[k:] + s[i + 7:i + 7 + k] == t:
						rflag = False
						break
				for k in range(1, min(i + 1, 7)):
					if s[i - k:i] + t[:7 - k] == t:
						rflag = False
						break
				if rflag == True:
					lf = i
					ct = 1
					break
		if ct == 1:
			print('Yes')
			print((s[:lf] + t + s[lf + 7:]).replace('?', 'z'))
		else:
			print('No')
	else:
		print('No')


t = int(input())
pat = 'abacaba'
for _ in range(t):
	n = int(input())
	s = str(input())
	f = 0
	for i in range(n - 6):
		flg = 0
		for j in range(7):
			flg = 1 if s[i + j] != pat[j] and s[i + j] != '?' else flg
		if flg == 1:
			continue
		ss = ''.join(s[:i] + pat + s[i + 7:])
		if sum([1 if ss[i:i + 7] == pat else 0 for i in range(n - 6)]) == 1:
			ss = ss.replace('?', 'z')
			f = 1
			print('yes\n' + ss)
			break
	if f == 0:
		print('no')


for testcase in range(int(input())):
	n = int(input())
	s = input().strip()
	if n < 7:
		print('no')
		continue
	ans = ''
	for i in range(n - 6):
		assignable = True
		for (u, v) in zip(s[i:], 'abacaba'):
			if u not in v + '?':
				assignable = False
				break
		if not assignable:
			continue
		t = s[:i] + 'abacaba' + s[i + 7:]
		cnt = 0
		for pos in range(n - 6):
			if t[pos:pos + 7] == 'abacaba':
				cnt += 1
		if cnt == 1:
			ans = t.replace('?', 'd')
			break
	if len(ans) == 0:
		print('no')
	else:
		print('yes')
		print(ans)


t = 'abacaba'

def match(s1, s):
	for i in range(len(s1)):
		if s1[i] != t[i] and s1[i] != '?':
			return False
	return True

def solve():
	if s.find(t) != s.rfind(t):
		return False
	if s.find(t) >= 0:
		return s.replace('?', 'z')
	else:
		for i in range(n - 6):
			if match(s[i:i + 7], s):
				k = s[:i] + t + s[i + 7:]
				if k.find(t) == k.rfind(t):
					return k.replace('?', 'z')
		return False
for _ in range(int(input())):
	n = int(input())
	s = input()
	ans = solve()
	if ans:
		print('Yes')
		print(ans)
	else:
		print('No')


a = input()
for x in range(int(a)):
	b = input()
	c = input()
	c_count = 0
	for i in range(len(c) - 6):
		if c[i:].startswith('abacaba'):
			c_count = c_count + 1
	if c_count > 1:
		print('NO')
	elif c_count == 1:
		if c.count('?') == 0:
			print('YES')
			print(c)
		else:
			c = c.replace('?', 'z')
			print('YES')
			print(c)
	else:
		ans = 0
		tag = 'abacaba'
		for i in range(len(c) - 6):
			tagc = [j for j in c]
			c_count = 0
			buffer = []
			q = 0
			if tagc[i] == 'a' or tagc[i] == '?':
				for j in range(0, 7):
					if tagc[i + j] == tag[j]:
						pass
					elif tagc[i + j] == '?':
						buffer.append([i + j, tag[j]])
					else:
						break
					q += 1
				if q == 7:
					for (t1, t2) in buffer:
						tagc[t1] = t2
					tagc = ''.join(tagc)
					for g in range(len(tagc)):
						if tagc[g:].startswith('abacaba'):
							c_count = c_count + 1
			if c_count == 1:
				tagc = tagc.replace('?', 'z')
				ans = 1
				break
		if ans == 1:
			print('YES')
			print(tagc)
		else:
			print('NO')


import os

def calc(s):
	count = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == ['a', 'b', 'a', 'c', 'a', 'b', 'a']:
			count += 1
		if count > 1:
			return False
	if count == 1:
		return True
	else:
		return False
t = int(input())
while t:
	t -= 1
	n = int(input())
	s = input()
	if 'abacaba' in s:
		count = 0
		for i in range(n - 6):
			if s[i:i + 7] == 'abacaba':
				count += 1
		if count == 1:
			print('YES')
			for i in range(n):
				if s[i] == '?':
					print('z', end='')
				else:
					print(s[i], end='')
		else:
			print('NO', end='')
	else:
		printed = False
		s = list(s)
		x = 'abacaba'
		k = 0
		pos = -1
		lp = -1
		for i in range(n - 6):
			z = 0
			k = 0
			for j in range(i, i + 7):
				if s[j] == x[k] or s[j] == '?':
					k += 1
				else:
					z = 1
					break
			if z == 0:
				val = calc(s[0:i] + ['a', 'b', 'a', 'c', 'a', 'b', 'a'] + s[i + 7:])
				if val == True:
					printed = True
					print('YES')
					k = 0
					for j in range(n):
						if j < i:
							if s[j] != '?':
								print(s[j], end='')
							else:
								print('z', end='')
						elif j >= i and j < i + 7:
							print(x[k], end='')
							k += 1
						elif s[j] != '?':
							print(s[j], end='')
						else:
							print('z', end='')
					break
		if printed == False:
			print('NO', end='')
	print()


from collections import deque
from collections import OrderedDict
import math
import sys
import os
import threading
import bisect
import operator
import heapq
from atexit import register
from io import BytesIO
import io
input = lambda : sys.stdin.readline().rstrip('\r\n')

def countSub(s, cS):
	count = 0
	lenS = len(cS)
	for i in range(len(s)):
		if s[i:i + lenS:1] == cS:
			count += 1
	return count
for t in range(int(input())):
	n = int(input())
	s = input()
	nS = 'abacaba'
	cout = 0
	for i in range(n - 7 + 1):
		pod = s[i:i + 7:1]
		if pod == nS:
			cout += 1
	if cout > 1:
		print('NO')
		continue
	elif cout == 1:
		print('YES')
		print(s.replace('?', 'z'))
	else:
		for i in range(n - 7 + 1):
			pod = s[i:i + 7:1]
			for j in range(len(pod)):
				if nS[j] != pod[j] and pod[j] != '?':
					break
			else:
				mS = s[0:i:1].replace('?', 'z') + nS + s[i + 7:n:1].replace('?', 'z')
				if countSub(mS, nS) == 1:
					print('YES')
					print(s[0:i:1].replace('?', 'z'), nS, s[i + 7:n:1].replace('?', 'z'), sep='')
					break
		else:
			print('NO')


import sys
t = 'abacaba'
t1 = '???????'
q = int(input())
for i in range(q):
	n = int(sys.stdin.readline())
	a = input()
	k = 0
	abac = []
	fulabac = 0
	while k < n:
		flag1 = 0
		flag = 0
		j = 0
		while j + k < n and j < 7:
			if a[k + j] != t[j] and a[k + j] != t1[j]:
				flag = 1
			elif a[k + j] != t[j]:
				flag1 = 1
			if flag == 1:
				break
			j += 1
		if flag == 0 and j == 7:
			abac.append([k, k + j])
		if flag == 0 and flag1 == 0 and (j == 7):
			fulabac += 1
		k += 1
	if fulabac > 1:
		print('No')
	elif len(abac) == 0:
		print('No')
	elif fulabac == 1:
		print('Yes')
		for k in a:
			if k == '?':
				print('z', end='')
			else:
				print(k, end='')
		print('')
	else:
		s = 0
		check1 = 'abaca?a'
		check2 = 'a?acaba'
		flag = 0
		while s < len(abac):
			if abac[s][1] + 4 <= len(a) and 'abacaba' + a[abac[s][1]:abac[s][1] + 4] == 'abacabacaba':
				s += 1
				flag = 1
			elif abac[s][0] - 4 >= 0 and a[abac[s][0] - 4:abac[s][0]] + 'abacaba' == 'abacabacaba':
				s += 1
				flag = 1
			else:
				flag = 2
				break
		if flag == 1 and s == len(abac):
			print('No')
		else:
			st = ''
			for j in range(abac[s][0]):
				if a[j] == '?':
					st += 'z'
				else:
					st += a[j]
			st += 'abacaba'
			for j in range(abac[s][1], len(a)):
				if a[j] == '?':
					st += 'z'
				else:
					st += a[j]
			print('Yes')
			print(st)


import re
t = 'abacaba'
for s in [*open(0)][2::2]:
	i = 0
	f = 1
	r = t + t
	while f and r.find(t) < r.rfind(t):
		(r, f) = re.subn(''.join((f'({x}|\\?)' for x in t)), t, s[i:], 1)
		r = s[:i] + r
		i = r.find(t, i) + 1
	print(*(['NO'], ['YES', r.replace('?', 'd')])[f])


def CountOccurrences(l, substring):
	s = ''.join(l)
	count = 0
	start = 0
	while start < len(s):
		pos = s.find(substring, start)
		if pos != -1:
			start = pos + 1
			count += 1
		else:
			break
	return count

def logic(s, start):
	for i in range(7):
		if (i == 0 or i == 2 or i == 4 or (i == 6)) and (s[i + start] == 'a' or s[i + start] == '?'):
			if s[i + start] == '?':
				s[i + start] = 'a'
		elif (i == 1 or i == 5) and (s[i + start] == 'b' or s[i + start] == '?'):
			if s[i + start] == '?':
				s[i + start] = 'b'
		elif i == 3 and (s[i + start] == 'c' or s[i + start] == '?'):
			if s[i + start] == '?':
				s[i + start] = 'c'
		else:
			return 0
	return 1
for _ in range(int(input())):
	n = int(input())
	s = list(input())
	q = list(s[:7])
	a = 'abacaba'
	ans = 0
	j = 7
	i = 0
	ans += CountOccurrences(s, a)
	if ans == 1:
		s = ['z' if x == '?' else x for x in s]
		print('Yes')
		print(*s, sep='')
	elif ans > 1:
		print('No')
	else:
		flag = 0
		while j < n + 1:
			q = s[i:j]
			if logic(s, i):
				ans = CountOccurrences(s, a)
				if ans == 1:
					print('Yes')
					s = ['z' if x == '?' else x for x in s]
					print(*s, sep='')
					flag = 1
					break
			s[i:j] = q
			i += 1
			j += 1
		if flag == 0:
			print('No')


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b / gcd(a, b)

def bs(arr, l, r, x):
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return arr[mid]
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def swap(list, pos1, pos2):
	(list[pos1], list[pos2]) = (list[pos2], list[pos1])
	return list
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	x = 0
	for i in range(n - 6):
		if s[i:i + 7] == 'abacaba':
			x += 1
	if x > 1:
		print('No')
	elif x == 1:
		print('Yes')
		ans = ''
		for i in range(n):
			if s[i] == '?':
				ans += 'z'
			else:
				ans += s[i]
		print(ans)
	else:
		for i in range(n - 6):
			ans = s[:i] + 'abacaba' + s[i + 7:]
			xx = 0
			for z in range(n - 6):
				if ans[z:z + 7] == 'abacaba':
					xx += 1
			if xx == 1:
				cnt = 0
				for q in range(n):
					if s[q] == ans[q] or s[q] == '?':
						cnt += 1
				if cnt == n:
					ans = ans.replace('?', 'z')
					print('Yes')
					print(ans)
					break
		else:
			print('No')


import time
from collections import deque

def inpt():
	return int(input())

def inpl():
	return list(map(int, input().split()))

def inpm():
	return map(int, input().split())

def check(i, s, t):
	return all([s[j] == t[j - i] or s[j] == '?' for j in range(i, i + 7)])

def solve():
	n = inpt()
	s = input()
	test = 'abacaba'
	if n == 7:
		if check(0, s, test):
			print('YES')
			print(test)
		else:
			print('NO')
	else:
		i = 0
		while i <= n - 7:
			if check(i, s, test):
				temp = s[i:i + 7]
				s = s[:i] + test + s[i + 7:]
				if any([s[j:j + 7] == test for j in range(i + 1, n - 6)]) or any([s[j:j + 7] == test for j in range(0, i)]):
					s = s[:i] + temp + s[i + 7:]
					i += 1
				else:
					print('YES')
					for ii in range(n):
						if s[ii] == '?':
							s = s[:ii] + 'z' + s[ii + 1:]
					print(s)
					return
			else:
				i += 1
		print('NO')
		return

def main():
	m = 10 ** 9 + 7
	t = int(input())
	while t:
		t -= 1
		solve()
main()


def main(s):
	for i in range(len(s) - 7 + 1):
		if all((s[i + j] in ('?', c) for (j, c) in enumerate('abacaba'))):
			if 'abacaba' not in s[:i] + 'aba?aba' + s[i + 7:]:
				return (s[:i] + 'abacaba' + s[i + 7:]).replace('?', 'z')
cases = int(input())
for _ in range(cases):
	input()
	res = main(input())
	if res:
		print('Yes')
		print(res)
	else:
		print('No')


import sys
from collections import defaultdict as dd
from collections import deque
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def li():
	return [int(xx) for xx in input().split()]

def fli():
	return [float(x) for x in input().split()]

def comp(a, b):
	if a > b:
		return 2
	return 2 if a == b else 0

def gi():
	return [xx for x in input().split()]

def fi():
	return int(input())

def swap(a, i, j):
	(a[i], a[j]) = (a[j], a[i])

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def gh():
	sys.stdout.flush()

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)

def bo(i):
	return ord(i) - ord('a')
t = fi()
has = []
z = 'abacaba'
for i in range(2 ** 7 - 1):
	p = bin(i)[2:]
	p = '0' * (7 - len(p)) + p
	r = ''
	for ii in range(7):
		if p[ii] == '0':
			r += '?'
		else:
			r += z[ii]
	has.append(r)
while t > 0:
	t -= 1
	n = fi()
	s = input().strip()
	count = 0
	rc = 0
	p = ['y' for i in range(n)]
	for i in range(n - 6):
		if s[i:i + 7] == z:
			count += 1
	if count == 0:
		for i in range(n - 6):
			if s[i:i + 7] in has:
				u = deepcopy(list(s))
				for ii in range(i, i + 7):
					if s[ii] == '?':
						u[ii] = z[ii - i]
					else:
						u[ii] = s[ii]
				c = 0
				for ii in range(max(0, i - 14), min(n, i + 20)):
					if ii + 6 < n:
						if ''.join(u[ii:ii + 7]) == z:
							c += 1
				if c > 1 or c == 0:
					continue
				for ii in range(i, i + 7):
					if s[ii] == '?':
						p[ii] = z[ii - i]
					else:
						p[ii] = s[ii]
				rc = 1
				break
	for ii in range(len(s)):
		if s[ii] != '?':
			p[ii] = s[ii]
	if count == 1:
		print('Yes')
		print(''.join(p))
	elif count == 0 and rc == 1:
		print('Yes')
		print(''.join(p))
	else:
		print('No')


string = 'abacaba'

def count(s):
	cnt = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == string:
			cnt += 1
	return cnt

def replace(s):
	for i in range(len(s)):
		if s[i] == '?':
			s = s[:i] + 'z' + s[i + 1:]
	return s

def conv(s, index):
	cnt = 0
	for i in range(index, index + 7):
		if s[i] != string[cnt] and s[i] != '?':
			return (s, False)
		cnt += 1
	return (s[:index] + string + s[index + 7:], True)
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	cnt = count(s)
	if cnt == 1:
		s = replace(s)
		print('Yes')
		print(s)
		continue
	elif cnt > 1:
		print('No')
		continue
	flag = 0
	for i in range(len(s) - 6):
		prevs = s
		(s, done) = conv(s, i)
		if done == True:
			s = replace(s)
			if count(s) == 1:
				print('Yes')
				print(s)
				flag = 1
				break
		s = prevs
	if flag != 1:
		print('No')


import sys
input = sys.stdin.readline
want = 'abacaba'
T = int(input())
for _ in range(T):
	n = int(input())
	s = input().strip()
	l = list(s)
	for i in range(n - 6):
		ll = l[:]
		works = True
		for c in range(7):
			if ll[c + i] == want[c] or ll[c + i] == '?':
				ll[c + i] = want[c]
			else:
				works = False
		if works:
			for j in range(n - 6):
				if i != j and ll[j:j + 7] == list(want):
					break
			else:
				print('Yes')
				for j in range(n):
					if ll[j] == '?':
						ll[j] = 'd'
				print(''.join(ll))
				break
	else:
		print('No')


import sys

def input():
	return sys.stdin.readline().strip()
a = 'abacaba'

def find_count(s):
	count = 0
	for i in range(n - 6):
		if ''.join(s[i:i + 7]) == a:
			count += 1
	return count
t = int(input())
while t:
	t -= 1
	n = int(input())
	s = list(input())
	possible = False
	for i in range(n - 6):
		s_temp = s.copy()
		found = True
		for j in range(7):
			if a[j] != s[i + j] and s[i + j] != '?':
				found = False
				break
			else:
				s_temp[i + j] = a[j]
		if found and find_count(s_temp) == 1:
			possible = True
			s = s_temp
			break
		else:
			s_temp = s.copy()
	if possible:
		print('YES')
		for k in range(n):
			if s[k] == '?':
				s[k] = 'z'
		print(''.join(s))
	else:
		print('NO')


import math
from collections import deque
import sys
sys.setrecursionlimit(10 ** 4)

def Divisors(n):
	l = []
	i = 2
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
	return l

def SieveOfEratosthenes(n):
	l = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			l.append(p)
	return l

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(n)
	return l

def Factors(n):
	result = []
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if i == n / i:
				result.append(i)
			else:
				result.append(i)
				result.append(n // i)
	result.append(1)
	return result

def maxSubArraySum(a):
	max_so_far = 0
	max_ending_here = 0
	size = len(a)
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < abs(max_ending_here):
			max_so_far = max_ending_here
	return max_so_far

def longestsubarray(arr, n, k):
	current_count = 0
	max_count = 0
	for i in range(0, n, 1):
		if arr[i] % k != 0:
			current_count += 1
		else:
			current_count = 0
		max_count = max(current_count, max_count)
	return max_count

def main():
	n = int(input())
	s = input()
	if n < 7:
		print('No')
		return
	s1 = 'abacaba'
	i = 0
	p = 0
	j = 0
	while i < n:
		if s1[j] == s[i] or s[i] == '?':
			i += 1
			j += 1
			if j == 7:
				p += 1
				s2 = ''
				for k in range(0, i - j):
					if s[k] == '?':
						s2 += 'z'
					else:
						s2 += s[k]
				s2 += s1
				for k in range(i, n):
					if s[k] == '?':
						s2 += 'z'
					else:
						s2 += s[k]
				c = 0
				for k in range(0, n - 6):
					l = 0
					for q in range(k, n):
						if s2[q] == s1[l]:
							l += 1
							if l == 7:
								l = 0
								c += 1
						else:
							break
				if c < 2:
					print('Yes')
					print(s2)
					return
				i = p
				j = 0
		else:
			p += 1
			i = p
			j = 0
	print('No')
t = int(input())
for i in range(0, t):
	main()


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def ZAlgorithm(aa):
	target = aa
	len_t = len(target)
	lcp = [-1] * len_t
	top = 1
	right = 0
	lcp[0] = 0
	while top < len_t:
		while top + right < len_t and target[right] == target[top + right]:
			right += 1
		lcp[top] = right
		left = 1
		if right == 0:
			top += 1
			continue
		while left + lcp[left] < right and left < right:
			lcp[top + left] = lcp[left]
			left += 1
		top += left
		right -= left
	return lcp

def start():
	t = 'aba'
	i = 3
	while i < n - 3:
		if s[i] == 'c' or s[i] == '?':
			for j in range(3):
				if s[i + 1 + j] != t[j] and s[i + 1 + j] != '?':
					break
				if s[i - 1 - j] != t[j] and s[i - 1 - j] != '?':
					break
			else:
				ns = s[:]
				ns[i - 3:i + 4] = list('abacaba')
				lcp = ZAlgorithm(list('abacaba@') + ns)
				if lcp.count(7) == 1:
					return i - 3
			if s[i] == 'c':
				i += 3
		i += 1
	return -1
for _ in range(II()):
	n = II()
	s = list(SI())
	lcp = ZAlgorithm(list('abacaba@') + s)
	cnt = lcp.count(7)
	ok = True
	if cnt == 0:
		i = start()
		if i == -1:
			ok = False
		else:
			s[i:i + 7] = list('abacaba')
	if cnt > 1:
		ok = False
	if ok:
		for j in range(n):
			if s[j] == '?':
				s[j] = 'z'
		print('Yes')
		print(''.join(s))
	else:
		print('No')


def checker(s):
	global n, chker
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == chker:
			cnt += 1
	return cnt

def yes(s):
	global n
	for i in range(n):
		if s[i] == '?':
			s[i] = 'z'
	print('YES')
	print(''.join(s))
for _ in range(int(input())):
	n = int(input())
	l = list(input())
	chker = list('abacaba')
	if checker(l) == 1:
		yes(l)
	elif checker(l) > 1:
		print('No')
	else:
		counter = 0
		for i in range(n - 6):
			available = True
			for j in range(7):
				if l[i + j] != chker[j] and l[i + j] != '?':
					available = False
			if available:
				counter = checker(l[:i] + chker + l[i + 7:])
			if counter == 1:
				l[i:i + 7] = chker
				break
		if counter == 1:
			yes(l)
		else:
			print('No')


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n
avl = AvlTree()

class SegmentTree1:

	def __init__(self, data, default='z', func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater

def check(s, s1):
	c = 0
	for i in range(n - 6):
		if s[i:i + 7] == s1:
			c += 1
	return c
for ik in range(int(input())):
	n = int(input())
	fr = 0
	s = input()
	n = len(s)
	cert = []
	prob = []
	for i in range(len(s)):
		er = 0
		w = ''
		if s[i] == 'a' or s[i] == '?':
			if i + 7 > n:
				continue
			w = ''
			for i1 in range(i):
				if s[i1] == '?':
					w += 'z'
				else:
					w += s[i1]
			er1 = 'abacaba'
			for j in range(i, i + 7):
				if s[j] != er1[j - i] and s[j] != '?':
					er = 1
					break
			if er == 0:
				w += er1
			for i1 in range(i + 7, n):
				if s[i1] == '?':
					w += 'z'
				else:
					w += s[i1]
		if er == 0 and check(w, 'abacaba') == 1:
			print('YES')
			print(w)
			fr = 1
			break
	if fr == 0:
		print('NO')


def cnt(ss):
	c = 0
	f = ss.find('abacaba')
	if f != -1:
		c += 1
		f2 = ss.find('abacaba', f + 1)
		if f2 != -1:
			c += 1
	return c
for _ in range(int(input())):
	n = int(input())
	s = input()
	t = 'abacaba'
	flag = False
	i = 0
	while i + len(t) <= n:
		ss = s
		ok = True
		for j in range(len(t)):
			if ss[i + j] != '?' and ss[i + j] != t[j]:
				ok = False
				break
			ss = ss[:i + j] + t[j] + ss[i + j + 1:]
		if ok and cnt(ss) == 1:
			for j in range(n):
				if ss[j] == '?':
					ss = ss[:j] + 'x' + ss[j + 1:]
			flag = True
			print('Yes')
			print(ss)
			break
		i += 1
	if not flag:
		print('No')


def checkcnt(n, s):
	cnt = 0
	for i in range(0, n - 7 + 1):
		if s[i:i + 7] == 'abacaba':
			cnt = cnt + 1
	return cnt

def checkpos(s, x, t):
	for i in range(0, len(t)):
		if s[x + i] == '?':
			continue
		elif s[x + i] != t[i]:
			return False
	return True

def checkstr(s, x, t):
	for i in range(0, len(t)):
		if s[x + i] != t[i]:
			return False
	return True

def checkside(s, x):
	left = not checkstr(s, x - 4, 'abac') and (not checkstr(s, x - 6, 'abacab'))
	righ = not checkstr(s, x + 7, 'caba') and (not checkstr(s, x + 7, 'bacaba'))
	return left and righ

def solve(n, s):
	cnt = checkcnt(n, s)
	if cnt == 1:
		print('Yes')
		print(s.replace('?', 'z'))
	elif cnt >= 2:
		print('No')
	else:
		pos = 0
		S = 'xxxxxxx' + s + 'xxxxxxx'
		for i in range(7, 7 + n):
			if checkpos(S, i, 'abacaba') and checkside(S, i):
				cnt = cnt + 1
				pos = i - 7
		if cnt >= 1:
			print('Yes')
			print(s[:pos].replace('?', 'z') + 'abacaba' + s[pos + 7:].replace('?', 'z'))
		else:
			print('No')
T = int(input())
for tt in range(0, T):
	n = int(input())
	s = input().replace('\n', '')
	solve(n, s)


import sys
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

def check(s):
	t = 'abacaba'
	ans = 0
	for i in range(len(s)):
		if s[i:i + 7] == t:
			ans += 1
	return ans

def solve():
	(n,) = I()
	s = input()
	t = 'abacaba'
	cnt = check(s)
	if cnt > 1:
		print('No')
		return
	elif cnt == 1:
		s = list(s)
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		print('Yes')
		print(''.join(s))
	else:
		s = list(s)
		ok = s[:]
		for i in range(n - 6):
			ok = s[:]
			for j in range(7):
				if s[i + j] == t[j]:
					continue
				elif s[i + j] == '?':
					ok[i + j] = t[j]
				else:
					break
			else:
				for i in range(n):
					if ok[i] == '?':
						ok[i] = 'z'
				ok = ''.join(ok)
				if check(ok) != 1:
					continue
				print('Yes')
				print(ok)
				return
		print('No')
(t,) = I()
while t:
	t -= 1
	solve()


def cont(s):
	t = 'abacaba'
	cnt = 0
	for i in range(len(s)):
		if s[i] == 'a' and i + 7 <= len(s):
			if s[i:i + 7] == t:
				cnt += 1
	return cnt

def acacius(s):
	cnt = cont(s)
	if cnt > 1:
		return 'NO'
	temp = s
	s = list(s)
	st = list('abacaba')
	for i in range(len(s)):
		ss = s.copy()
		if i + 7 <= len(s):
			flag = True
			for j in range(0, 7):
				if ss[i + j] != st[j] and ss[i + j] != '?':
					flag = False
					break
				ss[i + j] = st[j]
			if flag and cont(''.join(ss)) == 1:
				for x in range(len(ss)):
					if ss[x] == '?':
						ss[x] = 'z'
				print('YES')
				return ''.join(ss)
	return 'NO'
for i in range(int(input())):
	a = input()
	s = input()
	x = acacius(s)
	print(x)


from collections import defaultdict, Counter
from math import log, ceil, floor

def no_of_subs(s):
	sb = 'abacaba'
	results = 0
	sub_len = len(sb)
	for i in range(len(s)):
		if s[i:i + sub_len] == sb:
			results += 1
	return results

def solve():
	n = int(input())
	s = input()
	n = len(s)
	x = no_of_subs(s)
	if x == 1:
		print('YES')
		ans = [0] * n
		for k in range(n):
			if s[k] == '?':
				ans[k] = 'z'
			else:
				ans[k] = s[k]
		print(''.join(ans))
	elif x >= 2:
		print('NO')
	else:
		p = 'abacaba'
		i = 0
		j = 0
		while i < n:
			if s[i] == p[j] or s[i] == '?':
				i += 1
				j += 1
			else:
				i += 1
				j = 0
			if j == 7:
				ans = [0] * n
				o = 0
				for k in range(n):
					if i - 7 <= k <= i - 1:
						ans[k] = p[o]
						o += 1
					elif s[k] == '?':
						ans[k] = 'z'
					else:
						ans[k] = s[k]
				recheck = ''.join(ans)
				x_1 = no_of_subs(recheck)
				if x_1 == 1:
					print('YES')
					print(recheck)
					return
				else:
					j = 0
		p = 'abacaba'
		i = 0
		j = 0
		s = s[::-1]
		while i < n:
			if s[i] == p[j] or s[i] == '?':
				i += 1
				j += 1
			else:
				i += 1
				j = 0
			if j == 7:
				ans = [0] * n
				o = 0
				for k in range(n):
					if i - 7 <= k <= i - 1:
						ans[k] = p[o]
						o += 1
					elif s[k] == '?':
						ans[k] = 'z'
					else:
						ans[k] = s[k]
				recheck = ''.join(ans)
				recheck = recheck[::-1]
				x_1 = no_of_subs(recheck)
				if x_1 == 1:
					print('YES')
					print(recheck)
					return
				else:
					j = 0
		print('NO')
t = 1
t = int(input())
for _ in range(t):
	solve()


def helper(s):
	ans = 0
	for i in range(len(s) - 6):
		temp = s[i:i + 7]
		if temp == 'abacaba':
			ans += 1
	return ans
t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	if helper(s) > 1:
		print('NO')
	elif helper(s) == 1:
		temp = ''
		for i in range(len(s)):
			if s[i] == '?':
				temp += 'd'
			else:
				temp += s[i]
		print('YES')
		print(temp)
	else:
		rec = 0
		t = 'abacaba'
		for i in range(len(s) - 6):
			ans = 1
			temp = s[i:i + 7]
			for q in range(len(temp)):
				if temp[q] != t[q] and temp[q] != '?':
					ans = 0
			if ans == 1:
				r = ''
				for p in range(i):
					if s[p] == '?':
						r += 'd'
					else:
						r += s[p]
				r += 'abacaba'
				for p in range(i + 7, len(s)):
					if s[p] == '?':
						r += 'd'
					else:
						r += s[p]
				if helper(r) == 1:
					print('YES')
					print(r)
					rec = 1
					break
		if rec == 0:
			print('NO')


def count(s, req, n):
	ct = 0
	for i in range(n - 6):
		fl = 0
		for j in range(7):
			if s[i + j] != req[j]:
				fl = 1
				break
		if not fl:
			ct += 1
	return ct
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	req = 'abacaba'
	bef = count(s, req, n)
	if bef == 1:
		print('yes')
		s = s.replace('?', 'z')
		print(s)
	elif bef == 0:
		s = list(s)
		poss = 0
		for i in range(n - 6):
			if s[i] == 'a' or s[i] == '?':
				fl = 0
				for j in range(1, 7):
					if s[i + j] != '?' and s[i + j] != req[j]:
						fl = 1
						break
				if fl == 0:
					b = list(s)
					for j in range(7):
						b[i + j] = req[j]
					if count(b, req, n) == 1:
						s = b
						poss = 1
						break
		if poss:
			s = ''.join(map(str, s))
			print('yes')
			s = s.replace('?', 'z')
			print(s)
		else:
			print('no')
	else:
		print('no')


from math import log2, ceil, floor
from collections import defaultdict, OrderedDict, Counter, deque
from heapq import heappush, heappop, heapify
import re

def inp():
	return input()

def list_inp():
	return list(map(int, input().split()))

def map_inp():
	return map(int, input().split())

def int_inp():
	return int(input())

def float_int():
	return float(input())

def isprime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
for _ in range(int_inp()):
	n = int_inp()
	s = inp()
	if 'abacaba' not in s:
		reg = '[a?][b?][a?][c?][a?][b?][a?]{1}'
		y = re.findall(reg, s)
		if y:
			f = 0
			tot = s.count('?')
			count = 0
			while count != tot:
				x = re.sub(reg, 'abacaba', s, 1)
				if 'abacaba' in x:
					ind = x.index('abacaba')
					if 'abacaba' in x[ind + 3:]:
						s = list(s)
						ind = s.index('?')
						s[ind] = 'z'
						s = ''.join(s)
						count = 1
					else:
						x = list(x)
						for i in range(len(x)):
							if x[i] == '?':
								x[i] = 'z'
						print('Yes')
						print(*x, sep='')
						f = 1
						break
				else:
					break
			if f == 0:
				print('No')
		else:
			print('No')
	else:
		ind = s.index('abacaba')
		if 'abacaba' in s[ind + 3:]:
			print('No')
		else:
			print('Yes')
			s = list(s)
			for i in range(len(s)):
				if s[i] == '?':
					s[i] = 'z'
			print(*s, sep='')


from __future__ import division, print_function
MOD = 998244353
mod = 10 ** 9 + 7

def prepare_factorial():
	fact = [1]
	for i in range(1, 100005):
		fact.append(fact[-1] * i % mod)
	ifact = [0] * 100005
	ifact[100004] = pow(fact[100004], mod - 2, mod)
	for i in range(100004, 0, -1):
		ifact[i - 1] = i * ifact[i] % mod
	return (fact, ifact)
import sys
from bisect import bisect_left, bisect_right, insort
from math import floor, ceil, sqrt, degrees, atan, pi, log, sin, radians
from heapq import heappop, heapify, heappush
from collections import Counter, defaultdict, deque

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr(n, r, fact, ifact):
	t = fact[n] * (ifact[r] * ifact[n - r]) % mod % mod
	return t

def intarray():
	return map(int, sys.stdin.readline().strip().split())

def array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	return x * y // GCD(x, y)

def get_xor(n):
	return [n, 1, n + 1, 0][n % 4]

def fast_expo(a, b):
	res = 1
	while b:
		if b & 1:
			res = res * a
			res %= MOD
			b -= 1
		else:
			a = a * a
			a %= MOD
			b >>= 1
	res %= MOD
	return res

def get_n(P):
	ans = (-1 + sqrt(1 + 8 * P)) // 2
	return ans
cur = []
req = 'abacaba'

def check(ind, s, n):
	global cur
	cur = list(s)
	for i in range(0, 7):
		if cur[ind + i] == '?':
			cur[ind + i] = req[i]
		elif cur[ind + i] != s[ind + i]:
			return 0
	for i in range(0, len(s)):
		if cur[i] == '?':
			cur[i] = 'z'
	count = 0
	for i in range(n - 6):
		for j in range(0, 7):
			if req[j] != cur[i + j]:
				break
		else:
			count += 1
	if count == 1:
		return True
	else:
		return False

def solve():
	n = int(input())
	s = input()
	for i in range(n - 6):
		if check(i, s, n):
			print('YES')
			print(''.join(cur))
			return
	print('NO')
	return

def main():
	T = int(input())
	while T:
		solve()
		T -= 1
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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')
main()


def pcount(a):
	t = 0
	i = 0
	while i <= len(a) - 7:
		if 'abacaba' == a[i:i + 7]:
			t += 1
		i += 1
	return t

def printstring(a):
	for i in a:
		if i == '?':
			print('z', end='')
		else:
			print(i, end='')
	print()

def subString(a, x):
	g = 'abacaba'
	count = pcount(a)
	if count == 1:
		print('Yes')
		printstring(a)
		return
	elif count > 1:
		print('No')
		return
	count = 0
	i = 0
	res = ''
	while i <= len(a) - 7:
		if a[i] == g[0] or a[i] == '?':
			j = 1
			while j < 7:
				if a[i + j] != g[j] and a[i + j] != '?':
					break
				j += 1
			else:
				res = a[:i] + g + a[i + 7:]
				if pcount(res) == 1:
					print('Yes')
					printstring(res)
					return
		i += 1
	print('No')
	return
tests = int(input())
for i in range(tests):
	x = int(input())
	arr = input()
	subString(arr, x)


def find_all_abacaba(s):
	total = 0
	x = 0
	while True:
		x = s.find('abacaba', x)
		if x == -1:
			return total
		total += 1
		x += 4

def empty_changed(l, changed):
	for idx in changed:
		l[idx] = '?'
	changed = []

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		s = input()
		initial = find_all_abacaba(s)
		if initial == 1:
			print('YES')
			print(s.replace('?', 'z'))
			continue
		elif initial > 1:
			print('NO')
			continue
		else:
			l = list(s)
			x = 0
			ab = 'abacaba'
			changed = []
			i = 0
			while i < n:
				if x == len(ab):
					if s[i:i + 4] == 'caba':
						changed_empty = 'abac' == s[i - 7:i - 3]
						empty_changed(l, changed)
						x = 0
						if changed_empty:
							pass
						else:
							i -= 3
					elif s[i:i + 6] == 'bacaba':
						changed_empty = 'abacab' == s[i - 7:i - 1]
						empty_changed(l, changed)
						x = 0
						if changed_empty:
							pass
						else:
							i -= 5
					else:
						break
				if l[i] == '?':
					l[i] = ab[x]
					changed.append(i)
					x += 1
				elif l[i] == ab[x]:
					x += 1
				else:
					if l[i] == 'a':
						x = 1
					elif l[i] == 'b' and x == 3:
						x = 2
					else:
						x = 0
					changed = []
				i += 1
			s = ''.join(l)
			s = s.replace('?', 'z')
			ending = find_all_abacaba(s)
			if ending == 0:
				print('NO')
			else:
				print('YES')
				print(s)
main()


def listToString(s):
	str1 = ''
	for ele in s:
		str1 += ele
	return str1

def solve(ss, sample, n):
	cnt = 0
	for i in range(n - 6):
		ok = True
		for j in range(i, i + 7):
			if sample[j - i] != ss[j]:
				ok = False
				break
		if ok:
			cnt += 1
	return cnt
for t in range(int(input())):
	n = int(input())
	s = list(input())
	sample = 'abacaba'
	for i in range(n - 6):
		ok = True
		ss = s.copy()
		flag = True
		for j in range(i, i + 7):
			if ss[j] != '?' and ss[j] != sample[j - i]:
				ok = False
				break
			ss[j] = sample[j - i]
		if ok and solve(ss, sample, n) == 1:
			flag = False
			ss = listToString(ss)
			ss = ss.replace('?', 'z')
			print('Yes')
			print(ss)
			break
	if flag:
		print('No')


T = int(input().strip())
while T:
	T -= 1
	n = int(input().strip())
	nstring = input().strip()
	done = False
	for attempt in range(0, len(nstring) - 6):
		if done == True:
			break
		string = nstring
		count = 0
		for ind in range(0, len(string) - 6):
			if string[ind:ind + 7] == 'abacaba':
				count += 1
		if count > 1:
			done = True
			print('nO')
			break
		elif count == 1:
			string = string.replace('?', 'z')
			print('yEs')
			done = True
			print(string)
			break
		else:
			found = False
			for ind in range(attempt, attempt + 1):
				if found:
					break
				ls = string[ind:ind + 7]
				if (ls[0] == 'a' or ls[0] == '?') and (ls[1] == 'b' or ls[1] == '?') and (ls[2] == 'a' or ls[2] == '?') and (ls[3] == 'c' or ls[3] == '?') and (ls[4] == 'a' or ls[4] == '?') and (ls[5] == 'b' or ls[5] == '?') and (ls[6] == 'a' or ls[6] == '?'):
					found = True
					string = (string[:ind] + 'abacaba' + string[ind + 7:]).strip()
					string = string.replace('?', 'z')
					count = 0
					for lind in range(0, len(string) - 6):
						if string[lind:lind + 7] == 'abacaba':
							count += 1
					if count > 1:
						continue
					elif count == 1:
						print('yEs')
						done = True
						print(string)
						break
	if done == False:
		print('nO')


import sys
input = sys.stdin.readline

def comp(s, a, k, l):
	m = 0
	for j in range(k, l):
		if s[j] == '?' or s[j] == a[m]:
			m += 1
			if m == 7:
				return True
		else:
			break
	return False
for _ in range(int(input())):
	n = int(input())
	s = input().strip()
	s = list(s)
	a = 'abacaba'
	ct = 0
	for i in range(0, n - 7 + 1):
		k = 0
		for j in range(i, i + 7):
			if a[k] == s[j]:
				k += 1
				if k == 7:
					break
			else:
				break
		if k == 7:
			ct += 1
	if ct > 1:
		print('NO')
	elif ct == 1:
		print('YES')
		for i in range(0, n):
			if s[i] == '?':
				s[i] = 'z'
		print(''.join([b for b in s]))
	elif s.count('?') == 0:
		print('NO')
	else:
		af = 0
		ind = 0
		for i in range(0, n - 7 + 1):
			b = comp(s, a, i, i + 7)
			if b == True:
				l = 0
				r = 0
				if i - 4 >= 0:
					m = 0
					for j in range(i - 4, i):
						if a[m] == s[j]:
							m += 1
						else:
							l = 1
							break
				else:
					l = 1
				if i + 11 <= n:
					m = 3
					for j in range(i + 7, i + 11):
						if a[m] == s[j]:
							m += 1
						else:
							r = 1
							break
				else:
					r = 1
				if l == 1 and r == 1:
					af = 1
					ind = i
					break
		if af == 1:
			print('YES')
			m = 0
			for i in range(0, ind):
				if s[i] == '?':
					s[i] = 'z'
			for i in range(ind, ind + 7):
				if s[i] == '?':
					s[i] = a[m]
				m += 1
			for i in range(ind + 7, n):
				if s[i] == '?':
					s[i] = 'z'
			print(''.join([b for b in s]))
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	sd = input().rstrip()
	ex = 'abacaba'
	if ex in sd:
		id = sd.index(ex)
		if ex not in sd[id + 1:]:
			print('YES')
			print(sd.replace('?', 'z'))
		else:
			print('NO')
	else:
		for i in range(n - 6):
			cm = sd[i:i + 7]
			for (a, b) in zip(cm, ex):
				if a != b and a != '?':
					break
			else:
				ld = sd[:i] + ex + sd[i + 7:]
				if ex in ld:
					id = ld.index(ex)
					if ex not in ld[id + 1:]:
						print('YES')
						print(ld.replace('?', 'z'))
						break
		else:
			print('NO')


q = 'abacaba'

def over(haystack, needle):
	count = 0
	i = -1
	while True:
		i = haystack.find(needle, i + 1)
		if i == -1:
			return count
		count += 1

def rep(s):
	s = list(s)
	for i in range(len(s)):
		if s[i] == '?':
			s[i] = q[i]
	return ''.join(s)
for _ in range(int(input())):
	n = int(input())
	s = input()
	if over(s, q) == 1:
		print('YES')
		print(s.replace('?', 'z'))
	elif over(s, q) > 1:
		print('NO')
	else:
		f = True
		ind = 0
		for i in range(n - 6):
			m = s[:i] + rep(s[i:i + 7]) + s[i + 7:]
			if over(m, q) == 1:
				f = False
				print('YES')
				print(m.replace('?', 'z'))
				break
		if f:
			print('NO')


def match(a, b):
	for i in range(len(a)):
		if a[i] == '?':
			continue
		if a[i] != b[i]:
			return False
	return True

def process():
	n = int(input())
	s = input()
	idx = s.find('abacaba')
	if idx != -1:
		idx2 = s.find('abacaba', idx + 1)
		if idx2 == -1:
			print('Yes')
			print(s.replace('?', 'z'))
			return
		else:
			print('No')
			return
	for i in range(n - 6):
		if match(s[i:i + 7], 'abacaba') == True:
			t = s[0:i] + 'abacaba' + s[i + 7:].replace('?', 'z')
			idx = t.find('abacaba')
			if t.find('abacaba', idx + 1) == -1:
				print('Yes')
				print(t)
				return
		if s[i] == '?':
			s = s[0:i] + 'z' + s[i + 1:]
	print('No')
	return
t = int(input())
for _ in range(t):
	process()


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())

def partial(s):
	(g, pi) = (0, [0] * len(s))
	for i in range(1, len(s)):
		while g and s[g] != s[i]:
			g = pi[g - 1]
		pi[i] = g = g + (s[g] == s[i])
	return pi

def match(s, pat):
	pi = partial(pat)
	(g, idx) = (0, [])
	for i in range(len(s)):
		while g and pat[g] != s[i]:
			g = pi[g - 1]
		g += pat[g] == s[i]
		if g == len(pi):
			idx.append(i + 1 - g)
			g = pi[g - 1]
	return idx
KEY_WORD = 'abacaba'

def main():
	n = itg()
	s = inp()
	occurrence = len(match(s, KEY_WORD))
	if occurrence >= 2:
		return 'No'
	elif occurrence == 1:
		return 'Yes\n' + s.replace('?', 'x')
	m = start = 0
	for i in range(n):
		if s[i] == '?' or s[i] == KEY_WORD[m]:
			if m == 0:
				start = i
			m += 1
		elif s[i] == 'a':
			m = 1
			start = i
		elif s[i] == 'b' and i - 1 >= 0 and (s[i - 1] == 'a'):
			m = 2
			start = i - 1
		else:
			m = start = 0
		if m == 7:
			ans = s[max(0, start - 7):start] + KEY_WORD + s[start + 7:start + 14]
			if len(match(ans, KEY_WORD)) == 1:
				ans = list(s)
				for (j, c) in enumerate(KEY_WORD):
					ans[start + j] = c
				return 'Yes\n' + ''.join(ans).replace('?', 'x')
			m = 3
			start = i - 2
	return 'No'
for case in range(itg()):
	print(main())


t = int(input())
for _ in range(t):
	n = int(input())
	s = list(input())
	ans = -1
	for i in range(n - 6):
		flag = True
		if (s[i] == 'a' or s[i] == '?') and (s[i + 1] == 'b' or s[i + 1] == '?') and (s[i + 2] == 'a' or s[i + 2] == '?') and (s[i + 3] == 'c' or s[i + 3] == '?') and (s[i + 4] == 'a' or s[i + 4] == '?') and (s[i + 5] == 'b' or s[i + 5] == '?') and (s[i + 6] == 'a' or s[i + 6] == '?'):
			if i >= 4:
				if s[i - 4] == 'a' and s[i - 3] == 'b' and (s[i - 2] == 'a') and (s[i - 1] == 'c'):
					flag = False
			if i + 10 <= n:
				if s[i + 7] == 'c' and s[i + 8] == 'a' and (s[i + 9] == 'b') and (s[i + 10] == 'a'):
					flag = False
		else:
			flag = False
		if flag:
			ans = i
			break
	count = 0
	for i in range(n - 6):
		if s[i] == 'a' and s[i + 1] == 'b' and (s[i + 2] == 'a') and (s[i + 3] == 'c') and (s[i + 4] == 'a') and (s[i + 5] == 'b') and (s[i + 6] == 'a'):
			ans = i
			count += 1
	if ans < 0 or count > 1:
		print('No')
	else:
		print('Yes')
		f = True
		for i in range(n):
			if i < ans or i > ans + 6:
				if s[i] == '?':
					print('z', end='')
				else:
					print(s[i], end='')
			elif f:
				print('abacaba', end='')
				f = False
		print()


a = ['a', 'b', 'a', 'c', 'a', 'b', 'a']
t = int(input())
for _ in range(t):
	n = int(input())
	s = list(input())
	check = [0] * (n - 6)
	for i in range(n - 6):
		for j in range(i, i + 7):
			if s[j] != a[j - i] and s[j] != '?':
				break
		else:
			if s[i:i + 7] == a:
				check[i] = 2
			else:
				check[i] = 1
	if check.count(2) > 1:
		print('No')
		continue
	elif check.count(2) == 1:
		print('Yes')
		print(''.join(s).replace('?', 'z'))
		continue
	g = False
	for i in range(n - 6):
		if check[i] == 1:
			f = False
			cand = [a[j - i] if i <= j <= i + 6 else s[j] if s[j] != '?' else 'z' for j in range(n)]
			for j in range(n - 6):
				if i != j:
					for k in range(j, j + 7):
						if cand[k] != a[k - j]:
							break
					else:
						f = True
			if not f:
				print('Yes')
				print(''.join(cand))
				g = True
				break
	if not g:
		print('No')


ta = 'abacaba'

def check(s, cur):
	global ta
	for i in range(7):
		if s[cur - 7 + i] != ta[i] and s[cur - 7 + i] != '?':
			return False
	return True

def valid(u):
	c = 0
	for i in range(7, len(u) + 1):
		if check(u, i):
			c += 1
			if c >= 2:
				return False
	return c == 1

def solve():
	n = int(input())
	s = input()
	for i in range(7, n + 1):
		if check(s, i):
			u = s[:i - 7].replace('?', 'z') + ta + s[i:].replace('?', 'z')
			if valid(u):
				print('YES')
				print(u)
				return
	print('NO')
	return
t = int(input())
for _ in range(t):
	solve()


import re
t = int(input())
while t > 0:
	n = int(input())
	s = str(input())
	goal = 'abacaba'
	c = len(re.findall('(?=abacaba)', s))
	if c > 1:
		print('No')
	elif c == 1:
		s = s.replace('?', 'z')
		print('Yes\n%s' % s)
	else:
		i = 0
		found = False
		limi = len(s) - 7
		while i <= limi and (not found):
			j = 0
			copys = s
			limj = i + 7
			while j < 7:
				if copys[i + j] == '?':
					copys = copys[:i + j] + goal[j % 7] + s[i + j + 1:]
					c = len(re.findall('(?=abacaba)', copys))
					if c == 1:
						copys = copys.replace('?', 'z')
						print('Yes\n%s' % copys)
						found = True
						break
				j += 1
			i += 1
		if not found:
			print('No')
	t -= 1


from bisect import bisect_left
import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	l = int(input())
	s = input().rstrip()
	c = 0
	for i in range(l - 6):
		temp = s[i:i + 7]
		if temp == 'abacaba':
			c += 1
	if c > 1:
		print('NO')
		continue
	if c == 1:
		print('YES')
		s = s.replace('?', 'z')
		print(s)
	if c == 0:
		h = 'abacaba'
		bok = 0
		for i in range(l - 6):
			temp = s[i:i + 7]
			ok = 0
			for j in range(len(temp)):
				if temp[j] == '?' or temp[j] == h[j]:
					ok += 1
			bok = max(ok, bok)
			if ok == 7:
				q = s[:i] + h + s[i + 7:]
				q = q.replace('?', 'z')
				c = 0
				for i in range(l - 6):
					temp = q[i:i + 7]
					if temp == 'abacaba':
						c += 1
				if c == 1:
					print('YES')
					print(q)
					break
				else:
					ok = 0
					bok = 0
		if bok < 7:
			print('NO')


def count(string, substring):
	count = 0
	start = 0
	while start < len(string):
		pos = string.find(substring, start)
		if pos != -1:
			start = pos + 1
			count += 1
		else:
			break
	return count
for _ in range(int(input())):
	n = int(input())
	os = input()
	good = False
	for i in range(n):
		if (os[i] == 'a' or os[i] == '?') and i <= n - 7:
			s = list(os)
			bad = False
			for j in range(i, i + 7):
				if s[j] != '?' and s[j] != 'abacaba'[j - i]:
					bad = True
					break
				s[j] = 'abacaba'[j - i]
			if bad:
				continue
			ans = ''.join(s).replace('?', 'z')
			if count(ans, 'abacaba') == 1:
				good = True
				break
	if good:
		print('Yes')
		print(ans)
	else:
		print('No')


t = int(input())
p = 'abacaba'

def check(st):
	for i in range(7):
		if st[i] == p[i] or st[i] == '?':
			continue
		else:
			return False
	return True

def verify(l, s, e, n):
	c = 0
	for i in range(s, e):
		l[i] = p[i - s]
	l = ''.join(map(str, l))
	for i in range(n - 6):
		if l[i:i + 7] == p:
			c += 1
	if c == 1:
		return True
	else:
		return False
while t > 0:
	n = int(input())
	s = input()
	c = 0
	ans = ''
	for i in range(n - 6):
		if s[i:i + 7] == p:
			c += 1
	if c == 1:
		print('YES')
		for i in range(n):
			if s[i] == '?':
				ans += 'd'
			else:
				ans += s[i]
		print(ans)
	elif c > 1:
		print('NO')
	else:
		for i in range(n - 6):
			if check(s[i:i + 7]):
				if verify(list(s), i, i + 7, n):
					print('YES')
					for j in range(i):
						if s[j] == '?':
							ans += 'd'
						else:
							ans += s[j]
					ans += p
					for j in range(i + 7, n):
						if s[j] == '?':
							ans += 'd'
						else:
							ans += s[j]
					print(ans)
					break
		else:
			print('NO')
	t -= 1


import math
from decimal import *
import random
sch = ['a', 'b', 'a', 'c', 'a', 'b', 'a']

def ct(s):
	cnt = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == sch:
			cnt += 1
	return cnt
for _ in range(int(input())):
	n = int(input())
	s = list(input())
	state = True
	for i in range(n - 6):
		ok = True
		ss = list(s)
		for j in range(7):
			if s[i + j] != sch[j] and s[i + j] != '?':
				ok = False
				break
			else:
				ss[i + j] = sch[j]
		if ok and ct(ss) == 1:
			state = False
			for x in range(n):
				if ss[x] == '?':
					ss[x] = 'z'
			print('YES')
			print(''.join(ss))
			break
	if state == True:
		print('NO')


import re

def solve(n, s):
	possible_solution_indices = []
	for i in range(n - 7 + 1):
		if re.match('[a?][b?][a?][c?][a?][b?][a?]', s[i:i + 7]):
			possible_solution_indices.append(i)
	for idx in possible_solution_indices:
		candidate = s[:idx] + 'abacaba' + s[idx + 7:]
		total_match = 0
		for i in range(n - 7 + 1):
			if candidate[i:i + 7] == 'abacaba':
				total_match += 1
		if total_match == 1:
			valid_str = candidate.replace('?', 'z')
			return (True, valid_str)
	return (False, '')
t = int(input())
for __ in range(t):
	n = int(input())
	s = input()
	(is_possible, assignment) = solve(n, s)
	if is_possible:
		print('yes')
		print(assignment)
	else:
		print('no')


s = 'abacaba'
l = len(s)

def countS(st):
	cnts = 0
	for i in range(n):
		ok = True
		for j in range(len(s)):
			if i + j == n or s[j] != st[i + j]:
				ok = False
				break
		if ok:
			cnts += 1
	return cnts

def replace(st, startI):
	arr = list(st)
	for j in range(len(s)):
		arr[startI + j] = s[j]
	s2 = ''.join(arr)
	s2.replace('?', 'z')
	return s2
t = int(input())
for _ in range(t):
	n = int(input())
	st = input()
	cnts = countS(st)
	if cnts > 1:
		print('No')
	elif cnts == 1:
		print('Yes')
		print(st.replace('?', 'z'))
	else:
		ok2 = False
		for i in range(n):
			ok = True
			for j in range(len(s)):
				if i + j == n or (st[i + j] != '?' and s[j] != st[i + j]):
					ok = False
					break
			if ok:
				st2 = replace(st, i)
				if countS(st2) == 1:
					ok2 = True
					print('Yes')
					print(st2.replace('?', 'z'))
			if ok2:
				break
		if not ok2:
			print('No')


def is_target(s):
	target = 'abacaba'
	for i in range(len(target)):
		if s[i] != target[i] and s[i] != '?':
			return False
	return True

def cnt_str(s):
	cnt = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == 'abacaba':
			cnt += 1
	return cnt

def replace_question(s):
	ret = ''
	for x in s:
		if x == '?':
			ret += 'z'
		else:
			ret += x
	return ret

def solve():
	n = int(input())
	s = input()
	cnt = 0
	for i in range(n - 6):
		if s[i:i + 7] == 'abacaba':
			cnt += 1
	if cnt > 1:
		print('No')
	elif cnt == 1:
		print('Yes')
		for x in s:
			if x != '?':
				print(x, end='')
			else:
				print('z', end='')
		print('')
	else:
		found = False
		for i in range(n - 6):
			if is_target(s[i:i + 7]):
				ans = replace_question(s[:i]) + 'abacaba' + replace_question(s[i + 7:])
				if cnt_str(ans) == 1:
					found = True
					print('Yes')
					print(ans)
					break
		if not found:
			print('No')
t = int(input())
for _ in range(t):
	solve()


def fast(S):
	find = 'abacaba'
	accept = [[c, '?'] for c in find]
	for i in range(len(S)):
		Sarr = list(S)
		found = True
		for j in range(len(find)):
			if i + j >= len(Sarr) or Sarr[i + j] not in accept[j]:
				found = False
				break
			Sarr[i + j] = accept[j][0]
		if found:
			for k in range(len(S)):
				if (k < i or k >= j) and Sarr[k] == '?':
					Sarr[k] = 'z'
			numFound = 0
			for k in range(len(S)):
				found = True
				for j in range(len(find)):
					if k + j >= len(Sarr) or Sarr[k + j] not in accept[j]:
						found = False
						break
				if found:
					numFound += 1
			if numFound == 1:
				return ''.join(Sarr)
	return None

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		S = input()
		result = fast(S)
		if result is not None:
			print('Yes')
			print(result)
		else:
			print('No')

def test():
	S = 'abacabacaba'
	b = brute(S)
	print(b)
main()


t = int(input())
phrase = 'abacaba'

def possible(s):
	if len(s) < len(phrase):
		return False
	for i in range(len(s)):
		if s[i] != '?' and s[i] != phrase[i]:
			return False
	return True

def make_string(s, i):
	return (s[:i] + phrase + s[i + 7:]).replace('?', 'd')

def fun(s):
	for i in range(len(s)):
		if possible(s[i:i + 7]) and ('aba' + s[i + 7:]).find(phrase) == -1 and ((s[:i] + 'aba').find(phrase) == -1):
			print('YES')
			print(make_string(s, i))
			return
	print('NO')
for _ in range(t):
	n = int(input())
	s = input()
	fun(s)


__MULTITEST = True

def countStr(s, sub):
	n = len(s)
	counter = 0
	for i in range(0, n - len(sub) + 1):
		flag = True
		for j in range(len(sub)):
			if s[i + j] != sub[j]:
				flag = False
				break
		counter += 1 if flag else 0
	return counter

def solve():
	n = int(input())
	s = str(input())
	sub = 'abacaba'
	counter = countStr(s, sub)
	if counter == 1:
		print('YES')
		s = s.replace('?', 'z')
		print(s)
	elif counter > 1:
		print('NO')
	else:
		for i in range(0, n - len(sub) + 1):
			l = list(s)
			flag = True
			for j in range(len(sub)):
				if not (l[i + j] == '?' or s[i + j] == sub[j]):
					flag = False
					break
				else:
					l[i + j] = sub[j]
			if flag:
				counter = countStr(''.join(l), sub)
				if counter == 1:
					print('YES')
					print(''.join(l).replace('?', 'z'))
					return
		print('NO')
t = int(input()) if __MULTITEST else 1
for tt in range(t):
	solve()


import sys
import math
import heapq
from collections import defaultdict, deque
from decimal import *

def R():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))

def countFreq(pat, txt):
	M = len(pat)
	N = len(txt)
	res = 0
	for i in range(N - M + 1):
		for j in range(M):
			if txt[i + j] != pat[j]:
				break
		if j == M - 1 and txt[i + j] == pat[j]:
			res += 1
	if res == 1:
		for i in range(N):
			if txt[i] == '?':
				txt[i] = 'z'
		return (True, txt)
	elif res > 1:
		return (False, txt)
	res = 0
	for i in range(N - M + 1):
		txxt = txt[:]
		for j in range(M):
			if txxt[i + j] != pat[j]:
				if txxt[i + j] == '?':
					txxt[i + j] = pat[j]
					pos = i + j
				else:
					break
		if j == M - 1 and txxt[i + j] == pat[j]:
			ress = 0
			for ii in range(N - M + 1):
				jj = 0
				for jj in range(M):
					if txxt[ii + jj] != pat[jj]:
						break
				if jj == M - 1 and txxt[ii + jj] == pat[jj]:
					ress += 1
					jj = 0
			if ress == 1:
				for i in range(N):
					if txxt[i] == '?':
						txxt[i] = 'z'
				return (True, txxt)
	return (False, res)
for _ in range(R()):
	n = R()
	a = list(input())
	b = 'abacaba'
	ans = False
	(ans, s) = countFreq(b, a)
	if ans:
		print('YES')
		print(''.join(s))
	else:
		print('NO')


a = 'abacaba'

def cal(s):
	c = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == a:
			c += 1
	return c

def mz(s):
	s = list(s)
	for (i, x) in enumerate(s):
		if x == '?':
			s[i] = 'z'
	return ''.join(s)

def pos(s):
	s1 = list(s)
	n = len(s)
	i = 0
	while i < n - 7:
		j = 0
		while i + j < i + 7:
			if s[i + j] == a[j]:
				continue
			elif s[i + j] == '?':
				s1[i + j] = a[j]
			else:
				break
			j += 1
		i += 1
for _ in range(int(input())):
	n = int(input())
	s = input()
	c = cal(s)
	if c > 1:
		print('No')
		continue
	if c == 1:
		print('Yes')
		print(mz(s))
		continue
	i = 0
	while i < n - 6:
		j = 0
		temp = ''
		f = 0
		while j < 7:
			if s[i + j] == '?':
				temp += a[j]
			elif s[i + j] == a[j]:
				temp += a[j]
			else:
				f = 1
				break
			j += 1
		if f == 0:
			ans = s[:i] + temp + s[i + 7:]
			if cal(ans) == 1:
				print('Yes')
				print(mz(ans))
				break
		i += 1
	else:
		print('NO')


def CountOccurrences(string, substring):
	count = 0
	start = 0
	while start < len(string):
		pos = string.find(substring, start)
		if pos != -1:
			start = pos + 1
			count += 1
		else:
			break
	return count
che = 'abacaba'
for _ in range(int(input())):
	n = int(input())
	st = input()
	li = []
	for i in range(n):
		j = 0
		for k in range(i, min(i + 7, n)):
			if st[k] == che[j] or st[k] == '?':
				if j == 6:
					li.append(i)
				j += 1
			else:
				j = 0
	if li:
		flag = True
		for i in li:
			tem = list(st)
			for j in range(i, i + 7):
				if tem[j] == '?':
					tem[j] = che[j - i]
			if CountOccurrences(''.join(tem), che) == 1:
				print('Yes')
				flag = False
				for j in range(n):
					if tem[j] == '?':
						tem[j] = 'z'
				print(''.join(tem))
				break
		if flag:
			print('No')
	else:
		print('No')


from collections import deque
sb = 'abacaba'

def sb_count(s):
	num = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == sb:
			num += 1
	return num

def solve():
	n = int(input())
	s = input()
	count = sb_count(s)
	if count > 1:
		print('No')
		return
	elif count == 1:
		s = s.replace('?', 'd')
		print('Yes')
		print(s)
		return
	s = [*s]
	change_forbid = set()
	for i in range(n - 6):
		q = deque([])
		for j in range(7):
			if s[i + j] == '?' and (not i + j in change_forbid):
				s[i + j] = sb[j]
				q.append(i + j)
			elif s[i + j] != sb[j]:
				while q:
					ij = q.pop()
					s[ij] = '?'
				break
		else:
			if i + 10 < n and s[i + 4:i + 11] == [*sb]:
				ij = q.popleft()
				change_forbid.add(ij)
				s[ij] = '?'
				if ij < i + 4:
					s = ''.join(s)
					s = s.replace('?', 'd')
					print('Yes')
					print(s)
					return
			elif i + 12 < n and s[i + 6:i + 13] == [*sb]:
				ij = q.popleft()
				change_forbid.add(ij)
				s[ij] = '?'
				if ij < i + 6:
					s = ''.join(s)
					s = s.replace('?', 'd')
					print('Yes')
					print(s)
					return
			else:
				s = ''.join(s)
				s = s.replace('?', 'd')
				print('Yes')
				print(s)
				return
	else:
		print('No')
		return
t = int(input())
for _ in range(t):
	solve()


def countAlready(s):
	tc = 'abacaba'
	cnt = 0
	for i in range(len(s) - 6):
		if s[i:i + 7] == tc:
			cnt += 1
	return cnt
t = int(input())
for ii in range(t):
	n = int(input())
	s = input()
	num = countAlready(s)
	if num >= 2:
		print('NO')
	elif num == 1:
		print('YES')
		for i in s:
			if i == '?':
				print('z', end='')
			else:
				print(i, end='')
		print()
	else:
		match = 'abacaba'
		done = False
		for i in range(n - 6):
			temp = list(s[i:i + 7])
			for j in range(7):
				if temp[j] == '?':
					temp[j] = match[j]
			temp = ''.join(temp)
			if match == temp:
				scopy = s[:i] + match + s[i + 7:]
				num = countAlready(scopy)
				if num == 1:
					print('YES')
					for k in scopy:
						if k == '?':
							print('z', end='')
						else:
							print(k, end='')
					print()
					done = True
					break
		if not done:
			print('NO')


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
t = II()
w = list('abacaba')
for q in range(t):
	n = II()
	s = list(SI())
	boo = False
	count = 0
	for i in range(n - 6):
		if s[i:i + 7] == w:
			count += 1
	if count > 1:
		print('No')
	elif count == 1:
		for i in range(n):
			if s[i] == '?':
				s[i] = 'z'
		print('Yes')
		print(''.join(s))
	else:
		for i in range(n - 6):
			b = True
			ind = []
			for j in range(7):
				if s[i + j] != w[j]:
					if s[i + j] == '?':
						ind.append(i + j)
						s[i + j] = w[j]
					else:
						for i in ind:
							s[i] = '?'
						b = False
						break
			if b:
				count = 0
				for i in range(n - 6):
					if s[i:i + 7] == w:
						count += 1
				if count == 1:
					boo = True
					for i in range(n):
						if s[i] == '?':
							s[i] = 'z'
					break
				else:
					for i in ind:
						s[i] = '?'
		if boo:
			print('Yes')
			print(''.join(s))
		else:
			print('No')


def solve():
	str_map = 'abacaba'
	n = int(input())
	s = input()
	s_replace = s.replace('?', 'd')
	cnt = 0
	for i in range(len(s_replace)):
		if s_replace[i:i + 7] == str_map:
			cnt += 1
	if cnt == 1:
		print('YES')
		print(s_replace)
		return
	elif cnt > 1:
		print('NO')
		return
	for i in range(len(s)):
		arr = list(s)
		ok = True
		for j in range(len(str_map)):
			if i + j < len(arr) and (arr[i + j] == '?' or arr[i + j] == str_map[j]):
				arr[i + j] = str_map[j]
			else:
				ok = False
				break
		if not ok:
			continue
		s_replace = ''.join(arr).replace('?', 'd')
		if s_replace.count(str_map) == 0:
			continue
		cnt = 0
		for i in range(len(s_replace)):
			if s_replace[i:i + 7] == str_map:
				cnt += 1
			if cnt > 1:
				break
		if cnt == 1:
			print('YES')
			print(s_replace)
			return
	print('NO')
test = int(input())
for t in range(test):
	solve()


def tc():
	n = int(input())
	s = input()
	tgt = 'abacaba'
	m = len(tgt)
	cnt = 0
	for i in range(len(s) - m + 1):
		for j in range(m):
			if s[i + j] == tgt[j]:
				continue
			else:
				break
		else:
			cnt += 1
			if cnt == 2:
				print('NO')
				return
	if cnt == 1:
		print('YES')
		out = ''
		for ch in s:
			if ch == '?':
				out += 'd'
			else:
				out += ch
		print(out)
		return
	ok = False
	opts = []
	for i in range(len(s) - m + 1):
		for j in range(m):
			if s[i + j] == tgt[j] or s[i + j] == '?':
				continue
			else:
				break
		else:
			ok = True
			opts.append(i)
	if not ok:
		print('NO')
		return
	for start in opts:
		out = ''
		for i in range(start):
			if s[i] == '?':
				out += 'd'
			else:
				out += s[i]
		out += tgt
		for i in range(start + m, len(s)):
			if s[i] == '?':
				out += 'd'
			else:
				out += s[i]
		cnt = 0
		for i in range(len(out) - m + 1):
			for j in range(m):
				if out[i + j] == tgt[j]:
					continue
				else:
					break
			else:
				cnt += 1
				if cnt == 2:
					break
		if cnt == 1:
			print('YES')
			print(out)
			return
	print('NO')
T = int(input())
for _ in range(T):
	tc()


for _ in range(int(input())):
	need = list('abacaba')
	input()
	arr = list(input())
	am = len(arr)
	preCounter = 0
	okPos = []
	for i in range(am - 6):
		if arr[i:i + 7] == need:
			preCounter += 1
	if preCounter > 1:
		print('NO')
		continue
	if preCounter == 1:
		for i in range(am):
			if arr[i] == '?':
				arr[i] = 'z'
		print('YES')
		print(''.join(arr))
		continue
	for i in range(am - 6):
		allOk = True
		for g in range(len(need)):
			if arr[i + g] != '?':
				if arr[i + g] != need[g]:
					allOk = False
					break
		if allOk:
			okPos.append(i)
	if len(okPos) == 0:
		print('No')
	else:
		for i in range(len(okPos)):
			arrCopy = arr[:]
			for g in range(7):
				arrCopy[okPos[i] + g] = need[g]
			for i in range(am):
				if arrCopy[i] == '?':
					arrCopy[i] = 'z'
			count = 0
			for i in range(am - 6):
				if arrCopy[i:i + 7] == need:
					count += 1
			if count == 1:
				print('YES')
				print(''.join(arrCopy))
				break
		else:
			print('No')


from sys import stdin
fi = stdin
t = 'abacaba'

def read_int_line():
	return [int(v) for v in fi.readline().split()]

def read_int():
	return int(fi.readline())

def match(st):
	for (idx, c) in enumerate(st):
		if c != '?' and c != t[idx]:
			return False
	return True

def count(ss):
	cnt = 0
	for i in range(len(ss) - len(t) + 1):
		if ss[i:i + len(t)] == t:
			cnt += 1
	return cnt

def solve():
	n = read_int()
	s = fi.readline()[:n]
	if n < len(t):
		return (False, None)
	tmp = s.replace('?', 'z')
	if count(tmp) == 1:
		return (True, tmp)
	for i in range(0, n - len(t) + 1):
		if match(s[i:i + len(t)]):
			res = s[:i].replace('?', 'z') + t + s[i + len(t):].replace('?', 'z')
			if count(res) == 1:
				return (True, res)
	return (False, None)
n_test = read_int()
for i_test in range(n_test):
	(result_code, r) = solve()
	if result_code:
		print('Yes')
		print(r)
	else:
		print('No')


import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		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

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, 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 = os.read(self._fd, max(os.fstat(self._fd).st_size, 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:
			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')
import math
import random
import re
import heapq
magic = 'abacaba'

def bad_sol(s, idx):
	for i in range(7):
		if s[idx + i] == '?':
			s[idx + i] = magic[i]
	s = ''.join(s)
	s = s.replace('?', 'z')
	if magic in s:
		idx = s.index(magic)
		if magic in s[idx + 1:]:
			return [False, s]
		else:
			return [True, s]
	return [False, s]
t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = input()
	if magic in arr:
		idx = arr.index(magic)
		if magic in arr[idx + 1:]:
			print('NO')
			continue
		else:
			print('YES')
			print(arr.replace('?', 'z'))
			continue
	found = False
	ans = []
	arr = list(arr)
	for i in range(len(arr) - 6):
		ans = bad_sol(list(arr), i)
		if ans[0]:
			found = True
			break
	if found:
		print('Yes')
		print(ans[1].replace('?', 'z'))
	else:
		print('No')