#include<iostream>
#include<studio.h>

using namespace std;

int main(){

	char mark;
	int card[4][13];
	int i, j, n , num;

	cin >> n;

	for (i = 0; i < n; i++){
		cin >> mark >> num;
		switch (mark){
		case'S':
			card[0][num] = 1;
				break;
		case'H':
			card[1][num] = 1;
				break;
		case'C':
			card[2][num] = 1;
				break;
		case'D':
			card[3][num] = 1;
				break;
		}
	}


	for (i = 0; i < 4; i++){
		for (j = 1; j < 14; j++){
				if (card[i][j] != 1){

					if (i == 0){
						cout << "S " << j << endl;
					}
					if (i == 1){
						cout << "H " << j << endl;
					}
					if (i == 2){
						cout << "C " << j << endl;
					}
					if (i == 3){
						cout << "D " << j << endl;
					}

			}
		}
	}
	return 0;
}