#include<stdio.h>
int main(){
int S[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
int H[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
int C[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
int D[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
int num,n,i;
char mark; 

scanf("%d", &n);
for(i=0; i<n; i++){
scanf("%c%d", &mark, &num);
	if(mark=='S'){
		S[num]=0;
	}else if(mark=='H'){
		H[num]=0;
	}else if(mark=='C'){
		C[num]=0;
	}else if(mark=='D'){
		D[num]=0;
	}
}

for(i=0; i<13; i++){
	if(S[i]==0){
		printf("");
	}else{
		printf("S %d\n", S[i]);
	}
}

for(i=0; i<13; i++){
	if(H[i]==0){
		printf("");
	}else{
		printf("H %d\n", H[i]);
	}
}

for(i=0; i<13; i++){
	if(C[i]==0){
		printf("");
	}else{
		printf("C %d\n", C[i]);
	}
}

for(i=0; i<13; i++){
	if(D[i]==0){
		printf("");
	}else{
		printf("D %d\n", D[i]);
	}
}

return 0;