//#define LOCAL
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<string>
#include<math.h>
#include<map>
#include<random>
#include<queue>
using namespace std;
using lld = long long int;
using llu = unsigned long long int;
using pii = pair<int, int>;
using pli = pair<lld, int>;
using pil = pair<int, lld>;
using pll = pair<lld, lld>;
using piii = pair<int, pii>;
int n, m;
int si, sj, sk;
int ss;
int d[2][16][16];
queue<pii> que[2];
int p[100009][16][16];
char xx[99];
char res[100009];
int main() {
	int i, j, k, l;
	int t = 1, tv = 0;
	while (t--) {
		scanf("%d %d %d %d", &n, &si, &sj, &sk);
		if (si > 5)si = 5;
		if (sj > 5)sj = 5;
		if (sk > 5)sk = 5;
		ss = si + sj + sk;
		int cur = 0;
		int nxt = 1;
		for (i = 0; i <= ss; i++) {
			for (j = 0; j <= ss; j++) {
				d[cur][i][j] = 0;
				d[nxt][i][j] = 0;
				p[0][i][j] = -1;
			}
		}
		d[cur][si][sj] = 1;
		p[0][si][sj] = 0;
		que[cur].push(pii(si, sj));
		for (int time = 1; time <= n; time++) {
			scanf("%s", xx);
			for (i = 0; i <= ss; i++) {
				for (j = 0; j <= ss; j++) {
					d[nxt][i][j] = 0;
					p[time][i][j] = -1;
				}
			}
			while (!que[cur].empty()) {
				int qi = que[cur].front().first;
				int qj = que[cur].front().second;
				int qk = ss - qi - qj;
				que[cur].pop();
				if (xx[0] == 'A' && xx[1] == 'B') {
					if (qi > 0) {
						if (d[nxt][qi - 1][qj + 1] == 0) {
							d[nxt][qi - 1][qj + 1] = 1;
							que[nxt].push(pii(qi - 1, qj + 1));
							p[time][qi - 1][qj + 1] = 1;
						}
					}
					if (qj > 0) {
						if (d[nxt][qi + 1][qj - 1] == 0) {
							d[nxt][qi + 1][qj - 1] = 1;
							que[nxt].push(pii(qi + 1, qj - 1));
							p[time][qi + 1][qj - 1] = 2;
						}
					}
				}
				else if (xx[0] == 'A' && xx[1] == 'C') {
					if (qi > 0) {
						if (d[nxt][qi - 1][qj] == 0) {
							d[nxt][qi - 1][qj] = 1;
							que[nxt].push(pii(qi - 1, qj));
							p[time][qi - 1][qj] = 3;
						}
					}
					if (qk > 0) {
						if (d[nxt][qi + 1][qj] == 0) {
							d[nxt][qi + 1][qj] = 1;
							que[nxt].push(pii(qi + 1, qj));
							p[time][qi + 1][qj] = 4;
						}
					}
				}
				else if (xx[0] == 'B' && xx[1] == 'C') {
					if (qj > 0) {
						if (d[nxt][qi][qj - 1] == 0) {
							d[nxt][qi][qj - 1] = 1;
							que[nxt].push(pii(qi, qj - 1));
							p[time][qi][qj - 1] = 5;
						}
					}
					if (qk > 0) {
						if (d[nxt][qi][qj + 1] == 0) {
							d[nxt][qi][qj + 1] = 1;
							que[nxt].push(pii(qi, qj + 1));
							p[time][qi][qj + 1] = 6;
						}
					}
				}
			}
			cur ^= 1;
			nxt ^= 1;
		}

		int pi = -1;
		int pj = -1;
		for (i = 0; i <= ss; i++) {
			for (j = 0; j <= ss; j++) {
				if (p[n][i][j] > 0) {
					pi = i;
					pj = j;
					break;
				}
			}
		}
		if (pi < 0) {
			printf("No\n");
		}
		else {
			printf("Yes\n");
			int pk = ss - pi - pj;
			int time = n;
			res[n] = 0;
			while (time > 0) {
				int tt = p[time][pi][pj];
				time--;
				if (tt == 1) {
					res[time] = 'B';
					pi++;
					pj--;
				}
				else if (tt == 2) {
					res[time] = 'A';
					pi--;
					pj++;
				}
				else if (tt == 3) {
					res[time] = 'C';
					pi++;
					pk--;
				}
				else if (tt == 4) {
					res[time] = 'A';
					pi--;
					pk++;
				}
				else if (tt == 5) {
					res[time] = 'C';
					pj++;
					pk--;
				}
				else if (tt == 6) {
					res[time] = 'B';
					pj--;
					pk++;
				}
				else {
				}
			}
			for (i = 0; i < n; i++) {
				printf("%c\n", res[i]);
			}
		}
	}
}

Measured memory_bytes: 103332