#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define erep(i, n) for (ll i = 0; i <= (ll)(n); ++i)
#define FOR(i,a,b) for (ll i = (a); i < (ll)(b); ++i)
#define EFOR(i,a,b) for (ll i = (a); i <= (ll)(b); ++i)
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);


const int INF = 1<<30;


int main() {
    int n; cin >> n;
    ll a,b,c; cin >> a >> b >> c;
    vector<string> s(n);
    rep(i, n) cin >> s[i];

    vector<string> ans;

    if(a+b+c == 2) {
        rep(i, n) {
            if(s[i] == "AB") {
                if(a < b) {
                    a++;
                    b--;
                    ans.push_back("A");
                } else if(a==b && i < n-1) {
                    if(s[i+1] == "AB") {
                        a++;
                        b--;
                        ans.push_back("A");
                    } else if(s[i+1] == "AC") {
                        a++;
                        b--;
                        ans.push_back("A");
                    } else {
                        a--;
                        b++;
                        ans.push_back("B");
                    }
                } else {
                    a--;
                    b++;
                    ans.push_back("B");
                }
            } else if(s[i] == "AC") {
                if(a < c) {
                    a++;
                    c--;
                    ans.push_back("A");
                } else if(a==c && i < n-1) {
                    if(s[i+1] == "AB") {
                        a++;
                        c--;
                        ans.push_back("A");
                    } else if(s[i+1] == "AC") {
                        a++;
                        c--;
                        ans.push_back("A");
                    } else {
                        a--;
                        c++;
                        ans.push_back("C");
                    }
                } else {
                    a--;
                    c++;
                    ans.push_back("C");
                }
            } else {
                if(b < c) {
                    b++;
                    c--;
                    ans.push_back("B");
                } else if(b==c && i < n-1) {
                    if(s[i+1] == "AB") {
                        b++;
                        c--;
                        ans.push_back("B");
                    } else if(s[i+1] == "AC") {
                        b--;
                        c++;
                        ans.push_back("C");
                    } else {
                        b--;
                        c++;
                        ans.push_back("C");
                    }
                } else {
                    b--;
                    c++;
                    ans.push_back("C");
                }
            }
            if(a < 0 || b < 0 || c < 0) {
                cout << "No" << endl;
                return 0;
            }
        }
    } else {
        rep(i, n) {
            if(s[i] == "AB") {
                if(a < b) {
                    a++;
                    b--;
                    ans.push_back("A");
                } else {
                    a--;
                    b++;
                    ans.push_back("B");
                }
            } else if(s[i] == "AC") {
                if(a < c) {
                    a++;
                    c--;
                    ans.push_back("A");
                } else {
                    a--;
                    c++;
                    ans.push_back("C");
                }
            } else {
                if(b < c) {
                    b++;
                    c--;
                    ans.push_back("B");
                } else {
                    b--;
                    c++;
                    ans.push_back("C");
                }
            }
            if(a < 0 || b < 0 || c < 0) {
                cout << "No" << endl;
                return 0;
            }
        }
    }

    cout << "Yes" << endl;
    rep(i, ans.size()) {
        cout << ans[i] << endl;
    }

    return 0;
}

/**
8 1 1 0
AC
BC
AB
BC
AC
BC
AB
AB

 */



Measured memory_bytes: 10604