var input=require("fs").readFileSync("/dev/stdin","utf8");
input=input.split("\n");
var n=input[0];
var tbl=new Array(4);
for (let i=0;i<4;i++){
    tbl[i]=new Array(4).fill(0);
}

for(var i=1;i<=n;i++){
    var card=input[i].split(" ");
    switch(card[0]){
        case "S":
            tbl[0][parseInt(card[1])-1]=1;
            break;
        case "H":
            tbl[1][parseInt(card[1])-1]=1;
            break;
        case "C":
            tbl[2][parseInt(card[1])-1]=1;
            break;
        case "D":
            tbl[3][parseInt(card[1])-1]=1;
            break;
    }
}

for(var j=0;j<4;j++){
    for(let i=0;i<13;i++){
        if(tbl[j][i]!=1){
            switch(j){
                case 0:
                    console.log("S "+(parseInt(i)+1));
                    break;
                case 1:
                    console.log("H "+(parseInt(i)+1));
                    break;
                case 2:
                    console.log("C "+(parseInt(i)+1));
                    break;
                case 3:
                    console.log("D "+(parseInt(i)+1));
                    break;
            }
        }
    }
}
