import java.util.*;
      
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] card = new int[53];
        
        for(int i = 1;i <= n;i++){
        	String mark = sc.next();
        	int num = sc.nextInt();
        	if(mark.equals("S")){
        		card[num] = 1;
        	}else if(mark.equals("H")){
        		card[num + 13] = 1;
        	}else if(mark.equals("C")){
        		card[num + 26] = 1;
        	}else if(mark.equals("D")){
        		card[num + 39] = 1;
        	}
        	//System.out.println(card[i]);
        }
        
        for(int i = 1;i <= 52;i++){
        	if(card[i] == 0){
        		if(1 <= i && i <= 13){
        			System.out.println("S "+ i);
        		}else if(14 <= i && i <= 26){
        			System.out.println("H " + (i - 13));
        		}else if(27 <= i && i <= 39){
        			System.out.println("C "+(i - 26));
        		}else if(40 <= i && i <= 52){
        			System.out.println("D "+(i - 39));
        		}
        	}
        }
    }
}
/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