let input = require('fs').readFileSync('/dev/stdin', 'UTF-8');
let data = input.split('\n');
data.shift()
let cards = data;
let shapes = ['S', 'H', 'C', 'D'];
let str = '';
for (let i=0; i<4; i++) {
  for (let j=1; j<=13; j++) {
    let card = shapes[i] + ' ' + j;
    if (!cards.includes(card)) str += card + '\n';
  }
}
if (str !== '') console.log(str.trim());
