using System;
using CompLib.Util;

public class Program
{
    private int N, A, B, C;
    private string[] S;
    private char[] Ans;

    bool Search(int i)
    {
        if (A < 0 || B < 0 || C < 0) return false;
        if (i >= N) return true;
        char s;
        char t;
        ref int ss = ref A;
        ref int tt = ref B;

        if (S[i] == "AB")
        {
            s = 'A';
            ss = ref A;
            t = 'B';
            tt = ref B;
        }
        else if (S[i] == "BC")
        {
            s = 'B';
            ss = ref B;
            t = 'C';
            tt = ref C;
        }
        else //if (S[i] == "CA")
        {
            s = 'C';
            ss = ref C;
            t = 'A';
            tt = ref A;
        }

        if (ss < tt)
        {
            Ans[i] = s;
            ss++;
            tt--;
            if (Search(i + 1)) return true;
            Ans[i] = t;
            ss -= 2;
            tt += 2;
            if (Search(i + 1)) return true;
            ss++;
            tt--;
        }
        else
        {
            Ans[i] = t;
            tt++;
            ss--;
            if (Search(i + 1)) return true;
            Ans[i] = s;
            tt -= 2;
            ss += 2;
            if (Search(i + 1)) return true;
            tt++;
            ss--;
        }

        return false;
    }

    public void Solve()
    {
        var sc = new Scanner();
        N = sc.NextInt();
        A = sc.NextInt();
        B = sc.NextInt();
        C = sc.NextInt();
        S = new string[N];
        for (int i = 0; i < N; i++)
        {
            S[i] = sc.Next();
        }

        Ans = new char[N];
        if (Search(0))
        {
            Console.WriteLine("Yes");
            Console.WriteLine(string.Join("\n", Ans));
        }
        else
        {
            Console.WriteLine("No");
        }
    }


    public static void Main(string[] args) => new Program().Solve();
}

namespace CompLib.Util
{
    using System;
    using System.Linq;

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            while (_index >= _line.Length)
            {
                _line = Console.ReadLine().Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            _line = Console.ReadLine().Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}

Measured memory_bytes: 45628