#include<stdio.h>
int main(void){
	int cards[4][13] = 0;
	int b,i,j,n;
	char a;
	scanf("%d"&n);
	for(i = 0;i < n;i++){
		scanf("%c %d",&a,&b);
		if(a == 'S'){
			cards[0][b] = 1;
		}
		if(a == 'H'){
			cards[1][b] = 1;
		}
		if(a == 'C'){
			cards[2][b] = 1;
		}
		if(a == 'D'){
			cards[3][b] = 1;
		}
	}
	for(i = 0;i < 4;i++){
		for(j = 0;j < 13;j++){
			if(cards[i][j] == 0){
				if(i == 0){
					printf("S %d",j + 1);
				}
				else if(i == 1){
					printf("H %d",j + 1);
				}
				else if(i == 2){
					printf("C %d",j + 1);
				}
				else{
					printf("D %d",j + 1);
				}
			}
		}
	}
	return 0;
}