// #pragma GCC optimize("O3", "unroll-loops")
// #pragma GCC target("avx2")

#include <bits/stdc++.h>
using namespace std;

#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds;

typedef long long int ll;
#define endl '\n'
#define ld long double
#define all(a) a.begin(),a.end()
#define int long long
#define pb push_back
#define pii pair <int, int>
#define ff first
#define ss second
#define sz(v) (int)v.size() 
#define UB upper_bound
#define LB lower_bound
#define OST tree<pii, null_type,less<pii>, rb_tree_tag,tree_order_statistics_node_update>

const int INF = 1e15 + 0;
const int mod = 1e9 + 7;
//const int mod = 998244353;

void solve() {
    int n, a, b, c;
    cin >> n >> a >> b >> c;
    
    char A[n+5], B[n+5];
    vector <char> ans;

    for(int i = 1; i <= n; i++) {
      string s; cin >> s;
      A[i] = s[0]; B[i] = s[1];
    }
    
    for(int i = 1; i <= n; i++){
        if(A[i]=='A' && B[i]=='B') {
            if(a == 0 && b == 0) {
              cout << "No\n"; return;
            }
            if(a < b){
                a++; b--;
                ans.pb('A');
            }
            else if(a > b){
               a--; b++;
               ans.pb('B');
            }
            else {
                if(i < n) {
                    if(A[i+1] != 'B' && B[i+1] != 'B') {
                        a++; b--;
                        ans.pb('A');
                    }
                    else {
                        a--; b++;
                        ans.pb('B');
                    }
                }
                else ans.pb('A');
            }
        }
         if(A[i]=='A' && B[i]=='C') {
            if(a == 0 && c == 0) {
              cout << "No\n"; return;
            }
            if(c < a) {
                a--; c++;
                ans.pb('C');
            }
            else if(a < c){
                a++; c--;
                ans.pb('A');
            }
            else {
                if(i < n) {
                    if(A[i+1] != 'A' && B[i+1] != 'A') {
                        c++; a--;
                        ans.pb('C');
                    }
                    else {
                        c--; a++;
                        ans.pb('A');
                    }
                }
                else  ans.pb('C');
            }
        }
        if(A[i]=='B' && B[i]=='C') {
            if(b == 0 && c == 0) {
              cout << "No\n"; return;
            }
            if(b < c) {
                b++; c--;
                ans.pb('B');
            }
            else if( c < b) {
                c++; b--;
                ans.pb('C');
            }
            else {
                if(i < n) {
                    if(A[i+1] != 'B' && B[i+1] != 'B') {
                        c++; b--;
                        ans.pb('C');
                    }
                    else {
                        c--; b++;
                        ans.pb('B');
                    }
                }
                else ans.pb('C');
            }
        }
    }
    cout << "Yes\n";
    for(auto i : ans) cout << i << '\n';
}   

signed main() {
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

    #ifndef ONLINE_JUDGE
      freopen("input.txt", "r", stdin);
      freopen("output.txt", "w", stdout);
    #endif
    int t = 1; // cin >> t;
    for(int i = 1; i <= t; i++) {
        solve();
    }
}    


Measured memory_bytes: 4012