/*
?????????????????????????????????????´????????????????4?¨??????????????????¨??????????????????????????????
sAry
hAry
cAry
dAry

?????¨?????????????????????????¢????????????????????´????0??¨??????
0??§??????????????????????¶????????????????????????§??????
*/

import java.io.*;

public class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char c;
		int n,num;
		int[] sAry = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] hAry = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] cAry = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] dAry = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		
		n = Integer.parseInt(br.readLine());
		//?????¨????????????????????????????????????????´????0?????????
		for(int i=0; i<n; i++){
			String[] ary = br.readLine().split(" ");
			c = ary[0].charAt(0);
			num = Integer.parseInt(ary[1]);
			
			switch(c){
			case 'S':
				sAry[num-1] = 0;
				break;
			case 'H':
				hAry[num-1] = 0;
				break;
			case 'C':
				cAry[num-1] = 0;
				break;
			case 'D':
				dAry[num-1] = 0;
				break;
			default:
				break;
			}
		}
		//0??§??????????´??????±????????????????????????????¨??????¨??°????????¨?????????
		for(int i=0; i<13; i++){
			if(sAry[i] != 0){
				System.out.println("S "+sAry[i]);
			}
		}
		for(int i=0; i<13; i++){
			if(hAry[i] != 0){
				System.out.println("H "+hAry[i]);
			}
		}
		for(int i=0; i<13; i++){
			if(cAry[i] != 0){
				System.out.println("C "+cAry[i]);
			}
		}
		for(int i=0; i<13; i++){
			if(dAry[i] != 0){
				System.out.println("D "+dAry[i]);
			}
		}
	}
}
/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