import java.io.*;
import java.util.ArrayList;
class Main{
	public static void main(String[]args)throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb=new StringBuilder();
		
		String str=br.readLine();
		int n=Integer.parseInt(str);
		
		ArrayList<String>list=new ArrayList<>();
		
		for(int i=0;i<n;i++){
			list.add(br.readLine());
		}
		for(int j=0;j<4;j++){
			for(int k=0;k<13;k++){
				if(j==0){
					if (list.contains("S " +(k+1)) == false) {
						sb.append("S ").append(k+1).append("\n");
					}
				}
				else if(j==1){
					if (list.contains("H " +(k+1)) == false) {
						sb.append("H ").append(k+1).append("\n");
					}
				}
				else if(j==2){
					if (list.contains("C " +(k+1)) == false) {
						sb.append("C ").append(k+1).append("\n");
					}
				}
				else if(j==3){
					if (list.contains("D " +(k+1)) == false) {
						sb.append("D ").append(k+1).append("\n");
					}
				}
			}
		}
		System.out.print(sb);
	}
}
/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