#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <cstdint>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
#define MP make_pair
#define PB push_back
#define inf 1000000007
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)
#define all(x) (x).begin(),(x).end()

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}
 
template<class T> inline bool chmax(T &a, T b){
    if(a<b){
        a = b;
        return true;
    }
    return false;
}

template<class T> inline bool chmin(T &a, T b){
    if(a>b){
        a = b;
        return true;
    }
    return false;
}

int main(){
    int n,a,b,c;
    cin >> n >> a >> b >> c;
    vector<char>res(n);
    vector<string> s(n);
    rep(i,n){
        cin >> s[i];
    }    
    bool ng = 0;
    rep(i,n){
        if(s[i]=="AB"){
            if(a>b){
                res[i] = 'B';
                b++;
                a--;
            }else if(b>a){
                res[i] = 'A';
                a++;b--;
            }else{
                if(a==0&&b==0){
                    ng = 1;
                    break;
                }
                if(a==1&&b==1&&c==0){
                    if(i==n-1){
                        res[i] = 'A';
                        a++;
                        b--;
                    }else{
                        if(s[i+1]=="AC"){
                            res[i] = 'A';
                            a++;
                            b--;
                        }else{
                            res[i] = 'B';
                            b++;
                            a--;
                        }
                    }
                }else{
                    res[i] = 'A';
                    a++;
                    b--;
                }
            }
        }else if(s[i]=="BC"){
            if(b>c){
                res[i] = 'C';
                c++;b--;
            }else if(b>c){
                res[i] = 'B';
                b++;c--;
            }else{
                if(b==0&&c==0){
                    ng = 1;
                    break;
                }
                if(a==0&&b==1&&c==1){
                    if(i==n-1){
                        res[i] = 'B';
                        b++;c--;
                    }else{
                        if(s[i+1]=="AC"){
                            res[i] = 'C';
                            c++;b--;
                        }else{
                            res[i] = 'B';
                            b++;c--;
                        }
                    }
                }else{
                    res[i] = 'B';
                    b++;c--;
                }
            }
        }else if(s[i]=="AC"){
            if(a>c){
                res[i] = 'C';
                c++;a--;
            }else if(c>a){
                res[i] = 'A';
                a++;c--;
            }else{
                if(a==0&&c==0){
                    ng = 1;
                    break;
                }
                if(a==1&&b==0&&c==1){
                    if(i==n-1){
                        res[i] = 'A';
                        a++;c--;
                    }else{
                        if(s[i+1]=="BC"){
                            res[i] = 'C';
                            c++;a--;
                        }else{
                            res[i] = 'A';
                            a++;c--;
                        }
                    }
                }else{
                    res[i] = 'A';
                    a++;c--;
                }
            }
        }
    }
    if(ng){
        cout << "No" << endl;
    }else{
        cout << "Yes\n";
        for(auto x:res){
            cout << x << "\n";
        }
    }
    return 0;
}

Measured memory_bytes: 5264