#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdint.h>
#include <tuple>
#include <utility>
#include <vector>

using namespace std;

typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-12;
static const double PI = acos(-1.0);
static const ll MOD = 1000000007;

#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(a) (a).begin(), (a).end()
#define DEBUG(x) cout << #x << ": " << x << endl

const string YES = "Yes";
const string NO = "No";

long long N;
long long A;
long long B;
long long C;

void solve(std::vector<std::string> s) {
  REP(i, s.size()) {
    if (s[i] == "AC") {
      s[i] = "CA";
    }
  }
  string ans = "";
  auto next = [&](const string &a, const string &b, ll aa, ll bb) -> string {
    if (aa == 0) {
      return a;
    } else if (bb == 0) {
      return b;
    } else {
      return "";
    }
  };
  auto find_next = [&](const string &a, const string &b, const string &c,
                       int i) -> string {
    FOR(j, i + 1, s.size()) {
      if (s[j].find(c) != string::npos) {
        if (s[j].find(a) != string::npos) {
          return a;
        } else {
          return b;
        }
      }
    }
    return a;
  };
  auto calc = [&](char ch, const string &s) {
    if (ch == 'A') {
      if (s == "AB") {
        A++;
        B--;
      }
      if (s == "CA") {
        A++;
        C--;
      }
    }
    if (ch == 'B') {
      if (s == "AB") {
        B++;
        A--;
      }
      if (s == "BC") {
        B++;
        C--;
      }
    }
    if (ch == 'C') {
      if (s == "BC") {
        C++;
        B--;
      }
      if (s == "CA") {
        C++;
        A--;
      }
    }
  };
  REP(i, s.size()) {
    if (s[i] == "AB") {
      if (A == 0 && B == 0) {
        cout << NO << endl;
        return;
      }
      string x = next("A", "B", A, B);
      if (x == "") {
        if (A == 1 && B == 1) {
          ans += find_next("A", "B", "C", i);
        } else {
          if (A > B) {
            ans += "B";
          } else {
            ans += "A";
          }
        }
      } else {
        ans += x;
      }
    }
    if (s[i] == "BC") {
      if (B == 0 && C == 0) {
        cout << NO << endl;
        return;
      }
      string x = next("B", "C", B, C);
      if (x == "") {
        if (B == 1 && C == 1) {
          ans += find_next("B", "C", "A", i);
        } else {
          if (B > C) {
            ans += "C";
          } else {
            ans += "B";
          }
        }
      } else {
        ans += x;
      }
    }
    if (s[i] == "CA") {
      if (C == 0 && A == 0) {
        cout << NO << endl;
        return;
      }
      string x = next("C", "A", C, A);
      if (x == "") {
        if (C == 1 && A == 1) {
          ans += find_next("C", "A", "B", i);
        } else {
          if (C > A) {
            ans += "A";
          } else {
            ans += "C";
          }
        }
      } else {
        ans += x;
      }
    }
    calc(ans[ans.size() - 1], s[i]);
  }
  cout << YES << endl;
  REP(i, ans.size()) { cout << ans[i] << endl; }
}

int main() {
  scanf("%lld", &N);
  scanf("%lld", &A);
  scanf("%lld", &B);
  scanf("%lld", &C);
  std::vector<std::string> s(N);
  for (int i = 0; i < N; i++) {
    std::cin >> s[i];
  }
  solve(std::move(s));
  return 0;
}


Measured memory_bytes: 5656