#include <iostream>
#include <vector>
#include <map>
#include <bitset>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <cmath>
#include <set>
#include <list>
#include <sstream>

#define ll long long
#define ld long double
#define ull unsigned long long
using namespace std;

const ll mod = 1000000007;
const ll inf = 9223372036854775803;
const int maxN = 300005;

int main() {
    cin.tie(0);
    ios_base::sync_with_stdio(false);
    int n;
    cin >> n;
    ll a,b,c;
    cin >> a >> b >> c;
    ll sum = (a + b + c);
    bool good = sum > 0;
    vector<char> ans(n);
    if (good) {
        string s;
        if (sum == 1) {
            for (int i = 0; (i < n) && good; i++) {
                cin >> s;
                if (s == "AB") {
                    good = a > 0 || b > 0;
                    a = 1 - a;
                    b = 1 - b;
                    ans[i] = a == 1 ? 'A' : 'B';
                } else if (s == "AC") {
                    good = a > 0 || c > 0;
                    a = 1 - a;
                    c = 1 - c;
                    ans[i] = a == 1 ? 'A' : 'C';
                } else {
                    good = b > 0 || c > 0;
                    b = 1 - b;
                    c = 1 - c;
                    ans[i] = b == 1 ? 'B' : 'C';
                }
            }
        } else if (sum == 2) {
            vector<string> r(n);
            for (int i = 0; i < n; i++) {
                cin >> r[i];
            }

            for (int i = 0; (i < n) && good; i++) {
                s = r[i];
                if (s == "AB") {
                    good = a > 0 || b > 0;
                    if (a == 0) {
                        a++;
                        b--;
                        ans[i] = 'A';
                    } else if (b == 0) {
                        a--;
                        b++;
                        ans[i] = 'B';
                    } else {
                        if (i < n - 1) {
                            if (r[i+1] == s) {
                                if (a > b) {
                                    a--;
                                    b++;
                                    ans[i] = 'B';
                                } else {
                                    a++;
                                    b--;
                                    ans[i] = 'A';
                                }
                            } else if (r[i+1] == "AC") {
                                a++;
                                b--;
                                ans[i] = 'A';
                            } else if (r[i+1] == "BC") {
                                a--;
                                b++;
                                ans[i] = 'B';
                            }
                        } else {
                            if (a > b) {
                                a--;
                                b++;
                                ans[i] = 'B';
                            } else {
                                a++;
                                b--;
                                ans[i] = 'A';
                            }
                        }
                    }
                } else if (s == "AC") {
                    good = a > 0 || c > 0;
                    if (a == 0) {
                        a++;
                        c--;
                        ans[i] = 'A';
                    } else if (c == 0) {
                        a--;
                        c++;
                        ans[i] = 'C';
                    } else {
                        if (i < n - 1) {
                            if (r[i+1] == s) {
                                if (a > c) {
                                    a--;
                                    c++;
                                    ans[i] = 'C';
                                } else {
                                    a++;
                                    c--;
                                    ans[i] = 'A';
                                }
                            } else if (r[i+1] == "AB") {
                                a++;
                                c--;
                                ans[i] = 'A';
                            } else if (r[i+1] == "BC") {
                                a--;
                                c++;
                                ans[i] = 'C';
                            }
                        } else {
                            if (a > c) {
                                a--;
                                c++;
                                ans[i] = 'C';
                            } else {
                                a++;
                                c--;
                                ans[i] = 'A';
                            }
                        }
                    }
                } else {
                    good = b > 0 || c > 0;
                    if (c == 0) {
                        c++;
                        b--;
                        ans[i] = 'C';
                    } else if (b == 0) {
                        c--;
                        b++;
                        ans[i] = 'B';
                    } else {
                        if (i < n - 1) {
                            if (r[i + 1] == s) {
                                if (c > b) {
                                    c--;
                                    b++;
                                    ans[i] = 'B';
                                } else {
                                    c++;
                                    b--;
                                    ans[i] = 'C';
                                }
                            } else if (r[i + 1] == "AC") {
                                c++;
                                b--;
                                ans[i] = 'C';
                            } else if (r[i + 1] == "AB") {
                                c--;
                                b++;
                                ans[i] = 'B';
                            }
                        } else {
                            if (c > b) {
                                c--;
                                b++;
                                ans[i] = 'B';
                            } else {
                                c++;
                                b--;
                                ans[i] = 'C';
                            }
                        }
                    }
                }
            }
        } else {
            for (int i = 0; (i < n) && good; i++) {
                cin >> s;
                if (s == "AB") {
                    good = a > 0 || b > 0;
                    if (a > b) {
                        a--;
                        b++;
                        ans[i] = 'B';
                    } else {
                        a++;
                        b--;
                        ans[i] = 'A';
                    }
                } else if (s == "AC") {
                    good = a > 0 || c > 0;
                    if (a > c) {
                        a--;
                        c++;
                        ans[i] = 'C';
                    } else {
                        a++;
                        c--;
                        ans[i] = 'A';
                    }
                } else {
                    good = b > 0 || c > 0;
                    if (b > c) {
                        b--;
                        c++;
                        ans[i] = 'C';
                    } else {
                        b++;
                        c--;
                        ans[i] = 'B';
                    }
                }
            }
        }
    }
    if (good) {
        cout << "Yes\n";
        for (int i = 0; i < n; i++) {
            cout << ans[i] << "\n";
        }
    } else {
        cout << "No";
    }
    return 0;
}

Measured memory_bytes: 6348