#include <iostream>
using namespace std;

const char pics[] = { 'S', 'H', 'C', 'D' };

int main() {

	int n;
	bool cards[4][13];
	char pc;
	int pi, r;

	for (int i = 0; i < 4; ++i) {
		for (int j = 0; j < 13; ++j) {
			cards[i][j] = false;
		}
	}

	cin >> n;
	for (int i = 0; i < n; ++i) {
		cin >> pc >> r;
		for (int j = 0; j < 4; ++j) {
			if (pc == pics[j]) {
				pi = j;
				break;
			}
		}
		cards[pi][r - 1] = true;
	}
	for (int i = 0; i < 4; ++i) {
		for (int j = 0; j < 13; ++j) {
			if (!cards[i][j]) {

