function Main(input) {
	const data = input.split('\n');
	const n = data[0];
	let givenCards = '';
	const egara = ['S', 'H', 'C', 'D'];
	let tramps = [];
	let result = '';

	for (let i = 1; i <= n; i++) {
		givenCards += data[i] + '  ';
	}

	for (let i = 0; i < 4; i++) {
		for (let j = 1; j <= 13; j++) {
			tramps.push(egara[i] + ' ' + j);
		}
	}

	for (let i = 0; i < 52; i++) {
		if (givenCards.indexOf(tramps[i] + ' ') === -1) {
			console.log(tramps[i]);
		}
	}
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
