#include <bits/stdc++.h>
#define DAU  ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define PLEC return 0;
using namespace std;
const int N(100005);
char st[N];
int n, s1[N], s2[N], s3[N], op[N];
inline void Back(int a, int b, int c, int k) {
    if (k == n + 1)
        return;
    if (a >= s1[k] && c >= s2[k] && b >= s3[k]) {
        cout << "Yes\n";
        for (int i = 1; i <= k; ++i)
            cout << st[i] << '\n';
        for (int i = k + 1; i <= n; ++i)
            if (op[i] == 1)
                cout << "B\n";
            else if (op[i] == 2)
                cout << "A\n";
            else cout << "C\n";
        exit(0);
    }
    else if (b >= s1[k] && a >= s2[k] && c >= s3[k]) {
        cout << "Yes\n";
        for (int i = 1; i <= k; ++i)
            cout << st[i] << '\n';
        for (int i = k + 1; i <= n; ++i)
            if (op[i] == 1)
                cout << "A\n";
            else if (op[i] == 2)
                cout << "C\n";
            else cout << "B\n";
        exit(0);
    }
    else if (a >= s1[k] + s2[k] && b >= s3[k]) {
        cout << "Yes\n";
        for (int i = 1; i <= k; ++i)
            cout << st[i] << '\n';
        for (int i = k + 1; i <= n; ++i)
            if (op[i] == 1)
                cout << "B\n";
            else if (op[i] == 2)
                cout << "C\n";
            else cout << "C\n";
        exit(0);
    }
    else if (b >= s1[k] && c >= s2[k] + s3[k]) {
        cout << "Yes\n";
        for (int i = 1; i <= k; ++i)
            cout << st[i] << '\n';
        for (int i = k + 1; i <= n; ++i)
            if (op[i] == 1)
                cout << "A\n";
            else if (op[i] == 2)
                cout << "A\n";
            else cout << "B\n";
        exit(0);
    }
    else if (b >= s1[k] + s3[k] && c >= s2[k]) {
        cout << "Yes\n";
        for (int i = 1; i <= k; ++i)
            cout << st[i] << '\n';
        for (int i = k + 1; i <= n; ++i)
            if (op[i] == 1)
                cout << "A\n";
            else if (op[i] == 2)
                cout << "A\n";
            else cout << "C\n";
        exit(0);
    }
    else if (a >= s1[k] && c >= s2[k] + s3[k]) {
        cout << "Yes\n";
        for (int i = 1; i <= k; ++i)
            cout << st[i] << '\n';
        for (int i = k + 1; i <= n; ++i)
            if (op[i] == 1)
                cout << "B\n";
            else if (op[i] == 2)
                cout << "A\n";
            else cout << "B\n";
        exit(0);
    }
    else if (a >= s1[k] + s2[k] && c >= s3[k]) {
        cout << "Yes\n";
        for (int i = 1; i <= k; ++i)
            cout << st[i] << '\n';
        for (int i = k + 1; i <= n; ++i)
            if (op[i] == 1)
                cout << "B\n";
            else if (op[i] == 2)
                cout << "C\n";
            else cout << "B\n";
        exit(0);
    }
    else if (b >= s1[k] + s3[k] && a >= s2[k]) {
        cout << "Yes\n";
        for (int i = 1; i <= k; ++i)
            cout << st[i] << '\n';
        for (int i = k + 1; i <= n; ++i)
            if (op[i] == 1)
                cout << "A\n";
            else if (op[i] == 2)
                cout << "C\n";
            else cout << "C\n";
        exit(0);
    }
    if (op[k+1] == 1) {
        if (a > 0)
            st[k+1] = 'B',
            Back(a - 1, b + 1, c, k + 1);
        if (b > 0)
            st[k+1] = 'A',
            Back(a + 1, b - 1, c, k + 1);
    }
    else if (op[k+1] == 2) {
        if (a > 0)
            st[k+1] = 'C',
            Back(a - 1, b, c + 1, k + 1);
        if (c > 0)
            st[k+1] = 'A',
            Back(a + 1, b, c - 1, k + 1);
    }
    else {
        if (b > 0)
            st[k+1] = 'C',
            Back(a, b - 1, c + 1, k + 1);
        if (c > 0)
            st[k+1] = 'B',
            Back(a, b + 1, c - 1, k + 1);
    }
}
int a, b, c;
string s;
int main() {
    DAU
    cin >> n >> a >> b >> c;
    for (int i = 1; i <= n; ++i) {
        cin >> s;
        if (s == "AB")
            op[i] = 1;
        else if (s == "AC")
            op[i] = 2;
        else op[i] = 3;
    }
    for (int i = n; i >= 0; --i) {
        s1[i] = s1[i+1];
        s2[i] = s2[i+1];
        s3[i] = s3[i+1];
        if (op[i] == 1)
            ++s1[i];
        else if (op[i] == 2)
            ++s2[i];
        else ++s3[i];
    }
    Back(a, b, c, 0);
    cout << "No";
    PLEC
}


Measured memory_bytes: 11584