import std;


const AB = 1;
const AC = 2;
const BA = 3;
const BC = 4;
const CA = 5;
const CB = 6;

void calc(int a, int b, int c, string[] ss) {

    string move(int mv) {
        switch (mv) {
            case AB:
                if (a == 0 && b == 0) return "X";
                if (a == 0) { a++; b--; return "A";}
                else { a--; b++; return "B";}
                break;

            case AC:
                if (a == 0 && c == 0) return "X";
                if (a == 0) { a++; c--; return "A";}
                else { a--; c++; return "C";}
                break;

            case BA:
                if (b == 0 && a == 0) return "X";
                if (b == 0) { b++; a--; return "B";}
                else { b--; a++; return "A";}
                break;

            case BC:
                if (b == 0 && c == 0) return "X";
                if (b == 0) { b++; c--; return "B";}
                else { b--; c++; return "C";}
                break;

            case CA:
                if (c == 0 && a == 0) return "X";
                if (c == 0) { c++; a--; return "C";}
                else { c--; a++; return "A";}
                break;

            case CB:
                if (c == 0 && b == 0) return "X";
                if (c == 0) { c++; b--; return "C";}
                else { c--; b++; return "B";}
                break;

            default: break;
        }
        return "X";
    }


    string[] ans;
    for (int i = 0; i < ss.length; i++) {
        string s = ss[i];
        if (i+1 == ss.length) {
            int mv = AB;
            if (s == "AB") mv = AB;
            if (s == "AC") mv = AC;
            if (s == "BC") mv = BC;
            // writeln(a, " ", b, " ", c, " ", " mv ", mv);
            string ch = move(mv);
            if (ch == "X") {
                writeln("No");
                return;
            }
            ans ~= ch;
        }

        else {
        string t = ss[i + 1];
        int mv = AB;
        if (s == "AB") {
            if (t == "AB") mv = AB;
            if (t == "AC") mv = BA;
            if (t == "BC") mv = AB;
        }
        else if (s == "AC") {
            if (t == "AB") mv = CA;
            if (t == "AC") mv = AC;
            if (t == "BC") mv = AC;
        }
        else if (s == "BC") {
            if (t == "AB") mv = CB;
            if (t == "AC") mv = BC;
            if (t == "BC") mv = BC;
        } else assert(false);

        string ch = move(mv);
        if (ch == "X") {
            writeln("No");
            return;
        }
        ans ~= ch;
        }
    }

    writeln("Yes");
    foreach (e; ans) writeln(e);
}

void main() {
    int n, a, b, c; scan(n, a, b, c);

    string[] ss;
    foreach (_; 0..n) ss ~= read!string;
    calc(a, b, c, ss);
}

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;
