function Scanner(input) {
	var self = this;
	self.itemNo = 0;
	self.orgStr = input;
	self.splitedStrs = (function(target) {
		var result = [];
		var target = target.replace(/[\n \t]+/g, " ");
		var strs = target.split(" ");
		for (var i = 0, len = strs.length; i < len; i++) {
			result.push(strs[i]);
		}
		return result;
	}(input));

	self.next = function() {
		var result = self.splitedStrs[self.itemNo];
		self.itemNo++;
		return (result != null) ? result : null;
	}

	self.nextInt = function() {
		var result = self.splitedStrs[self.itemNo];
		self.itemNo++;
		return (result != null) ? parseInt(result) : null;
	}

	self.nextBigDecimal = function() {
		var result = self.splitedStrs[self.itemNo];
		self.itemNo++;
		return (result != null) ? parseFloat(result) : null;
	}
	
	self.nextByte = function() {
		var result = self.splitedStrs[self.itemNo];
		self.itemNo++;
		return (result != null) ? new Int8Array(result) : null;
	}

}

// inputに入力データ全体が入る
function Main(sc) {

	var N = sc.nextInt();
	var A = sc.nextInt();
	var B = sc.nextInt();
	var C = sc.nextInt();
	var ABC = { A : A, B : B, C : C, };
	var ans = "Yes";
	var ans2 = [];
	
	var sL = [];
	for (var i = 0; i < N; i++) {
		sL.push(sc.next());
	}
	
	for (var i = 0; i < N; i++) {
		
		var c0 = sL[i].charAt(0);
		var c1 = sL[i].charAt(1);
		var nextS = sL[i + 1];
		
		if (ABC[c0] == 0 && ABC[c1] == 0) {
			ans = "No";
			break;
		}
		
		// 次との共通ターゲット
		var nextShareTs = [];
		var nextNotShareT = "";
		if (nextS) { 
			if (nextS.indexOf(c0) > -1) {
				nextShareTs.push(c0);
				nextNotShareT = c1;
			}
			if (nextS.indexOf(c1) > -1) {
				nextShareTs.push(c1);
				nextNotShareT = c0;
			}
		}
		
		var plusT = (ABC[c0] < ABC[c1]) ? c0 : c1;
		if (nextShareTs.length == 1 && ABC[nextShareTs[0]] == 1 && ABC[nextNotShareT] == 0 && A + B + C == 2) {
			plusT = nextShareTs[0];
		}
		var minusT = (c0 == plusT) ? c1 : c0;
		
		ABC[plusT]++;
		ABC[minusT]--;
		ans2.push(plusT);
	}
	
	// 出力
	console.log((ans == "No") ? ans : ans + "\n" + ans2.join("\n"));
}
Main(new Scanner(require("fs").readFileSync("/dev/stdin", "utf8")));
// Main(new Scanner("33"));

// var str1 = sc.next(); // Stringで取得
// var int1 = sc.nextInt(); // intで取得
// var bd1 = sc.nextBigDecimal(); // BigDecimalで取得
// var byte1 = sc.nextByte(); // byteで取得
