#include <iostream>
#include <iosfwd>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <cassert>
#include <cctype>
#include <climits>
#include <vector>
#include <bitset>
#include <set>
#include <queue>
#include <math.h>
#include <stack>
#include <map>
#include <deque>
#include <string>
#include <list>
#include <iterator>
#include <sstream>
#include <complex>
#include <fstream>
#include <functional>
#include <numeric>
#include <utility>
#include <algorithm>
#include <assert.h>
#include <unordered_map>
#pragma GCC optimize ("-O3")
using namespace std;
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cerr.tie(NULL);
#define tolower(s) transform(s.begin(),s.end(),s.begin(),::tolower);
#define toupper(s) transform(s.begin(),s.end(),s.begin(),::toupper);
#define ll long long int
ll max(ll a, ll b) {  return a > b ? a : b; }
ll gcd(ll a, ll b) { if (a == 0) return b; return b == 0 ? a : gcd(b, a % b);}
#define case(i) cout<<"Case #"<<i<<": ";
#define debug(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) { cerr << "[ " << *it << " = " << a << " ]"; err(++it, args...); }
#define pii pair <ll , ll >
#define pb push_back
#define PRECISION 10
const ll inf = 1e16;
const int MAXN = 100001;
const int LOGN = 22;
const int MAXBIT = 61;
const int DIGITSIZE = 19;
ll mod = 1e9 + 7;
ll MOD = 998244353;
int x4[] = {1, -1, 0, 0};
int y4[] = {0, 0, 1, -1};
bool take_test_cases = false;
bool print_case_no = false;
int dp[MAXN][4][4][4]; 
string s[MAXN];
int n;
ll solve(int i,int a, int b, int c){
    if(i==n){
        if(a>=0 && b>=0 && c>=0){
            return 1;
        }
        else{
            return 0;
        }
    }
    else if(dp[i][a][b][c]!=-1){
        return dp[i][a][b][c];
    }
    else{
        int ans=0;
        if(s[i]=="AB"){
            if(a>0){
                ans=max(ans,solve(i+1,a-1,min(3,b+1),c));
            }
            if(b>0){
                ans=max(ans,solve(i+1,min(a+1,3),b-1,c));
            }
        }else if(s[i]=="BC"){
            if(b>0){
                ans=max(ans,solve(i+1,a,b-1,min(3,c+1)));
            }
            if(c>0){
                ans=max(ans,solve(i+1,a,min(b+1,3),c-1));
            }
        } else{
            if(a>0){
                ans=max(ans,solve(i+1,a-1,b,min(c+1,3)));
            }
            if(c>0){
                ans=max(ans,solve(i+1,min(a+1,3),b,c-1));
            }
        }
        dp[i][a][b][c]=ans;
        return dp[i][a][b][c];
    }
}
void getac(int T) {
    
    int a,b,c;
    cin>>n>>a>>b>>c;
    a=min(a,3);
    b=min(b,3);
    c=min(c,3);
    memset(dp,-1,sizeof(dp));
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    ll ans=solve(0,a,b,c);
    if(ans){
        cout<<"Yes\n";
        for(int i=0;i<n-1;i++){
            if(s[i]=="AB"){
                if(a>0&&dp[i+1][a-1][min(b+1,3)][c]){
                    a--;
                    b++;
                    b=min(b,3);
                    cout<<"B\n";
                }
                else{
                    cout<<"A\n";
                    b--;
                    a=min(a+1,3);
                }
            }else if(s[i]=="BC"){
                if(b>0 && dp[i+1][a][b-1][min(c+1,3)]){
                    b--;
                    c=min(c+1,3);
                    cout<<"C\n";
                }
                else{
                    b=min(b+1,3);
                    c--;
                    cout<<"B\n";
                }
            }else{
                if(a>0&&dp[i+1][a-1][b][min(c+1,3)]){
                    a--;
                    c++;
                    c=min(c,3);
                    cout<<"C\n";
                }
                else{
                    a=min(a+1,3);
                    c--;
                    cout<<"A\n";
                }
            }
        }
        if(s[n-1]=="AB"){
            if(a>0){
                cout<<"B";
            }
            else{
                cout<<"A";
            }
        }
        else if(s[n-1]=="BC"){
            if(b>0){
                cout<<"C";
            }
            else{
                cout<<"B";
            }
        }
        else{
            if(a>0){
                cout<<"C";
            }
            else{
                cout<<"A";
            }
        }
    }
    else{
        cout<<"No\n";
    }


}
int  main()
{

    fastio;
    int t = 1;
    if (take_test_cases) cin >> t;
    int t_t = 1;
    while (t--) {
        if (print_case_no)
        case (t_t);
        getac(t_t);
        t_t++;
    }
    return 0;
}

Measured memory_bytes: 39496