
#include <stdio.h>

int main(void){


	int n, i, h, R;
	char M;
	int flag[4][13];
	
	//?????°????????????
		for(i = 0; 4 > i; i++){
			for(h = 0; 13 > h; h++){
				flag[i][h] = 0;
			}
		}

	scanf("%d", &n);
	
	//??????????????\???????´?
	for(i = 0; n > i; i++){
		scanf("%c %d", &M, &R);

		if(M == 'S')
			flag[0][R-1] = 1;
		if(M == 'H')
			flag[1][R-1] = 1;
		if(M == 'C')
			flag[2][R-1] = 1;
		if(M == 'D')
			flag[3][R-1] = 1;

	}
		for(i = 0; 4 > i; i++){
			for(h = 0; 13 > h; h++){
				if(flag[i][h] == 0){
					if(i == 0)
						printf("S %d\n", h+1);
					if(i == 1)
						printf("H %d\n", h+1);
					if(i == 2)
						printf("C %d\n", h+1);
					if(i == 3)
						printf("D %d\n", h+1);
				}
			}
		}