const input = require('fs').readFileSync('/dev/stdin', 'utf8').split(/\n/);
let s = [];
let h = [];
let c = [];
let d = [];
for (let i = 1; i < input.length; i++) {
    let card = input[i].split(' ');
    let num = Number(card[1]);
    if (card[0] === 'S') {
        s.push(num);
    }
    if (card[0] === 'H') {
        h.push(num);
    }
    if (card[0] === 'C') {
        c.push(num);
    }
    if (card[0] === 'D') {
        d.push(num);
    }
}
let SArray = [];
let HArray = [];
let CArray = [];
let DArray = [];
    for(i = 1; i <= 13; i ++){
        if (s.indexOf(i) === -1) {
          SArray.push(i)
        }
    }
    for (const value of SArray) {
    console.log('S' + ' ' + value);
    }
    
    for(i = 1; i <= 13; i ++){
        if (h.indexOf(i) === -1) {
          HArray.push(i)
        }
    }
    for (const value of HArray) {
    console.log('H' + ' ' + value);
    }
    
    for(i = 1; i <= 13; i ++){
        if (c.indexOf(i) === -1) {
          CArray.push(i)
        }
    }
    for (const value of CArray) {
    console.log('C' + ' ' + value);
    }
    
    for(i = 1; i <= 13; i ++){
        if (d.indexOf(i) === -1) {
          DArray.push(i)
        }
    }
    for (const value of DArray) {
    console.log('D' + ' ' + value);
    }



