using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class AtCoderA
{
    static void Main()
    {
        var sc = new Scanner();

        long n = sc.NextLong();
        long a = sc.NextLong();
        long b = sc.NextLong();
        long c = sc.NextLong();

        string[] strs = new string[n];
        for (int i = 0; i < n; i++)
        {
            strs[i] = sc.Next();
        }

        List<string> answers = new List<string>();

        for (int i = 0; i < n; i++)
        {
            string s = strs[i];
            if (s == "AB")
            {
                if (a == 0 && b == 0)
                {
                    Console.WriteLine("No");
                    return;
                }
                if (a == b)
                {
                    if (i == n - 1)
                    {
                        answers.Add("A");
                        a++;
                        b--;
                    }
                    else
                    {
                        string next = strs[i + 1];
                        if (next == "AC")
                        {
                            answers.Add("A");
                            a++;
                            b--;
                        }
                        else
                        {
                            answers.Add("B");
                            a--;
                            b++;
                        }
                    }
                }
                else if (a > b)
                {
                    answers.Add("B");
                    a--;
                    b++;
                }
                else
                {
                    answers.Add("A");
                    a++;
                    b--;
                }
            }
            if (s == "AC")
            {
                if (a == 0 && c == 0)
                {
                    Console.WriteLine("No");
                    return;
                }
                if (a == c)
                {
                    if (i == n - 1)
                    {
                        answers.Add("A");
                        a++;
                        c--;
                    }
                    else
                    {
                        string next = strs[i + 1];
                        if (next == "AB")
                        {
                            answers.Add("A");
                            a++;
                            c--;
                        }
                        else
                        {
                            answers.Add("C");
                            a--;
                            c++;
                        }
                    }
                }
                else if (a > c)
                {
                    answers.Add("C");
                    a--;
                    c++;
                }
                else
                {
                    answers.Add("A");
                    a++;
                    c--;
                }
            }
            if (s == "BC")
            {
                if (b == 0 && c == 0)
                {
                    Console.WriteLine("No");
                    return;
                }
                if (b == c)
                {
                    if (i == n - 1)
                    {
                        answers.Add("B");
                        b++;
                        c--;
                    }
                    else
                    {
                        string next = strs[i + 1];
                        if (next == "AB")
                        {
                            answers.Add("B");
                            b++;
                            c--;
                        }
                        else
                        {
                            answers.Add("C");
                            b--;
                            c++;
                        }
                    }
                }
                else if (b > c)
                {
                    answers.Add("C");
                    b--;
                    c++;
                }
                else
                {
                    answers.Add("B");
                    b++;
                    c--;
                }
            }
        }

        Console.WriteLine("Yes");
        foreach (var answer in answers)
        {
            Console.WriteLine(answer);
        }
    }

    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: 36716