const chunk = require('fs').readFileSync('/dev/stdin', 'utf8');

const existCard = chunk.split('\n').slice(1);

['S','H','C','D'].forEach(function(suit) {
    for (var rank = 1; rank <= 13; rank++) {
        var card = suit + ' ' + rank;
        if (existCard.indexOf(card) === -1) {
            console.log(card);
        }
    }
});