var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var row = input.split('\n');
row.shift();
var type = "SHCD".split('');
var missingCard = "";
for (var i = 0 ; i <4; i ++){
  for(var j=1; j<=13; j++){
    var y = type[i] + ' ' + j;
    if(row.indexOf(y) === -1){
      missingCard+=y + '\n';
    }
  }
}
if(missingCard !== ''){
  console.log(missingCard.trim());
}

