"use strict"

const input = require('fs').readFileSync('/dev/stdin','utf8');
var cards = input.trim().split('\n').slice(1);
var set = new Set();
for (var i in cards) {
	set.add(cards[i]);
}

['S', 'H', 'C', 'D'].forEach(
	function(suit) {
		for (var rank=1; rank<=13; rank++) {
			var card = suit + ' ' + rank;
			if (!set.has(card)) {
				console.log(card);
			}
		}
	}
);
