#include <iostream>
#include <string>
using namespace std;
int t, n;
string s;
const string a = "abacaba";

int main() {
    cin >> t;
    while (t--) {
        cin >> n >> s;
        bool exista = false;
        size_t pos = s.find(a);
        if (pos < n && s.find(a, pos + 1) == string::npos)
            exista = true;
        int l = 0;
        for (int i = 0; i < n; ++i) {
            if (!exista) {
                if (s[i] == a[l])
                    ++l;
                else if (s[i] == '?') {
                    if (l < 7) {
                        s[i] = a[l];
                        ++l;
                    }
                    else
                        s[i] = 'd';
                }
                else
                    l = 0;
            }
            else if (s[i] == '?')
                s[i] = 'd';
            pos = s.find(a);
            if (pos < n && s.find(a, pos + 1) == string::npos)
                exista = true;
        }
        pos = s.find(a);
        if (pos < n && s.find(a, pos + 1) == string::npos)
            exista = true;
        if (exista) {
            cout << "Yes\n";
            for (int i = 0; i < n; ++i)
                cout << s[i];
            cout << "\n";
        }
        else
            cout << "No\n";
    }
    return 0;
}


#include <iostream>
#include <string>
using namespace std;
int t, n;
string s, a = "abacaba";

int main() {
    cin >> t;
    while (t--) {
        cin >> n >> s;
        bool exista = false;
        size_t pos = s.find(a);
        if (pos != string::npos && s.find(a, pos + 1) == string::npos)
            exista = true;
        else
            for (int i = 0, l = 0; i < n; ++i) {
                if (s[i] == a[l])
                    ++l;
                else if (s[i] == '?' && l < 7) {
                    s[i] = a[l];
                    pos = s.find(a);
                    if (pos != string::npos && s.find(a, pos + 1) != string::npos) {
                        s[i] = '?';
                        l = -1;
                    }
                    ++l;
                }
                else
                    l = 0;
            }
        pos = s.find(a);
        if (pos != string::npos && s.find(a, pos + 1) == string::npos)
            exista = true;
        if (exista) {
            cout << "Yes\n";
            for (int i = 0; i < n; ++i) {
                if (s[i] == '?') {
                    cout << "d";
                    continue;
                }
                cout << s[i];
            }
            cout << "\n";
        }
        else
            cout << "No\n";
    }
    return 0;
}


#include <iostream>
#include <string>
using namespace std;
int t, n;
string s, a = "abacaba";

int main() {
    cin >> t;
    while (t--) {
        cin >> n >> s;
        bool exista = false;
        size_t pos = s.find(a);
        if (pos != string::npos && s.find(a, pos + 1) == string::npos)
            exista = true;
        for (int i = 0; !exista && i <= n - 7; ++i) {
            for (int j = i, l = 0; j < i + 7; ++j, ++l) {
                if (s[j] == '?') {
                    s[j] = a[l];
                    pos = s.find(a);
                    if (pos != string::npos && s.find(a, pos + 1) != string::npos)
                        s[j] = '?';
                    else if (pos != string::npos && s.find(a, pos + 1) == string::npos) {
                        exista = true;
                        break;
                    }
                }
                if (s[j] != a[l])
                    break;
            }
        }
        if (exista) {
            cout << "Yes\n";
            for (int i = 0; i < n; ++i) {
                if (s[i] == '?') {
                    cout << 'd';
                    continue;
                }
                cout << s[i];
            }
            cout << "\n";
        }
        else
            cout << "No\n";
    }
    return 0;
}


#include <iostream>
#include <string>
using namespace std;
int t, n;
string s, a = "abacaba";

int main() {
    cin >> t;
    while (t--) {
        cin >> n >> s;
        bool exista = false;
        size_t pos = s.find(a);
        if (pos != string::npos && s.find(a, pos + 1) == string::npos)
            exista = true;
        else
            for (int i = 0, l = 0; !exista && i < n; ++i) {
                if (s[i] == a[l])
                    ++l;
                else if (s[i] == '?' && l < 7) {
                    s[i] = a[l];
                    pos = s.find(a);
                    if (pos != string::npos && s.find(a, pos + 1) != string::npos) {
                        s[i] = '?';
                        l = -1;
                    }
                    ++l;
                }
                else
                    l = 0;
                pos = s.find(a);
                if (pos != string::npos && s.find(a, pos + 1) == string::npos)
                    exista = true;
            }
        if (exista) {
            cout << "Yes\n";
            for (int i = 0; i < n; ++i) {
                if (s[i] == '?') {
                    cout << "d";
                    continue;
                }
                cout << s[i];
            }
            cout << "\n";
        }
        else
            cout << "No\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int t, n;
string s, a = "abacaba";
queue <int> q;

int verifica() {
    int ori = 0;
    for (int i = 0; i <= n - 7; ++i) {
        if (s.substr(i, i + 7) == a)
            ++ori;
    }
    return ori;
}

int main() {
    cin >> t;
    while (t--) {
        cin >> n >> s;
        bool exista = false;
        int ori = verifica();
        if (ori == 1)
            exista = true;
        else if (ori == 0)
            for (int i = 0; !exista && i <= n - 7; ++i) {
                for (int j = i, l = 0; j < i + 7; ++j, ++l) {
                    if (s[j] != a[l] && s[j] != '?')
                        break;
                    if (s[j] == '?') {
                        s[j] = a[l];
                        q.push(j);
                    }
                }
                ori = verifica();
                if (ori == 1) {
                    exista = true;
                    break;
                }
                while (!q.empty()) {
                    s[q.front()] = '?';
                    q.pop();
                }
            }
        if (exista) {
            cout << "Yes\n";
            for (int i = 0; i < n; ++i) {
                if (s[i] == '?') {
                    cout << 'd';
                    continue;
                }
                cout << s[i];
            }
            cout << "\n";
        }
        else
            cout << "No\n";
    }
    return 0;
}


#include <iostream>
#include <string>
using namespace std;
int t, n;
string s;
const string a = "abacaba";

int main() {
    cin >> t;
    while (t--) {
        cin >> n >> s;
        bool exista = false;
        size_t pos = s.find(a);
        if (pos < n && s.find(a, pos + 1) > n)
            exista = true;
        int l = 0;
        for (int i = 0; i < n; ++i) {
            if (!exista) {
                if (s[i] == a[l])
                    ++l;
                else if (s[i] == '?') {
                    s[i] = a[l];
                    ++l;
                }
                else
                    l = 0;
            }
            else if (s[i] == '?')
                s[i] = 'd';
        }
        pos = s.find(a);
        if (pos < n && s.find(a, pos + 1) > n)
            exista = true;
        if (exista) {
            cout << "Yes\n";
            for (int i = 0; i < n; ++i)
                cout << s[i];
            cout << "\n";
        }
        else
            cout << "No\n";
    }
    return 0;
}


#include <iostream>
#include <string>
using namespace std;
int t, n;
string s, a = "abacaba";

int verifica() {
    int ori = 0;
    for (int i = 0; i <= n - 7; ++i) {
        if (s.substr(i, i + 7) == a)
            ++ori;
    }
    return ori;
}

int main() {
    cin >> t;
    while (t--) {
        cin >> n >> s;
        bool exista = false;
        int ori = verifica();
        if (ori == 1)
            exista = true;
        else if (ori == 0)
            for (int i = 0; !exista && i <= n - 7; ++i) {
                for (int j = i, l = 0; j <= i + 6; ++j, ++l) {
                    if (s[j] != a[l] && s[j] != '?')
                        break;
                    if (s[j] == '?') {
                        s[j] = a[l];
                        ori = verifica();
                        if (ori > 1) {
                            s[j] = '?';
                            break;
                        }
                        if (ori == 1) {
                            exista = true;
                            break;
                        }
                    }
                }
            }
        if (exista) {
            cout << "Yes\n";
            for (int i = 0; i < n; ++i) {
                if (s[i] == '?') {
                    cout << 'd';
                    continue;
                }
                cout << s[i];
            }
            cout << "\n";
        }
        else
            cout << "No\n";
    }
    return 0;
}


#include <iostream>
#include <string>
using namespace std;
int t, n;
string s;
const string a = "abacaba";

int main() {
    cin >> t;
    while (t--) {
        cin >> n >> s;
        bool exista = false;
        size_t pos = s.find(a);
        if (pos < n && s.find(a, pos + 1) > n)
            exista = true;
        int l = 0;
        for (int i = 0; i < n; ++i) {
            if (!exista) {
                if (s[i] == a[l])
                    ++l;
                else if (s[i] == '?') {
                    if (l < 7) {
                        s[i] = a[l];
                        ++l;
                    }
                    else
                        s[i] = 'd';
                }
                else
                    l = 0;
            }
            else if (s[i] == '?')
                s[i] = 'd';
        }
        pos = s.find(a);
        if (pos < n && s.find(a, pos + 1) > n)
            exista = true;
        if (exista) {
            cout << "Yes\n";
            for (int i = 0; i < n; ++i)
                cout << s[i];
            cout << "\n";
        }
        else
            cout << "No\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int t, n;
string s, a = "abacaba";
queue <int> q;

int verifica() {
    int ori = 0;
    for (int i = 0; i <= n - 7; ++i) {
        if (s.substr(i, i + 7) == a)
            ++ori;
    }
    return ori;
}

int main() {
    cin >> t;
    while (t--) {
        cin >> n >> s;
        bool exista = false;
        int ori = verifica();
        if (ori == 1)
            exista = true;
        else if (ori == 0)
            for (int i = 0; !exista && i <= n - 7; ++i) {
                for (int j = i, l = 0; j < i + 7; ++j, ++l) {
                    if (s[j] == '?') {
                        s[j] = a[l];
                        q.push(j);
                    }
                }
                ori = verifica();
                if (ori == 1)
                    exista = true;
                else
                    while (!q.empty()) {
                        s[q.front()] = '?';
                        q.pop();
                    }
            }
        if (exista) {
            cout << "Yes\n";
            for (int i = 0; i < n; ++i) {
                if (s[i] == '?') {
                    cout << 'd';
                    continue;
                }
                cout << s[i];
            }
            cout << "\n";
        }
        else
            cout << "No\n";
    }
    return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int main()
{
    cin >> tc;

    while(tc--)
    {
        int n;
        string str, s, tem;
        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            tem = str;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] || str[i + j] == '?')
                {

                    tem[i + j]= s[j];
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
            if(ans == 1) break;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(tem[i] == '?') tem[i] = 'z';
                cout << tem[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;
int n;
string s = "abacaba";
int check(string str)
{
    int ans = 0;
    for(int i = 0; i < n - 6; i++)
    {
        if(str.substr(i, 7) == s)
        ans++;
    }
    if(ans == 1) return 1;
    else if(ans > 1) return 2;
    return 0;
}
int main()
{
    cin >> tc;

    while(tc--)
    {

        string str, s, tem;
        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            tem = str;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << j << " " << i + j << endl;
                if(s[j] == tem[i + j] || tem[i + j] == '?')
                {

                    tem[i + j]= s[j];
                    cnt++;
                }
                else {cnt = 0; break;}
            }
            ans = check(tem);
            if(ans == 1) break;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i < n; i++)
            {
                if(tem[i] == '?') tem[i] = 'z';
                cout << tem[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int n;
string str, s;
void solve()
{
    for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }
}

int main()
{
    cin >> tc;

    while(tc--)
    {

        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

        solve();

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] || str[i + j] == '?')
                {

                    str[i + j] = s[j];
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;

        }
        ans = 0;
        solve();
        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;
int n;
string s = "abacaba";
int check(string str)
{
    int ans = 0;
    for(int i = 0; i < n - 6; i++)
    {
        if(str.substr(i, 7) == s)
        ans++;
    }
    if(ans == 1) return 1;
    else if(ans > 1) return 2;
    return 0;
}
int main()
{
    cin >> tc;

    while(tc--)
    {

        string str, s, tem;
        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            tem = str;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << j << " " << i + j << endl;
                if(s[j] == tem[i + j] || tem[i + j] == '?')
                {

                    tem[i + j]= s[j];
                    cnt++;
                }
                else break;
            }
            ans = cnt == 7;
            if(ans == 1) break;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i < n; i++)
            {
                if(tem[i] == '?') tem[i] = 'z';
                cout << tem[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int main()
{
    cin >> tc;

    while(tc--)
    {
        int n;
        string str, s;
        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') cout << 'd';
                else cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] || str[i + j] == '?')
                {

                    str[i + j] = s[j];
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
            if(ans) break;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') cout << 'd';
                else cout << str[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int main()
{
    cin >> tc;

    while(tc--)
    {
        int n;
        string str, s, tem;
        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            tem = str;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == tem[i + j] || tem[i + j] == '?')
                {

                    tem[i + j]= s[j];
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
            if(ans == 1) break;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(tem[i] == '?') tem[i] = 'z';
                cout << tem[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;
int n;
string s = "abacaba";
int check(string str)
{
    int ans = 0;
    for(int i = 0; i < n - 6; i++)
    {
        if(str.substr(i, 7) == s)
        ans++;
    }
    if(ans == 1) return 1;
    else if(ans > 1) return 2;
    return 0;
}
int main()
{
    cin >> tc;

    while(tc--)
    {

        string str, s, tem;
        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            tem = str;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << j << " " << i + j << endl;
                if(s[j] == tem[i + j] || tem[i + j] == '?')
                {

                    tem[i + j]= s[j];
                    cnt++;
                }
                else break;
            }
            ans = check(tem);
            if(ans == 1) break;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i < n; i++)
            {
                if(tem[i] == '?') tem[i] = 'z';
                cout << tem[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int main()
{
    cin >> tc;

    while(tc--)
    {
        int n;
        string str, s;
        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] || str[i + j] == '?')
                {

                    str[i + j] = s[j];
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
            if(ans) break;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int n;
string  s = "abacaba";

int check(string str)
{
    int ans = 0;
    for(int i = 0; i < n - 6; i++)
    {
        if(str.substr(i, 7) == s)
        ans++;
    }
    if(ans == 1) return 1;
    else if(ans > 1) return 2;
    return 0;
}

void solve(string str)
{
    for(int i = 0; i < n; i++)
    {
        string tem = str;
        for(int j = 0; j < 7 && i + j < n; j++)
        {
            if(tem[i + j] == '?') tem[i + j] = s[j];
        }
        if(check(tem) == 1)
        {
            cout << "YES\n";
            for(int i = 0; i< n; i++)
                if(tem[i] == '?') tem[i] = 'z';
            cout << tem << endl;
            return ;
        }
    }
    cout << "NO\n";
}
int main()
{
    cin >> tc;
    while(tc--)
    {
        string str;
        cin >> n;
        cin >> str;
        ans = check(str);
        if(ans == 1)
        {
            cout << "YES\n";
            for(int i = 0; i < n; i++)
                if(str[i] == '?') str[i] = 'z';
            cout << str << endl;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
        }
        else solve(str);

    }
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int n;
string  s = "abacaba";

int check(string str)
{
    int ans = 0;
    for(int i = 0; i < n - 6; i++)
    {
        if(str.substr(i, 7) == s)
        ans++;
    }
    if(ans == 1) return 1;
    else if(ans > 1) return 2;
    return 0;
}

void solve(string str)
{
    for(int i = 0; i < n; i++)
    {
        string tem = str;
        for(int j = 0; j < 7 && i + j < n; j++)
        {
            if(tem[i + j] == '?') tem[i + j] = s[j];
        }
        if(check(tem) == 1)
        {
            cout << "YESs\n";
            for(int i = 0; i< n; i++)
                if(tem[i] == '?') tem[i] = 'z';
            cout << tem << endl;
            return ;
        }
    }
    cout << "NO\n";
}
int main()
{
    cin >> tc;
    while(tc--)
    {
        string str;
        cin >> n;
        cin >> str;
        ans = check(str);
        if(ans == 1)
        {
            cout << "YES\n";
            for(int i = 0; i < n; i++)
                if(str[i] == '?') str[i] = 'z';
            cout << str << endl;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
        }
        else solve(str);

    }
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;
int n;
string s = "abacaba";
int check(string str)
{
    int ans = 0;
    for(int i = 0; i < n - 6; i++)
    {
        if(str.substr(i, 7) == s)
        ans++;
    }
    if(ans == 1) return 1;
    else if(ans > 1) return 2;
    return 0;
}
int main()
{
    cin >> tc;

    while(tc--)
    {

        string str, s, tem;
        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            tem = str;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << j << " " << i + j << endl;
                if(s[j] == tem[i + j] || tem[i + j] == '?')
                {

                    tem[i + j]= s[j];
                    cnt++;
                }
                else {cnt = 0; break;}
            }
            ans = chec(tem);
            if(ans == 1) break;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i < n; i++)
            {
                if(tem[i] == '?') tem[i] = 'z';
                cout << tem[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int main()
{
    cin >> tc;
    string str, s;
    while(tc--)
    {
        int n;

        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n ; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {

                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }

        for(int i = 0; i < n ; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] || str[i + j] == '?')
                {
                    if(ans && str[i + j] == '?') continue;
                    str[i + j] = s[j];
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int main()
{
    cin >> tc;
    string str, s;
    while(tc--)
    {
        int n;

        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n ; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {

                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }

        ans = 0;
        for(int i = 0; i < n ; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] || str[i + j] == '?')
                {
                    if(ans && str[i + j] == '?') continue;
                    str[i + j] = s[j];
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int main()
{
    cin >> tc;
    string str, s;
    while(tc--)
    {
        int n;

        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n - 7 + 1; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {

                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n - 7 + 1; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
               // cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] || str[i + j] == '?')
                {
                    if(ans && str[i + j] == '?') continue;
                    str[i + j] = s[j];
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
            if(ans) break;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;

int n;
string str, s;
void solve()
{
    for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }
}

int main()
{
    cin >> tc;

    while(tc--)
    {

        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

        solve();

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] || str[i + j] == '?')
                {

                    str[i + j] = s[j];
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
            if(ans) break;
        }
        ans = 0;
        solve();
        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef
tree < int, null_type ,less<int>,
rb_tree_tag,
tree_order_statistics_node_update > ordered_set;
#include <string>
#include <vector>
#define ll              long long
#define ull             unsigned long long
#define vint            vector<int>
#define vll             vector<ll>
#define pint            pair<int,int>
#define pll             pair<ll,ll>
#define mint            map<int,int>
#define mll             map<ll,ll>
#define mstr            map<string,int>
#define si(a)           scanf("%day",&a)
#define sc(a)           scanf("%c",&a)
#define sii(a,b)        scanf("%d %d",&a, &b)
#define siii(a,b,c)     scanf("%d %d %d", &a, &b,&c)
#define siiii(a,b,c,d)  scanf("%d %d %d %d",&a, &b,&c,&d)
#define sl(a)           scanf("%lld",&a)
#define sll(a,b)        scanf("%lld %lld",&a, &b)
#define slll(a,b,c)     scanf("%lld %lld %lld",&a, &b, &c)
#define sllll(a,b,c,d)  scanf("%lld %lld %lld %lld",&a, &b, &c, &d)
#define sqr(a)          a*a;
#define pf              printf
#define pb              push_back
#define pfi(a)          printf("%d\n",a)
#define pfis(a)         printf("%d ",a)
#define pfls(a)         printf("%lld",a)
#define pfii(a,b)       printf("%d %d\n",a,b)
#define pfiii(a,b,c)    printf("%d %d %d\n",a,b,c)
#define pfl(a)          printf("%lld\n",a);
#define pfll(a,b)       printf("%lld %lld\n",a,b)
#define pflll(a,b,c)    printf("%lld %lld %lld\n",a,b,c)
#define mem(a,b)        memset(a, b, sizeof(a));
#define max3(a,b,c)     max(max(a, b), c);
#define min3(a,b,c)     min(min(a, b), c);
#define min4(a,b,c,d)   min(min(min(a, b), c), d);
#define for0(i,n)       for(int i = 0; i < n;  i++)
#define for1(i,n)       for(int i = 1; i <= n;  i++)
#define rfor0(i,n)      for(int i = n - 1; i>=0; i--)
#define rfor1(i,n)      for(int i = n; i>=1; i--)
#define pi              acos(-1.0)
#define nl              '\n'
#define in              freopen("input.txt", "r", stdin);
#define out             freopen("output.txt", "w", stdout);
#define cs(t)           printf("Case %d: ",++t);
#define mp              make_pair
#define all(sss)        sss.begin(),sss.end()
#define X               first
#define Y               second
#define re              register int
#define ak              *
#define err             1e-5
#define pi              acos(-1.0)
#define fast            ios_base::sync_with_stdio(0);cin.tie(0);
const ll maxn = 1e6 + 7  , mod = 9e9;
const unsigned ll MAX = (1<< 5) - 2;  // 10^8
const int LMT =     10000;  // sqrt(MAX)
ll  sum, cnt, ans,  tc,t, ans2,flag, maxi = -INT_MAX, mini = INT_MAX, pos, len;
int n;
string s = "abacaba";
int check(string str)
{
    int ans = 0;
    for(int i = 0; i < n - 6; i++)
    {
        if(str.substr(i, 7) == s)
        ans++;
    }
    if(ans == 1) return 1;
    else if(ans > 1) return 2;
    return 0;
}
int main()
{
    cin >> tc;

    while(tc--)
    {

        string str, s, tem;
        cin >> n;
        cin >> str;
        s = "abacaba";
        ans  = 0;
       // cout << n << endl;

       for(int i = 0; i < n; i++)
        {
            //cout << i << nl;
            cnt = 0;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << s[j] << " " << str[i + j] << endl;
                if(s[j] == str[i + j] )
                {
                    cnt++;
                }
                else break;
            }
            //cout << cnt << nl;
            if(cnt == 7) ans++;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i< n; i++)
            {
                if(str[i] == '?') str[i] = 'z';
                cout << str[i];
            }
            cout << endl;
            continue;
        }
        else if(ans > 1)
        {
            cout << "NO\n";
            continue;
        }

        ans = 0;
        for(int i = 0; i < n; i++)
        {
           // cout << i << nl;
            cnt = 0;
            tem = str;
            for(int j = 0; j < 7 && i + j < n; j++)
            {
                //cout << j << " " << i + j << endl;
                if(s[j] == tem[i + j] || tem[i + j] == '?')
                {

                    tem[i + j]= s[j];
                    cnt++;
                }
                else {cnt = 0; break;}
            }
            ans = cnt == 7;
            if(ans == 1) break;
        }

        if(ans == 1)
        {
            cout << "YES\n";
            for(int i= 0; i < n; i++)
            {
                if(tem[i] == '?') tem[i] = 'z';
                cout << tem[i];
            }
            cout << endl;
        }
        else
        {
            cout << "NO\n";

        }

    }

}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define N 300005
#define M 100005
#define INF 0x3f3f3f3f
#define mk(x) (1<<x) // be conscious if mask x exceeds int
#define sz(x) ((int)x.size())
#define mp(a,b) make_pair(a, b)
#define endl '\n'
#define lowbit(x) (x&-x)

using namespace std;
typedef long long ll;
typedef double db;

/** fast read **/
template <typename T>
inline void read(T &x) {
    x = 0; T fg = 1; char ch = getchar();
    while (!isdigit(ch)) {
        if (ch == '-') fg = -1;
        ch = getchar();
    }
    while (isdigit(ch)) x = x*10+ch-'0', ch = getchar();
    x = fg * x;
}
template <typename T, typename... Args>
inline void read(T &x, Args &... args) { read(x), read(args...); }

char s[N];
int main()
{
    int n; cin >> n;
    scanf("%s", s+1);
    ll ans = 0;
    ll cnta = 0, cntb = 0;
    for (int i = 1; i <= n; i++) {
        if (i >= 2 && s[i] != s[i-1])
            ans++;
        if (s[i] == 'A') {
            if (cntb >= 1) {
                ans += cntb-1;
                cntb = 0;
            }
            cnta++;
        }
        else if (s[i] == 'B') {
            if (cnta >= 1) {
                ans += cnta-1;
                cnta = 0;
            }
            cntb++;
        }
    }
    cnta = cntb = 0;
    for (int i = n; i >= 1; i--) {
        if (s[i] == 'A') {
            if (cntb > 1) {
                ans += cntb-1;
                cntb = 0;
            }
            cnta++;
        }
        else if (s[i] == 'B') {
            if (cnta > 1) {
                ans += cnta-1;
                cnta = 0;
            }
            cntb++;
        }
    }
    cout << 1LL*n*(n-1)/2 - ans << endl;

    return 0;
}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define N 300005
#define M 100005
#define INF 0x3f3f3f3f
#define mk(x) (1<<x) // be conscious if mask x exceeds int
#define sz(x) ((int)x.size())
#define mp(a,b) make_pair(a, b)
#define endl '\n'
#define lowbit(x) (x&-x)

using namespace std;
typedef long long ll;
typedef double db;

/** fast read **/
template <typename T>
inline void read(T &x) {
    x = 0; T fg = 1; char ch = getchar();
    while (!isdigit(ch)) {
        if (ch == '-') fg = -1;
        ch = getchar();
    }
    while (isdigit(ch)) x = x*10+ch-'0', ch = getchar();
    x = fg * x;
}
template <typename T, typename... Args>
inline void read(T &x, Args &... args) { read(x), read(args...); }

char s[N];
int main()
{
    int n; cin >> n;
    scanf("%s", s+1);
    ll ans = 0;
    ll cnta = 0, cntb = 0;
    for (int i = 1; i <= n; i++) {
        if (i >= 2 && s[i] != s[i-1])
            ans++;
        if (s[i] == 'A') {
            if (cntb >= 1) {
                ans += cntb-1;
                cntb = 0;
            }
            cnta++;
        }
        else if (s[i] == 'B') {
            if (cnta >= 1) {
                ans += cnta-1;
                cnta = 0;
            }
            cntb++;
        }
    }
    cnta = cntb = 0;
    for (int i = n; i >= 1; i--) {
        if (s[i] == 'A') {
            if (cntb >= 1) {
                ans += cntb-1;
                cntb = 0;
            }
            cnta++;
        }
        else if (s[i] == 'B') {
            if (cnta >= 1) {
                ans += cnta-1;
                cnta = 0;
            }
            cntb++;
        }
    }
    cout << 1LL*n*(n-1)/2 - ans << endl;

    return 0;
}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define N 300005
#define M 100005
#define INF 0x3f3f3f3f
#define mk(x) (1<<x) // be conscious if mask x exceeds int
#define sz(x) ((int)x.size())
#define mp(a,b) make_pair(a, b)
#define endl '\n'
#define lowbit(x) (x&-x)

using namespace std;
typedef long long ll;
typedef double db;

/** fast read **/
template <typename T>
inline void read(T &x) {
    x = 0; T fg = 1; char ch = getchar();
    while (!isdigit(ch)) {
        if (ch == '-') fg = -1;
        ch = getchar();
    }
    while (isdigit(ch)) x = x*10+ch-'0', ch = getchar();
    x = fg * x;
}
template <typename T, typename... Args>
inline void read(T &x, Args &... args) { read(x), read(args...); }

char s[N];
int main()
{
    int n; cin >> n;
    scanf("%s", s+1);
    ll ans = 1LL*n*(n-1)/2;
    ll cnta = 0, cntb = 0;
    for (int i = 1; i <= n; i++) {
        if (i >= 2 && s[i] != s[i-1])
            ans--;
        if (s[i] == 'A') {
            if (cntb > 1) {
                ans -= cntb-1;
                cntb = 0;
            }
            cnta++;
        }
        else if (s[i] == 'B') {
            if (cnta > 1) {
                ans -= cnta-1;
                cnta = 0;
            }
            cntb++;
        }
    }
    cnta = cntb = 0;
    for (int i = n; i >= 1; i--) {
        if (s[i] == 'A') {
            if (cntb > 1) {
                ans -= cntb-1;
                cntb = 0;
            }
            cnta++;
        }
        else if (s[i] == 'B') {
            if (cnta > 1) {
                ans -= cnta-1;
                cnta = 0;
            }
            cntb++;
        }
    }
    cout << ans << endl;

    return 0;
}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define N 300005
#define M 100005
#define INF 0x3f3f3f3f
#define mk(x) (1<<x) // be conscious if mask x exceeds int
#define sz(x) ((int)x.size())
#define mp(a,b) make_pair(a, b)
#define endl '\n'
#define lowbit(x) (x&-x)

using namespace std;
typedef long long ll;
typedef double db;

/** fast read **/
template <typename T>
inline void read(T &x) {
    x = 0; T fg = 1; char ch = getchar();
    while (!isdigit(ch)) {
        if (ch == '-') fg = -1;
        ch = getchar();
    }
    while (isdigit(ch)) x = x*10+ch-'0', ch = getchar();
    x = fg * x;
}
template <typename T, typename... Args>
inline void read(T &x, Args &... args) { read(x), read(args...); }

char s[N];
int last[N][2], nxt[N][2];
int main()
{
    int n; cin >> n;
    scanf("%s", s+1);
    memset(last, -1, sizeof last);
    memset(nxt, -1, sizeof nxt);
    ll ans = 0;
    for (int i = 1; i <= n; i++) {
        last[i][s[i]-'A'] = i;
        last[i][1 - (s[i]-'A')] = last[i-1][1 - (s[i]-'A')];
        if (i >= 2 && s[i] != s[i-1])
            ans++;
    }
    for (int i = n; i >= 1; i--) {
        nxt[i][s[i]-'A'] = i;
        nxt[i][1 - (s[i]-'A')] = nxt[i+1][1 - (s[i]-'A')];
    }
    for (int i = 1; i <= n; i++) {
        int id = s[i]-'A';
        if (last[i-1][id] != -1)
            ans += max(0, i - last[i-1][id] - 2);
        else
            ans += max(0, i - 2);
        if (nxt[i+1][id] != -1)
            ans += max(0, nxt[i+1][id] - i - 2);
        else
            ans += max(0, n - i - 1);
    }
    cout << 1LL*n*(n-1)/2 - ans << endl;

    return 0;
}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define N 300005
#define M 100005
#define INF 0x3f3f3f3f
#define mk(x) (1<<x) // be conscious if mask x exceeds int
#define sz(x) ((int)x.size())
#define mp(a,b) make_pair(a, b)
#define endl '\n'
#define lowbit(x) (x&-x)

using namespace std;
typedef long long ll;
typedef double db;

/** fast read **/
template <typename T>
inline void read(T &x) {
    x = 0; T fg = 1; char ch = getchar();
    while (!isdigit(ch)) {
        if (ch == '-') fg = -1;
        ch = getchar();
    }
    while (isdigit(ch)) x = x*10+ch-'0', ch = getchar();
    x = fg * x;
}
template <typename T, typename... Args>
inline void read(T &x, Args &... args) { read(x), read(args...); }

char s[N];
int main()
{
    int n; cin >> n;
    scanf("%s", s+1);
    ll ans = n*(n-1)/2;
    ll cnta = 0, cntb = 0;
    for (int i = 1; i <= n; i++) {
        if (i >= 2 && s[i] != s[i-1])
            ans--;
        if (s[i] == 'A') {
            if (cntb > 1) {
                ans -= cntb-1;
                cntb = 0;
            }
            cnta++;
        }
        else if (s[i] == 'B') {
            if (cnta > 1) {
                ans -= cnta-1;
                cnta = 0;
            }
            cntb++;
        }
    }
    cnta = cntb = 0;
    for (int i = n; i >= 1; i--) {
        if (s[i] == 'A') {
            if (cntb > 1) {
                ans -= cntb-1;
                cntb = 0;
            }
            cnta++;
        }
        else if (s[i] == 'B') {
            if (cnta > 1) {
                ans -= cnta-1;
                cnta = 0;
            }
            cntb++;
        }
    }
    cout << ans << endl;

    return 0;
}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define N 300005
#define M 100005
#define INF 0x3f3f3f3f
#define mk(x) (1<<x) // be conscious if mask x exceeds int
#define sz(x) ((int)x.size())
#define mp(a,b) make_pair(a, b)
#define endl '\n'
#define lowbit(x) (x&-x)

using namespace std;
typedef long long ll;
typedef double db;

/** fast read **/
template <typename T>
inline void read(T &x) {
    x = 0; T fg = 1; char ch = getchar();
    while (!isdigit(ch)) {
        if (ch == '-') fg = -1;
        ch = getchar();
    }
    while (isdigit(ch)) x = x*10+ch-'0', ch = getchar();
    x = fg * x;
}
template <typename T, typename... Args>
inline void read(T &x, Args &... args) { read(x), read(args...); }

char s[N];
int main()
{
    int n; cin >> n;
    scanf("%s", s+1);
    ll ans = 0;
    ll cnta = 0, cntb = 0;
    for (int i = 1; i <= n; i++) {
        if (i >= 2 && s[i] != s[i-1])
            ans++;
        if (s[i] == 'A') {
            if (cntb > 1) {
                ans += cntb-1;
                cntb = 0;
            }
            cnta++;
        }
        else if (s[i] == 'B') {
            if (cnta > 1) {
                ans += cnta-1;
                cnta = 0;
            }
            cntb++;
        }
    }
    cnta = cntb = 0;
    for (int i = n; i >= 1; i--) {
        if (s[i] == 'A') {
            if (cntb > 1) {
                ans += cntb-1;
                cntb = 0;
            }
            cnta++;
        }
        else if (s[i] == 'B') {
            if (cnta > 1) {
                ans += cnta-1;
                cnta = 0;
            }
            cntb++;
        }
    }
    cout << 1LL*n*(n-1)/2 - ans << endl;

    return 0;
}


#include <iostream>
using namespace std;

int main(){
  int n;
  cin>>n;
  string s;
  cin>>s;
  long long ans=1LL*n*(n-1)/2;
  int base=0;
  for(int i=1;i+1<n;i++){
    if(s[i]!=s[i-1]){
      ans++;
      ans-=(i-base);
      base=i;
    }
  }

  base=n-1;
  for(int i=n-2;i+1>=0;i--){
    if(s[i]!=s[i+1]){
      ans-=(base-i);
      base=i;
    }
  }
  cout<<ans<<endl;
  return 0;
}


#include <iostream>
using namespace std;

int main(){
  int n;
  cin>>n;
  string s;
  cin>>s;
  long long ans=1LLn*(n-1)/2;
  int base=0;
  for(int i=1;i+1<n;i++){
    if(s[i]!=s[i-1]){
      ans++;
      ans-=(i-base);
      base=i;
    }
  }

  base=n-1;
  for(int i=n-2;i-1>=0;i--){
    if(s[i]!=s[i+1]){
      ans-=(base-i);
      base=i;
    }
  }
  cout<<ans<<endl;
  return 0;
}


#include <iostream>
using namespace std;

int main(){
  int n;
  cin>>n;
  string s;
  cin>>s;
  long long ans=1LL*n*(n-1)/2;
  int base=0;
  for(int i=1;i<n;i++){
    if(s[i]!=s[i-1]){
      ans++;
      ans-=(i-base);
      base=i;
    }
  }

  base=n-1;
  for(int i=n-2;i>=0;i--){
    if(s[i]!=s[i+1]){
      ans-=(base-i);
      base=i;
    }
  }
  cout<<ans<<endl;
  return 0;
}


#include <iostream>
using namespace std;

int main(){
  int n;
  cin>>n;
  string s;
  cin>>s;
  long long ans=n*(n-1)/2;
  int base=0;
  for(int i=1;i+1<n;i++){
    if(s[i]!=s[i-1]){
      ans++;
      ans-=(i-base);
      base=i;
    }
  }

  base=n-1;
  for(int i=n-2;i-1>=0;i--){
    if(s[i]!=s[i+1]){
      ans-=(base-i);
      base=i;
    }
  }
  cout<<ans<<endl;
  return 0;
}


#include <iostream>
using namespace std;

int main(){
  int n;
  cin>>n;
  string s;
  cin>>s;
  long long ans=1LL*n*(n-1)/2;
  int base=0;
  for(int i=1;i+1<n;i++){
    if(s[i]!=s[i-1]){
      ans++;
      ans-=(i-base);
      base=i;
    }
  }

  base=n-1;
  for(int i=n-2;i-1>=0;i--){
    if(s[i]!=s[i+1]){
      ans-=(base-i);
      base=i;
    }
  }
  cout<<ans<<endl;
  return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
	int n;
	string s;
	cin >> n >> s;
	long long res=0, cnt=0;
	for(int i=0; i+1<n; i++){
		if(s[i]=='A'){
			if(s[i+1]=='A') cnt++;
			else{
				for(int j=i+1; j+1<n; j++){
					if(s[j]=='B' && s[j+1]=='A'){
						long long k=j-(i+1);
						res+=k*(k+1)/2;
						cnt++;
						i=j-1;
						break;
					}
				}
			}
		}
		else{
			if(s[i+1]=='B') cnt++;
			else{
				for(int j=i+1; j+1<n; j++){
					if(s[j]=='A' && s[j+1]=='B'){
						long long k=j-(i+1);
						res+=k*(k+1)/2;
						cnt++;
						i=j-1;
						break;
					}
				}
			}
		}
	}
	res+=cnt*(cnt+1)/2;
	cout << res;
}


#include <bits/stdc++.h>
using namespace std;
#define debug(x) cerr << #x << " = " << x << endl;
const int MAX=3*1e5;
vector<long long> tree(2*MAX, 0);
void update(int p, long long val){
	p+=MAX;
	tree[p]=val;
	for(p/=2; p>=1; p/=2){
		tree[p]=max(tree[2*p], tree[2*p+1]);
	}
}
long long get(int l, int r){
	l+=MAX, r+=MAX;
	long long res=0;
	while(l<=r){
		if(l%2==1) res=max(res, tree[l++]);
		if(r%2==0) res=max(res, tree[r--]);
		l/=2, r/=2;
	}
	return res;
}
int main(){
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	int n;
	string s;
	cin >> n >> s;
	vector<int> r(n, 0);
	for(int i=0; i+1<n; i++){
		if(s[i]=='A'){
			if(s[i+1]=='A') r[i]=i+1;
			else{
				for(int j=i+1; j+1<n; j++){
					if(s[j]=='B' && s[j+1]=='A'){
						r[i]=j+1;
						i=j-1;
						break;
					}
					else r[j]=j+1;
				}
			}
		}
		else{
			if(s[i+1]=='B') r[i]=i+1;
			else{
				for(int j=i+1; j+1<n; j++){
					if(s[j]=='A' && s[j+1]=='B'){
						r[i]=j+1;
						i=j-1;
						break;
					}
					else r[j]=j+1;
				}
			}
		}
	}
	long long res=0;
	for(int i=0; i<n; i++){
		if(r[i]==0) continue;
		long long x=get(max(i-1, 0), r[i])+1;
		res+=x;
//		debug(i)
//		debug(x)
		update(r[i], x);
	}
	cout << res;
}


#include <bits/stdc++.h>
using namespace std;
#define debug(x) cerr << #x << " = " << x << endl;
const int MAX=3*1e5;
vector<long long> tree(2*MAX, 0);
void update(int p, long long val){
	p+=MAX;
	tree[p]=val;
	for(p/=2; p>=1; p/=2){
		tree[p]=max(tree[2*p], tree[2*p+1]);
	}
}
long long get(int l, int r){
	l+=MAX, r+=MAX;
	long long res=0;
	while(l<=r){
		if(l%2==1) res=max(res, tree[l++]);
		if(r%2==0) res=max(res, tree[r--]);
		l/=2, r/=2;
	}
	return res;
}
string s;
int main(){
//	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	int n;
	cin >> n >> s;
	vector<int> r(n, 0);
	for(int i=0; i+1<n; i++){
		if(s[i]=='A'){
			if(s[i+1]=='A') r[i]=i+1;
			else{
				for(int j=i+1; j+1<n; j++){
					if(s[j]=='B' && s[j+1]=='A'){
						r[i]=j+1;
						i=j-1;
						break;
					}
					else r[j]=j+1;
				}
			}
		}
		else{
			if(s[i+1]=='B') r[i]=i+1;
			else{
				for(int j=i+1; j+1<n; j++){
					if(s[j]=='A' && s[j+1]=='B'){
						r[i]=j+1;
						i=j-1;
						break;
					}
					else r[j]=j+1;
				}
			}
		}
	}
	long long res=0;
	for(int i=0; i<n; i++){
		if(r[i]==0) continue;
		long long x=get(max(i-1, 0), r[i])+1;
		res+=x;
//		debug(i)
//		debug(x)
		update(r[i], x);
	}
	cout << res;
}