int main(void){
    
    //変数宣言&初期化
    char SHCD[52]; //絵柄代入用
    int num[52],total = 0,i = 0,j = 0;
    bool card[4][13];
    
    
    cin >> total;
    
    //入力
    for(i = 0;i < total;i++)
    {
        cin >> SHCD[i] >> num[i];
    }
    
    
    //
    for(i = 0;i < total;i++)
    {
        if(SHCD[i] == "S")
        {
            card[0][num[i]]=true;
            
        }
        
        if(SHCD[i] == "H")
        {
            card[1][num[i]]=true;
            
        }
        
        if(SHCD[i] == "C")
        {
            card[2][num[i]]=true;   
           
        }
        
        if(SHCD[i] == "D")
        {
            card[3][num[i]]=true;
            
        }
    }
    
    //不足しているカードの特定
    for(j = 0;j < 4;j++)
    {
        
        for(i = 0;i < 14;i++)
        {
            
            if(card[j][i] == false && i != 0)
            {
                
                //絵柄特定
                if(j == 0)
                {
                    cout << "S " << i << endl;
                }
                
                if(j == 1)
                {
                    cout << "H " << i << endl;
                }
                
                if(j == 2)
                {
                    cout << "C " << i << endl;
                }
                
                if(j == 3)
                {
                    cout << "D " << i << endl;
                }
            
                
            }
            
            
        }
        
    }
    
    return 0;
    
} 
