


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;




public class Main {

    public static void main(String[] args) {
       
        Scanner sc = new Scanner(System.in);
        
        List<Index> pie = new ArrayList<>();
        
        for(int i=1; i<=13; i++) pie.add(new Index("S",i));
        for(int i=1; i<=13; i++) pie.add(new Index("H",i));
        for(int i=1; i<=13; i++) pie.add(new Index("C",i));
        for(int i=1; i<=13; i++) pie.add(new Index("D",i));
        
        int n = sc.nextInt();
        
        
        for(int j=0; j<n; j++){
            String mo = sc.next();
            int bu = sc.nextInt();
         for(Index ewq : pie){
          if(ewq.x.equals( mo )  && ewq.y == bu){
                 ewq.exist = true;
          }}}
        for(Index ewq : pie){
            if(!ewq.exist){
                System.out.println(ewq.x +" "+ ewq.y);
            }
        }
    }
    
    public static class Index {
        
         boolean exist;
         String x;
         int y;
         
         Index(String x, int y){
         this.x = x;
         this.y = y;
         exist = false;
        
        }
    }
}



        
    

       

   



/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz