import std;

void main() {
    auto NABC = readln.split.to!(long[]);
    auto N = NABC[0], A = NABC[1], B = NABC[2], C = NABC[3];
    string[] s;
    foreach (i; 0 .. N) { s ~= readln.split[0]; }
    
    char[] ans;
    foreach (i; 0 .. N) {
        if (s[i] == "AB") {
            if (A > B) {
                ans ~= 'B';
                A--; B++;
            }
            else {
                ans ~= 'A';
                A++; B--;
            }
        }
        else if (s[i] == "AC") {
            if (A > C) {
                ans ~= 'C';
                A--; C++;
            }
            else {
                ans ~= 'A';
                A++; C--;
            }
        }
        else if (s[i] == "BC") {
            if (B > C) {
                ans ~= 'C';
                B--; C++;
            }
            else {
                ans ~= 'B';
                B++; C--;
            }
        }
        else assert(0);
        
        if (A < 0 || B < 0 || C < 0) { writeln("No"); return; }
    }
    
    writeln("Yes");
    foreach (c; ans) writeln(c);
}

