#include <bits/stdc++.h>

using namespace std;

long long int a, b , c;
long long int n;
vector <char> ans;
string strings[100111];
int main()
{
    cin.tie(NULL);
    ios_base::sync_with_stdio(0);
    
    cin >> n;
    cin >> a >> b >> c;


    for (int i = 0; i < n; i++)
        cin >> strings[i];

    for (int i = 0; i < n; i++)
    {
        
        if (a + b + c <= 0)
        {
            cout << "No\n";
            return 0;
        }
        else 
        {
            if (strings[i] == "AB")
            {
                if ( a + b <= 0)
                {
                    cout << "No\n";
                    return 0;
                }
                else
                {
                    if ((a + b + c == 2) && (a == 1) && (b == 1) && (i < n - 1) && (strings[i + 1] != strings[i]))
                    {
                        if (strings[i + 1] == "AC")
                        {
                            a++;b--;
                            ans.push_back('A');
                        }
                        else
                        {
                            b++; a--;
                            ans.push_back('B');
                        }
                    }
                    else
                    {
                        if (a < b)
                        {
                            a++;b--;
                            ans.push_back('A');

                        }
                        else
                        {  
                            a--;b++;
                            ans.push_back('B');
                        }
                    }
                    
                }
            }
            if (strings[i] == "AC")
            {
                if ( a + c <= 0)
                {
                    cout << "No\n";
                    return 0;
                }
                else
                {
                    if ((a + b + c == 2) && (a == 1) && (c == 1) && (i < n - 1) && (strings[i + 1] != strings[i]))
                    {
                        if (strings[i + 1] == "AB")
                        {
                            a++;c--;
                            ans.push_back('A');
                        }
                        else
                        {
                            c++; a--;
                            ans.push_back('C');
                        }
                    }
                    else
                    {
                        if (a < c)
                        {
                            a++;c--;
                            ans.push_back('A');
                        
                        }
                        else
                        {
                            c++; a--;
                            ans.push_back('C');
                        }
                    }


                    
                }
            }
            if (strings[i] == "BC")
            {
                if ( b + c <= 0)
                {
                    cout << "No\n";
                    return 0;
                }
                else
                {
                    if ((a + b + c == 2) && (b == 1) && (c == 1) && (i < n - 1) && (strings[i + 1] != strings[i]))
                    {
                        if (strings[i + 1] == "AB")
                        {
                            b++;c--;
                            ans.push_back('B');
                        }
                        else
                        {
                            c++; b--;
                            ans.push_back('C');
                        }
                    }
                    else
                    {
                        if (b < c)
                        {
                            b++;c--;
                            ans.push_back('B');
                        
                        }
                        else
                        {
                            c++; b--;
                            ans.push_back('C');
                        }
                    }
                    
                }
            }
        }
             
    }
    cout << "Yes\n";
    for (char c: ans)
        cout << c << endl;
    

    
    return 0;
}

Measured memory_bytes: 6908