using System;
using System.Collections.Generic;

namespace cswork {
    class Program {
        static void Main (string[] args) {
            // Contest166.Q6 ();
            List<long> l = ReadList ();
            int n = (int) l[0];
            long[] abc = new long[3] { l[1], l[2], l[3] };

            List<string> sList = new List<string> ();
            for (int i = 0; i < n; i++) {
                sList.Add (ReadStr ());
            }
            sList.Add ("AB");

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

            for (int i = 0; i < n; i++) {
                if (sList[i].Equals ("AB")) {
                    if (abc[0] == 0 && abc[1] == 0) {
                        Write ("No");
                        return;
                    } else if (abc[0] == 0) {
                        abc[0]++;
                        abc[1]--;
                        ans.Add ("A");
                    } else if (abc[1] == 0) {
                        abc[1]++;
                        abc[0]--;
                        ans.Add ("B");
                    } else {
                        string next = sList[i + 1];
                        if (next[0].Equals ('A') || next[1].Equals ('A')) {
                            abc[0]++;
                            abc[1]--;
                            ans.Add ("A");
                        } else {
                            abc[1]++;
                            abc[0]--;
                            ans.Add ("B");
                        }
                    }
                } else if (sList[i].Equals ("AC")) {
                    if (abc[0] == 0 && abc[2] == 0) {
                        Write ("No");
                        return;
                    } else if (abc[0] == 0) {
                        abc[0]++;
                        abc[2]--;
                        ans.Add ("A");
                    } else if (abc[2] == 0) {
                        abc[2]++;
                        abc[0]--;
                        ans.Add ("C");
                    } else {
                        string next = sList[i + 1];
                        if (next[0].Equals ('A') || next[1].Equals ('A')) {
                            abc[0]++;
                            abc[2]--;
                            ans.Add ("A");
                        } else {
                            abc[2]++;
                            abc[0]--;
                            ans.Add ("C");
                        }
                    }
                } else {
                    if (abc[2] == 0 && abc[1] == 0) {
                        Write ("No");
                        return;
                    } else if (abc[2] == 0) {
                        abc[2]++;
                        abc[1]--;
                        ans.Add ("C");
                    } else if (abc[1] == 0) {
                        abc[1]++;
                        abc[2]--;
                        ans.Add ("B");
                    } else {
                        string next = sList[i + 1];
                        if (next[0].Equals ('B') || next[1].Equals ('B')) {
                            abc[1]++;
                            abc[2]--;
                            ans.Add ("B");
                        } else {
                            abc[2]++;
                            abc[1]--;
                            ans.Add ("C");
                        }
                    }
                }
            }

            Write ("Yes");
            for (int i = 0; i < n; i++) {
                Write (ans[i]);
            }
            Exit ();
        }

        public static void Write (string str) {
            Console.WriteLine (str);
        }

        public static void Write (int i) {
            Console.WriteLine (i);
        }

        public static void Write (double d) {
            Console.WriteLine (d);
        }

        public static string ReadStr () {
            return Console.ReadLine ();
        }

        public static int ReadInt () {
            return int.Parse (Console.ReadLine ());
        }

        public static long Read () {
            return long.Parse (Console.ReadLine ());
        }

        public static double ReadDouble () {
            return double.Parse (Console.ReadLine ());
        }

        public static void Exit () { }

        public static List<string> ReadListStr () {
            return new List<string> (ReadStr ().Split (" "));
        }

        public static List<long> ReadList () {
            return ReadListStr ().ConvertAll (x => long.Parse (x));
        }
    }
}

Measured memory_bytes: 34612