#include <stdio.h>
#include <stdlib.h>

#include <iostream>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <stdint.h>
#include <string.h>

#define _USE_MATH_DEFINES
#include <math.h>

#include <vector>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <deque>
#include <string>

#include <algorithm>
#include <functional>
#include <bitset>
#include <functional>
#include <chrono>
#include <random>

#define sqr(x) (x) * (x)

typedef unsigned int u32;
typedef int i32;
typedef unsigned long long int u64;
typedef long long int i64;
typedef uint16_t u16;
typedef int16_t i16;
typedef uint8_t u8;
typedef int8_t i8;

using namespace std;
using namespace std::chrono;

//const i64 mod = 1000000007ll;
const i64 smod = 998244353ll;
const i64 inf = 1'000'000'000'000'000'000ll + 7;
//const i64 inf = 1'000'000'007;

const long double eps = 1e-8;

const i64 MAXN = 2 * 100'000 + 5;

i64 n;
i64 a, b, c;
string s[MAXN];
char r[MAXN];

void out() {
    stringstream ss;
    ss << "Yes" << endl;
    for (i64 i = 1; i <= n; i++) {
        ss << r[i] << endl;
    }
    cout << ss.str();
}

void pick_ab_a(i64 i) {
    r[i] = 'A';
    a += 1;
    b -= 1;
}

void pick_ab_b(i64 i) {
    r[i] = 'B';
    b += 1;
    a -= 1;
}

void pick_ac_a(i64 i) {
    r[i] = 'A';
    a += 1;
    c -= 1;
}

void pick_ac_c(i64 i) {
    r[i] = 'C';
    c += 1;
    a -= 1;
}

void pick_bc_b(i64 i) {
    r[i] = 'B';
    b += 1;
    c -= 1;
}

void pick_bc_c(i64 i) {
    r[i] = 'C';
    c += 1;
    b -= 1;
}

void check(i64 i) {
    if (s[i] == "AB") {
        if (a + b == 0) {
            cout << "No" << endl;
            exit(0);
        }
        if (a < b) {
            pick_ab_a(i);
        }
        else {
            pick_ab_b(i);
        }
    }
    else if (s[i] == "AC") {
        if (a + c == 0) {
            cout << "No" << endl;
            exit(0);
        }
        if (a < c) {
            pick_ac_a(i);
        }
        else {
            pick_ac_c(i);
        }
    }
    else if (s[i] == "BC") {
        if (b + c == 0) {
            cout << "No" << endl;
            exit(0);
        }
        if (b < c) {
            pick_bc_b(i);
        }
        else {
            pick_bc_c(i);
        }
    }
}

void simul1() {
    if (a + b + c != 1) {
        return;
    }

    for (i64 i = 1; i <= n; i++) {
        check(i);
    }

    out();
    exit(0);
}

void simul2() {
    if (a + b + c != 2) {
        return;
    }

    for (i64 i = 1; i <= n; i++) {
        if (s[i] == "AB") {
            if (a * b) {
                if (i != n && s[i + 1] != s[i]) {
                    if (s[i + 1] == "BC") {
                        pick_ab_b(i);
                        continue;
                    }
                    else if (s[i + 1] == "AC") {
                        pick_ab_a(i);
                        continue;
                    }
                }
            }
        }
        else if (s[i] == "AC") {
            if (a * c) {
                if (i != n && s[i + 1] != s[i]) {
                    if (s[i + 1] == "BC") {
                        pick_ac_c(i);
                        continue;
                    }
                    else if (s[i + 1] == "AB") {
                        pick_ac_a(i);
                        continue;
                    }
                }
            }
        }
        else if (s[i] == "BC") {
            if (b * c) {
                if (i != n && s[i + 1] != s[i]) {
                    if (s[i + 1] == "AC") {
                        pick_bc_c(i);
                        continue;
                    }
                    else if (s[i + 1] == "AB") {
                        pick_bc_b(i);
                        continue;
                    }
                }
            }
        }

        check(i);
    }

    out();
    exit(0);
}

void common(i64 z) {
    for (i64 i = z; i <= n; i++) {
        check(i);
    }
    out();
    exit(0);
}

int main(int argc, char* argv[]) {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout.precision(15); cout.setf(ios::fixed);

    cin >> n;
    cin >> a >> b >> c;
    for (i64 i = 1; i <= n; i++) {
        cin >> s[i];
    }

    if (a + b + c == 0) {
        cout << "No" << endl;
        return 0;
    }

    simul1();
    simul2();

    i64 z = 1;
    if (a + b == 0 || a + c == 0 || b + c == 0) {
        check(1);
        z += 1;
    }

    common(z);


    return 0;
}

Measured memory_bytes: 10152