#include <bits/stdc++.h>

using namespace std;

#define int long long

void solve() {
    int n, a, b, c;
    cin >> n >> a >> b >> c;
    string s;
    bool ch = 0;
    vector <char> ans;
    for (int i = 0; i < n; ++i) {
        if (a && b && c && !ch) {
            cout << "Yes\n";
            for (auto el : ans) cout << el << '\n';
            int l1 = 0, l2 = 1, l3 = 0;
            while (i < n) {
                ++i;
                cin >> s;
                if (s == "AB") {
                    if (l1) {
                        ++a;
                        --b;
                        cout << "A\n";
                    }
                    else {
                        --a;
                        ++b;
                        cout << "B\n";
                    }
                    l1 ^= 1;
                }
                if (s == "AC") {
                    if (l2) {
                        ++a;
                        --c;
                        cout << "A\n";
                    }
                    else {
                        --a;
                        ++c;
                        cout << "C\n";
                    }
                    l2 ^= 1;
                }
                if (s == "BC") {
                    if (l3) {
                        ++b;
                        --c;
                        cout << "B\n";
                    }
                    else {
                        --b;
                        ++c;
                        cout << "C\n";
                    }
                    l3 ^= 1;
                }
            }
            return;
        }
        cin >> s;
        ++i;
        if (s == "AB") {
            if (a == 0 && b == 0) ch = 1;
            else if (a == 0) {
                ans.push_back('A');
                ++a;
                --b;
            }
            else if (b == 0) {
                ans.push_back('B');
                ++b;
                --a;
            }
            else {
                int cnt = 1;
                while (i < n) {
                    cin >> s;
                    ++i;
                    if (s == "AB") {
                        ++cnt;
                    }
                    else break;
                }
                if (i == n && s == "AB") {
                    for (int j = 0; j < cnt; ++j) {
                        ans.push_back('A');
                        ++j;
                        if (j < cnt) {
                            ans.push_back('B');
                            ++j;
                        }
                    }
                }
                else {
                    if (cnt % 2 == 0) {
                        for (int j = 0; j < cnt; j += 2) {
                            ans.push_back('A');
                            ans.push_back('B');
                        }
                        ans.push_back('C');
                        ++c;
                        if (s == "AC") --a;
                        else --b;
                    }
                    else {
                        for (int j = 0; j < cnt - 1; j += 2) {
                            ans.push_back('A');
                            ans.push_back('B');
                        }
                        if (s == "AC") {
                            ans.push_back('A');
                            ans.push_back('C');
                            ++c;
                            --b;
                        }
                        else {
                            ans.push_back('B');
                            ans.push_back('C');
                            ++c;
                            --a;
                        }
                    }
                }
            }
        }
        else if (s == "AC") {
            if (a == 0 && c == 0) ch = 1;
            else if (a == 0) {
                ans.push_back('A');
                ++a;
                --c;
            }
            else if (c == 0) {
                ans.push_back('C');
                ++c;
                --a;
            }
            else {
                int cnt = 1;
                while (i < n) {
                    cin >> s;
                    ++i;
                    if (s == "AC") {
                        ++cnt;
                    }
                    else break;
                }
                //cout << cnt << endl;
                if (i == n && s == "AC") {
                    for (int j = 0; j < cnt; ++j) {
                        ans.push_back('A');
                        ++j;
                        if (j < cnt) {
                            ans.push_back('C');
                            ++j;
                        }
                    }
                }
                else {
                    if (cnt % 2 == 0) {
                        for (int j = 0; j < cnt; j += 2) {
                            ans.push_back('A');
                            ans.push_back('C');
                        }
                        ans.push_back('B');
                        ++b;
                        if (s == "AB") --a;
                        else --c;
                    }
                    else {
                        for (int j = 0; j < cnt - 1; j += 2) {
                            ans.push_back('A');
                            ans.push_back('C');
                        }
                        if (s == "AB") {
                            ans.push_back('A');
                            ans.push_back('B');
                            ++b;
                            --c;
                        }
                        else {
                            ans.push_back('C');
                            ans.push_back('B');
                            ++b;
                            --a;
                        }
                    }
                }
            }
        }
        else if (s == "BC") {
            if (b == 0 && c == 0) ch = 1;
            else if (b == 0) {
                ans.push_back('B');
                ++b;
                --c;
            }
            else if (c == 0) {
                ans.push_back('C');
                ++c;
                --b;
            }
            else {
                int cnt = 1;
                while (i < n) {
                    cin >> s;
                    ++i;
                    if (s == "BC") {
                        ++cnt;
                    }
                    else break;
                }
                if (i == n && s == "BC") {
                    for (int j = 0; j < cnt; ++j) {
                        ans.push_back('B');
                        ++j;
                        if (j < cnt) {
                            ans.push_back('C');
                            ++j;
                        }
                    }
                }
                else {
                    if (cnt % 2 == 0) {
                        for (int j = 0; j < cnt; j += 2) {
                            ans.push_back('B');
                            ans.push_back('C');
                        }
                        ans.push_back('A');
                        ++a;
                        if (s == "AB") --b;
                        else --c;
                    }
                    else {
                        for (int j = 0; j < cnt - 1; j += 2) {
                            ans.push_back('B');
                            ans.push_back('C');
                        }
                        if (s == "AB") {
                            ans.push_back('B');
                            ans.push_back('A');
                            ++a;
                            --c;
                        }
                        else {
                            ans.push_back('C');
                            ans.push_back('A');
                            ++a;
                            --b;
                        }
                    }
                }
            }
        }
        --i;
        //cout << a << ' ' << b << ' ' << c << endl;
    }
    if (ch) cout << "No";
    else {
        cout << "Yes\n";
        for (auto el : ans) cout << el << '\n';
    }
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    solve();
    return 0;
}


Measured memory_bytes: 3792