#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,no-stack-protector,fast-math")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
const int N = 1e5 + 5, M = 2 * N + 5;

char s[N][3];
int n, x[N];

int getIdx(int i){
    if(s[i][0] == 'A' && s[i][1] == 'B')return 0;
    if(s[i][0] == 'A' && s[i][1] == 'C')return 1;
    return 2;
}
const int lim = 12, nos = 5;

int dp[N][lim][lim][lim];

bool valid(int x, int y){
    return (x >= 0 && y >= 0 && x < lim && y < lim);
}

int solve(int i, int a, int b, int c){
    if(i == n)return 1;
    int &ret = dp[i][a][b][c];
    if(~ret)return ret; ret = 0;


    int A = a - nos;
    int B = b - nos;
    int C = c - nos;

    int idx = getIdx(i);

    if(idx == 0){
        ++A, --B;
        if(valid(a + 1, b - 1) && x[0] + A >= 0 && x[1] + B >= 0)
            ret |= solve(i + 1, a + 1, b - 1, c);

        --A, ++B;
        --A, ++B;
        if(valid(a - 1, b + 1) && x[0] + A >= 0 && x[1] + B >= 0)
            ret |= solve(i + 1, a - 1, b + 1, c);
    }
    else if(idx == 1){
        ++A, --C;
        if(valid(a + 1, c - 1) && x[0] + A >= 0 && x[2] + C >= 0)
            ret |= solve(i + 1, a + 1, b, c - 1);

        --A, ++C;
        --A, ++C;
        if(valid(a - 1, c + 1) && x[0] + A >= 0 && x[2] + C >= 0)
            ret |= solve(i + 1, a - 1, b, c + 1);
    }
    else {
        ++B, --C;
        if(valid(b + 1, c - 1) && x[1] + B >= 0 && x[2] + C >= 0)
            ret |= solve(i + 1, a, b + 1, c - 1);

        --B, ++C;
        --B, ++C;
        if(valid(b - 1, c + 1) && x[1] + B >= 0 && x[2] + C >= 0)
            ret |= solve(i + 1, a, b - 1, c + 1);
    }
    return ret;
}

void build(int i, int a, int b, int c){
    if(i == n)exit(0);

    int A = a - nos;
    int B = b - nos;
    int C = c - nos;

    int idx = getIdx(i);

    if(idx == 0){
        ++A, --B;
        if(valid(a + 1, b - 1) && x[0] + A >= 0 && x[1] + B >= 0 && solve(i + 1, a + 1, b - 1, c))
            puts("A"), build(i + 1, a + 1, b - 1, c);

        --A, ++B;
        --A, ++B;
        if(valid(a - 1, b + 1) && x[0] + A >= 0 && x[1] + B >= 0 && solve(i + 1, a - 1, b + 1, c))
            puts("B"), build(i + 1, a - 1, b + 1, c);
    }
    else if(idx == 1){
        ++A, --C;
        if(valid(a + 1, c - 1) && x[0] + A >= 0 && x[2] + C >= 0 && solve(i + 1, a + 1, b, c - 1))
            puts("A"), build(i + 1, a + 1, b, c - 1);

        --A, ++C;
        --A, ++C;
        if(valid(a - 1, c + 1) && x[0] + A >= 0 && x[2] + C >= 0 && solve(i + 1, a - 1, b, c + 1))
            puts("C"), build(i + 1, a - 1, b, c + 1);
    }
    else {
        ++B, --C;
        if(valid(b + 1, c - 1) && x[1] + B >= 0 && x[2] + C >= 0 && solve(i + 1, a, b + 1, c - 1))
            puts("B"), build(i + 1, a, b + 1, c - 1);

        --B, ++C;
        --B, ++C;
        if(valid(b - 1, c + 1) && x[1] + B >= 0 && x[2] + C >= 0 && solve(i + 1, a, b - 1, c + 1))
            puts("C"), build(i + 1, a, b - 1, c + 1);
    }
    return ;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("input.in", "r", stdin);
#endif
    scanf("%d", &n);
    for(int i = 0 ; i < 3 ; ++i)
        scanf("%d", x + i);

    for(int i = 0 ; i < n ; ++i)
        scanf("%s", s + i);

    memset(dp, -1, sizeof dp);
    int ans = solve(0, nos, nos, nos);

    if(ans == 0)
        exit((puts("No"), 0));

    puts("Yes");
    build(0, nos, nos, nos);
}

Measured memory_bytes: 688468