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