/*
                                             ::                     ::
                                             ':                     :
                                              :.                    :
                                           ;' ::                   ::  '
                                          .'  ';                   ;'  '.
                                         ::    :;                 ;:    ::
                                         ;      :;.             ,;:     ::
                                         :;      :;:           ,;"      ::
                                         ::.      ':;  ..,.;  ;:'     ,.;:
                                          "'"...   '::,::::: ;:   .;.;""'
                                              '"""....;:::::;,;.;"""
                                          .:::.....'"':::::::'",...;::::;.
                                         ;:' '""'"";.,;:::::;.'""""""  ':;
                                        ::'         ;::;:::;::..         :;
                                       ::         ,;:::::::::::;:..       ::
                                       ;'     ,;;:;::::::::::::::;";..    ':.
                                      ::     ;:"  ::::::"""'::::::  ":     ::
                                       :.    ::   ::::::;  :::::::   :     ;
                                        ;    ::   :::::::  :::::::   :    ;
                                         '   ::   ::::::....:::::'  ,:   '
                                          '  ::    :::::::::::::"   ::
                                             ::     ':::::::::"'    ::
                                             ':       """""""'      ::
                                              ::                   ;:
                                              ':;                 ;:"


                                                     P_r_A_d_Y
*/
#include<bits/stdc++.h>
using namespace std;
#define int long long int
#define endl "\n"
#define mod 1000000007
#define inf 1e18
const int N = 300005;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL);
void cs(int &x)
{
    cout << "Case #" << x << ": ";
}
bool cmp(string a, string b)
{
    return a + b < b + a;
}

int32_t main()
{
    fastIO;
    // int t; cin >> t;
    // int x = 1;
    // while (t--)
    // {

    int n,a,b,c;cin>>n>>a>>b>>c;

    vector<string>v(n);
    for(int i=0;i<n;i++)
        cin>>v[i];

    vector<char>ans;
    int fl=-1;
    for(int i=0;i<n;i++)
    {
        string s;s=v[i];
        if(s=="AB")
        {
            
            if(a==0 && b==0)
                {fl++;break;}
            else if(a<b)
            {
                
                a+=1;
                b-=1;
                ans.push_back('A');
            }
            else if(a>b)
            {

                a-=1;
                b+=1;
                ans.push_back('B');
            }
            else
            {
                if(i==n-1)
                {
                    ans.push_back('A');
                }
                else
                {
                    if(v[i+1]=="AC")
                        {a+=1;
                        b-=1;
                        ans.push_back('A');}

                    else
                    {
                        a-=1;
                        b+=1;
                        ans.push_back('B');
                    }

                }

            }
        }
        if(s=="AC")
        {
            if(a==0 && c==0)
                {fl++;break;}
            else if(a<c)
            {
                a+=1;
                c-=1;
                ans.push_back('A');
            }
            else if(a>c)
            {
                a-=1;
                c+=1;
                ans.push_back('C');
            }
            else
            {
                if(i==n-1)
                {
                    ans.push_back('A');
                }
                else
                {
                    if(v[i+1]=="AB")
                        {a+=1;
                        c-=1;
                        ans.push_back('A');}

                    else 
                    {
                        a-=1;
                        c+=1;
                        ans.push_back('C');
                    }
                   

                }

            }
        }
        if(s=="BC")
        {
            if(b==0 && c==0)
                {fl++;break;}
            else if(b<c)
            {
                b+=1;
                c-=1;
                ans.push_back('B');
            }
            else if(b>c)
            {
                b-=1;
                c+=1;
                ans.push_back('C');
            }
            else
            {
                if(i==n-1)
                {
                    ans.push_back('B');
                }
                else
                {
                    if(v[i+1]=="AB")
                        {b+=1;
                        c-=1;
                        ans.push_back('B');}

                    else 
                    {
                        b-=1;
                        c+=1;
                        ans.push_back('C');
                    }
                    

                }

            }
        }
    }

    if(fl!=-1)
        cout<<"No"<<endl;
    else
    {
        cout<<"Yes"<<endl;
        for(auto i:ans)
            cout<<i<<endl;
        //cout<<endl;
    }



    //}
    return 0;
}

Measured memory_bytes: 6700