import std.stdio;
import std.string;
import std.conv;
import std.array;

void main()
{
    int num;
    num = chomp(readln()).to!int;
    string[][4] card;
    
    for(int i = 0; i < num; ++i){
        string[] tmp = split(chomp(readln()));
        if(tmp[0] == "S")
            card[0] ~= tmp[1];
        else if(tmp[0] == "H")
            card[1] ~= tmp[1];
        else if(tmp[0] == "C")
            card[2] ~= tmp[1];
        else if(tmp[0] == "D")
            card[3] ~= tmp[1];
    }
    
    bool[13][4] flag = false;
    for(int i = 0; i < 4; ++i){
        for(int j = 0; j < card[i].length; ++j){
            flag[i][(card[i][j].to!int)-1] = true;
        }
    }
    
    for(int i = 0; i < 4; ++i){
        for(int j = 0; j < 13; ++j){
            if(!flag[i][j]){
                if(i == 0)
                    writeln("S ", j+1);
                else if(i == 1)
                    writeln("H ", j+1);
                else if(i == 2)
                    writeln("C ", j+1);
                else if(i == 3)
                    writeln("D ", j+1);
            }
        }
    }
} 