#include <stdio.h>

int main(void){

  boolean a[4][13];
  int n,rank;
  char c;
  register int i,s;

  scanf("%d",&n);
  for(i = 0;i < n;i++){
    scanf("%c %d",&c,&rank);
    if(c == 'S'){
      a[1][rank] = true;
    }else if(c == 'H'){
      a[2][rank] = true;
    }else if(c == 'C'){
      a[3][rank] = true;
    }else if(c == 'H'){
      a[4][rank] = true;
    }
  }
  for(i = 0;i < 4;i++){
    for(s = 0;s < 13;s++){
      if(a[i][s] == false){
        if(i == 0){
          printf("S %d\n",s);
        }else if(i == 1){
          printf("H %d\n",s);
        }else if(i == 2){
          printf("C %d\n",s);
        }else if(i == 3){
          printf("D %d\n",s);
        }
      }
    }
  }
  return 0;
}