(function(stdin) {
  function search(array) {
    return allCards.filter(function(card) {
      return array.indexOf(card) === -1;
    });
  }
  var inputs = stdin.toString().trim().split('\n');
  var line = [].concat(inputs);
  var allCards = ['S', 'H', 'C', 'D'].map(function(v) {
    var newArray = [];
    for (var i = 0; i < 13; i++) {
      newArray.push([v, i + 1].join(' '));
    }
    return newArray;
  }).reduce(function(a, b) {
    return a.concat(b);
  });
  if (inputs[0] < 52) {
    console.log(search(line).join('\n'));
  }
})(require('fs').readFileSync('/dev/stdin', 'utf8'));