#include<iostream>
#include<fstream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
#include<deque>
#include<set>
#include<map>
#include<bitset>
#include<ctime>
#include<queue>
using namespace std;
#define pii pair <int, int>
#define XX first
#define YY second

// constants:
const int mn = 200005;
const int mod = 1000000007;
const long long inf = 4444444444444444444;
const int sminf = 1111111111;
const bool is_multitest = 0;
const bool is_interactive = 0;

// i/o methods:
const bool input_from_file = 0;
const bool output_to_file = 0;
#define filename ""
#define in_extension "inp"
#define out_extension "out"

// data preprocessing: (e.g.: divisor generating, prime sieve)
void preprocess()
{
    
}

// global variables:
int n, a[3];
string S[mn];
vector <char> ans;

char par[100005][7][7][7];
bool passed[100005][7][7][7];

// main solution goes here:
void execute(int test_number)
{
    cin>>n>>a[0]>>a[1]>>a[2];
    for (int i=1; i<=n; i++) {
        cin>>S[i];
    }
    srand(time(0));

    if (a[0] + a[1] + a[2] > 6) {
        for (int i=1; i<=n; i++) {
            if (a[S[i][0] - 'A'] < a[S[i][1] - 'A']) {
                ans.push_back(S[i][0]);
                a[S[i][0] - 'A']++;
                a[S[i][1] - 'A']--;
            } else if (a[S[i][0] - 'A'] > a[S[i][1] - 'A']) {
                ans.push_back(S[i][1]);
                a[S[i][0] - 'A']--;
                a[S[i][1] - 'A']++;
            } else {
                int r = rand()%2;
                if (r==0) {
                    ans.push_back(S[i][0]);
                    a[S[i][0] - 'A']++;
                    a[S[i][1] - 'A']--;
                } else {
                    ans.push_back(S[i][1]);
                    a[S[i][0] - 'A']--;
                    a[S[i][1] - 'A']++;
                }
            }
            if (a[0] < 0 || a[1] < 0 || a[2] < 0) {
                cout<<"No";
                return;
            }
        }
        cout<<"Yes\n";

        for (char c: ans) cout<<c<<"\n";
    } else {
        deque <pair <pii, pii> > Q = {{{0, a[0]}, {a[1], a[2]}}}; // {{index_of_query, a}, {b, c}}
        while (!Q.empty()) {
            int t = Q.front().XX.XX;
            a[0] = Q.front().XX.YY, a[1] = Q.front().YY.XX, a[2] = Q.front().YY.YY;
            Q.pop_front();

            // cerr<<t<<" "<<a[0]<<" "<<a[1]<<" "<<a[2]<<"\n";

            if (a[0] < 0 || a[1] < 0 || a[2] < 0) continue;
            if (t == n) {
                cout<<"Yes\n";
                for (int i=n; i>0; i--) {
                    char c = par[i][a[0]][a[1]][a[2]];
                    ans.push_back(c);
                    if (c == S[i][0]) {
                        a[S[i][0] - 'A']--;
                        a[S[i][1] - 'A']++;
                    } else {
                        a[S[i][0] - 'A']++;
                        a[S[i][1] - 'A']--;
                    }
                }
                reverse(ans.begin(), ans.end());
                for (char c: ans) cout<<c<<"\n";
                return;
            }
            if (passed[t][a[0]][a[1]][a[2]]) continue;
            passed[t][a[0]][a[1]][a[2]] = 1;
            t++;
            
            a[S[t][0] - 'A']--;
            a[S[t][1] - 'A']++;
            if (a[0] >= 0 && a[1] >= 0 && a[2] >= 0) {
                par[t][a[0]][a[1]][a[2]] = S[t][1];
            }
            Q.push_back({{t, a[0]}, {a[1], a[2]}});
            a[S[t][0] - 'A']+=2;
            a[S[t][1] - 'A']-=2;
            if (a[0] >= 0 && a[1] >= 0 && a[2] >= 0) {
                par[t][a[0]][a[1]][a[2]] = S[t][0];
            }
            Q.push_back({{t, a[0]}, {a[1], a[2]}});
        }
        cout<<"No\n";
    }


}
// REMEMBER TO CHOOSE TEST METHODS
// PLEASE REMOVE cout AND cerr DEBUG LINES BEFORE SUBMITTING PROBLEMS
// Solution by low_



















signed main()
{
#ifdef lowie
    if (!is_interactive)
    {
        freopen("test.inp", "r", stdin);
        freopen("test.out", "w", stdout);
    }
#else
    if (input_from_file) freopen(filename"."in_extension, "r", stdin);
    if (output_to_file) freopen(filename"."out_extension, "w", stdout);
#endif
    if (!is_interactive)
    {
        ios_base::sync_with_stdio(0);
        cin.tie(0);
        cout.tie(0);
    }

    preprocess();
    int ntest;
    if (is_multitest) cin >> ntest;
    else ntest = 1;

    for (int testno = 1; testno <= ntest; testno++)
    // use for instead of while to serve facebook hacker cup test format
    {
        execute(testno); // only start coding in this function, not in main
    }
}
// Template by low_
// Contact me via mail: ttuandung1803@gmail.com
// ...or codeforces: www.codeforces.com/profiles/low_
// ...or if you're interested in food: www.instagram.com/lowie.exe/

Measured memory_bytes: 77012