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