function del( row, num ) {
   row.splice( row.indexOf(num), 1 );
}

let S = [1,2,3,4,5,6,7,8,9,10,11,12,13];
let H = [1,2,3,4,5,6,7,8,9,10,11,12,13];
let C = [1,2,3,4,5,6,7,8,9,10,11,12,13];
let D = [1,2,3,4,5,6,7,8,9,10,11,12,13];

let input = require('fs').readFileSync('/dev/stdin', 'utf8').split("\n");
for( let i = 1; i < input.length; i++ ) {
  let sp = input[i].split(" ");
  sp[1] = Number(sp[1]);
  if( sp[0] === "S" ) {
    del( S, sp[1] );
  } else if ( sp[0] === "H" ) {
    del( H, sp[1] );
  } else if ( sp[0] === "C" ) {
    del( C, sp[1] );
  } else if ( sp[0] === "D" ) {
    del( D, sp[1] );
  }
}

for( let i = 0; i < S.length; i++ ) console.log( "S " + S[i] );
for( let i = 0; i < H.length; i++ ) console.log( "H " + H[i] );
for( let i = 0; i < C.length; i++ ) console.log( "C " + C[i] );
for( let i = 0; i < D.length; i++ ) console.log( "D " + D[i] );

