#include <iostream>

using namespace std;

int main(){
  int card[4][13] = {};
  int n;
  char a;
  int b;
  
  cin >> n;
  for( int i = 0; i < n; ++i){
    cin >> a >> b;
    if( a == 'S' ) card[0][b-1] = 1;
    if( a == 'H' ) card[1][b-1] = 1;
    if( a == 'C' ) card[2][b-1] = 1;
    if( a == 'D' ) card[3][b-1] = 1;
  }

  for( int i = 0; i < 13; ++i){
    if( !card[0][i] ) cout << "S " << i+1 << endl;
    if( !card[1][i] ) cout << "H " << i+1 << endl;
    if( !card[2][i] ) cout << "C " << i+1 << endl;
    if( !card[3][i] ) cout << "D " << i+1 << en
  }
  return 0;
}