#include <bits/stdc++.h>

using namespace std;

#define SZ(x) (int)(x.size())
#define REP(i, n) for(int i=0;i<(n);++i)
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RREP(i, n) for(int i=(int)(n);i>=0;--i)
#define RFOR(i, a, b) for(int i=(int)(a);i>=(int)(b);--i)
#define ALL(a) (a).begin(),(a).end()
#define DUMP(x) cerr<<#x<<" = "<<(x)<<endl
#define DEBUG(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<< endl;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<int, int>;

const double eps = 1e-8;
const ll MOD = 1000000007;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;

template <typename T1, typename T2>
bool chmax(T1 &a, const T2 &b) {
  if(a < b) {a = b; return true;}
  return false;
}

template <typename T1, typename T2>
bool chmin(T1 &a, const T2 &b) {
  if(a > b) {a = b; return true;}
  return false;
}

template<typename T1, typename T2>
ostream& operator<<(ostream &os, const pair<T1, T2> p) {
  os << p.first << ":" << p.second;
  return os;
}

template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  REP(i, SZ(v)) {
    if(i) os << " ";
    os << v[i];
  }
  return os;
}

struct Elm {
      int a, b, c;
};

bool operator<(Elm e1, Elm e2){
  if(e1.a == e2.a) {
    if(e1.b == e2.b) {
      return e1.b < e2.b;
    } else {
      return e1.c < e2.c;
    }
  } else {
    return e1.a < e2.a;
  }
}

bool operator==(Elm e1, Elm e2){return e1.a == e2.a && e1.b == e2.b && e1.c == e2.c;}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);

  int n, a, b, c; cin >> n >> a >> b >> c;
  if(a + b + c == 2) {
    vector<map<Elm, Elm>> prev(n+1);
    prev[0][{a, b, c}] = {-1, -1, -1};

    REP(i, n) {
      string s; cin >> s;
      for(auto e: prev[i]) {
        auto abc = e.first;
        if(s == "AB") {
          if(abc.a == 0 && abc.b != 0) {
            prev[i+1][{abc.a+1, abc.b-1, abc.c}] = abc;
          } else if(abc.a != 0 && abc.b == 0) {
            prev[i+1][{abc.a-1, abc.b+1, abc.c}] = abc;
          } else if(abc.a == 1 && abc.b == 1) {
            prev[i+1][{abc.a-1, abc.b+1, abc.c}] = abc;
            prev[i+1][{abc.a+1, abc.b-1, abc.c}] = abc;
          }
        } else if(s == "BC") {
          if(abc.b == 0 && abc.c != 0) {
            prev[i+1][{abc.a, abc.b+1, abc.c-1}] = abc;
          } else if(abc.b != 0 && abc.c == 0) {
            prev[i+1][{abc.a, abc.b-1, abc.c+1}] = abc;
          } else if(abc.b == 1 && abc.c == 1) {
            prev[i+1][{abc.a, abc.b+1, abc.c-1}] = abc;
            prev[i+1][{abc.a, abc.b-1, abc.c+1}] = abc;
          }
        } else {
          if(abc.a == 0 && abc.c != 0) {
            prev[i+1][{abc.a+1, abc.b, abc.c-1}] = abc;
          } else if(abc.a != 0 && abc.c == 0) {
            prev[i+1][{abc.a-1, abc.b, abc.c+1}] = abc;
          } else if(abc.a == 1 && abc.c == 1) {
            prev[i+1][{abc.a+1, abc.b, abc.c-1}] = abc;
            prev[i+1][{abc.a-1, abc.b, abc.c+1}] = abc;
          }
        }
      }
    }

    bool ok = false;
    vector<char> ans;
    auto itr = prev;
    for(auto e: itr[n]) {
      ok = true;
      auto now = e.first;
      int pos = n;
      REP(i, n) {
        auto p = prev[pos][now];
        if(now.a - p.a == 1) {
          ans.push_back('A');
        } else if(now.b - p.b == 1) {
          ans.push_back('B');
        } else {
          ans.push_back('C');
        }
        now = p;
        pos--;
      }

      reverse(ALL(ans));
      break;
    }

    if(ok) {
      cout << "Yes" << endl;
      REP(i, n) {
        cout << ans[i] << endl;
      }
    } else {
      cout << "No" << endl;
    }

    return 0;
  }

  vector<char> ans;
  bool ok = true;
  REP(i, n) {
    string s; cin >> s;
    if(s == "AB") {
      if(a == 0 && b == 0) {
        ok = false;
        break;
      }
      if(a > b) {
        ans.push_back('B');
        a--;
        b++;
      } else {
        ans.push_back('A');
        a++;
        b--;
      }
    } else if(s == "BC") {
      if(b == 0 && c == 0) {
        ok = false;
        break;
      }
      if(b > c) {
        ans.push_back('C');
        c++;
        b--;
      } else {
        ans.push_back('B');
        b++;
        c--;
      }
    } else {
      if(a == 0 && c == 0) {
        ok = false;
        break;
      }
      if(a > c) {
        ans.push_back('C');
        c++;
        a--;
      } else {
        ans.push_back('A');
        c--;
        a++;
      }
    }
  }

  if(ok) {
    cout << "Yes" << endl;
    REP(i, n) {
      cout << ans[i] << endl;
    }
  } else {
    cout << "No" << endl;
  }

}
























Measured memory_bytes: 28536