#include <stdio.h>
#define PIC (4)
#define RANK (13)

int main(){
int i,j,n,pic,rank,stuck[PIC][RANK];
char pic_s;
scanf("%d",&n);
stuck=0;
for(i=0;i<n;i++){
   scanf("%c %d",&pic_s,&rank);
   switch(pic_s){
      case 'S':pic=0;
      case 'H':pic=1;
      case 'C':pic=2;
      case 'D':pic=3;
   }
   stuck[pic][rank-1]=1;
}
for(i=0;i<PIC;i++){
   for(j=0;j<RANK;j++){
      if(stuck[i][j]!=1){
         switch(i){
            case 0:printf("S %d\n",j+1);
            case 1:printf("H %d\n",j+1);
            case 2:printf("C %d\n",j+1);
            case 3:printf("D %d\n",j+1);
         }
      }
   }
}
return 0;
}