#include <bits/stdc++.h>
#define LOCAL
using namespace std;
template <typename A, typename B>
ostream& operator <<(ostream& out, const pair<A, B>& a) {
out << "(" << a.first << "," << a.second << ")";
return out;
}
template <typename T, size_t N>
ostream& operator <<(ostream& out, const array<T, N>& a) {
out << "["; bool first = true;
for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "]";
return out;
}
template <typename T>
ostream& operator <<(ostream& out, const vector<T>& a) {
out << "["; bool first = true;
for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "]";
return out;
}
template <typename T, class Cmp>
ostream& operator <<(ostream& out, const set<T, Cmp>& a) {
out << "{"; bool first = true;
for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "}";
return out;
}
template <typename U, typename T, class Cmp>
ostream& operator <<(ostream& out, const map<U, T, Cmp>& a) {
out << "{"; bool first = true;
for (auto& p : a) { out << (first ? "" : ", "); out << p.first << ":" << p.second; first = 0;} out << "}";
return out;
}
#ifdef LOCAL
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
#define trace(...) 42
#endif
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
const char* comma = strchr(names + 1, ',');
cerr.write(names, comma - names) << ": " << arg1 << " |";
__f(comma + 1, args...);
}
#define rep(i,n) for(int i=0; i<(n); i++)
using ll = long long;
#define int long long
using P = pair<int,int>;
//#########################################
signed main(){
    int n,a,b,c;cin >>n >> a >> b >> c;
    vector<P> qs(n);
    rep(i,n){
        string s;cin >> s;
        if(s == "AB")qs[i] = P(0,1);
        if(s == "BC")qs[i] = P(1,2);
        if(s == "AC")qs[i] = P(0,2);
    }
    vector<int> res = {a,b,c};
    vector<char> ans;
    rep(i,n){
        auto push = [&](int x,int y){
            if(res[x] == 0 && res[y] == 0)return false;
            if(res[x] == 0){
                res[x]++;
                res[y]--;
                ans.push_back('A'+x);
                return true;
            }
            if(res[y] == 0){
                res[y]++;
                res[x]--;
                ans.push_back('A'+y);
                return true;
            }
            if(i == n-1){
                res[x]++;
                res[y]--;
                ans.push_back('A' + x);
                return true;
            }
            if(qs[i+1].first == x || qs[i+1].second == x){
                res[x]++;
                res[y]--;
                ans.push_back('A' + x);
                return true;
            }
            if(qs[i+1].second == y || qs[i+1].first == y){
                res[y]++;
                res[x]--;
                ans.push_back('A' + y);
                return true;
            }
        };
        if(!push(qs[i].first,qs[i].second)){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    rep(i,ans.size())cout << ans[i] << endl;

    return 0;   
}

Measured memory_bytes: 5044