#include <iostream>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <utility>
#include <string>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <numeric>

using namespace std;

typedef uint64_t u64;
typedef int64_t s64;
typedef uint32_t u32;
typedef int32_t s32;
typedef vector<s32> vs32;
typedef vector<u32> vu32;
typedef vector<s64> vs64;
typedef vector<u64> vu64;

const double PI=3.14159265358979323846;

#define MAX(x, y) ((x) < (y) ? (y) : (x))
#define MIN(x, y) ((x) > (y) ? (y) : (x))

#define rep(i, N) for(int i = 0; i < N; ++i)

#define CEIL(x, y) (((x) + (y) - 1) / (y))
#define MOD 1000000007ULL

#define IN(l, r, x) ((l) <= (x) && (x) < (r))


int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);

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

    vector< string > s(n);
    rep (i, n) cin >> s[i];

    vector< char > ans(n);

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

    cout << "Yes\n";
    rep (i, n)
    {
        cout << ans[i] << "\n";
    }
    return 0;
}



Measured memory_bytes: 6668