import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayList;

class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int cnt = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		ArrayList<String> list = new ArrayList<String>();
		String dis;
		for(int n=0;n<4;n++){
			for(int m=1;m<=13;m++){
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			}
		}
		for(int i=0; i<cnt; i++){
			str = br.readLine().split(" ");
			list.remove(list.indexOf(str[0] + " " + str[1]));
		}
		for(int i=0;i<list.size();i++){
			dis = list.get(i);
			System.out.println(dis);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io import java.util.ArrayList; ArrayList java.util class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int cnt = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		ArrayList<String> list = new ArrayList<String>();
		String dis;
		for(int n=0;n<4;n++){
			for(int m=1;m<=13;m++){
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			}
		}
		for(int i=0; i<cnt; i++){
			str = br.readLine().split(" ");
			list.remove(list.indexOf(str[0] + " " + str[1]));
		}
		for(int i=0;i<list.size();i++){
			dis = list.get(i);
			System.out.println(dis);
		}
	}
} Main public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int cnt = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		ArrayList<String> list = new ArrayList<String>();
		String dis;
		for(int n=0;n<4;n++){
			for(int m=1;m<=13;m++){
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			}
		}
		for(int i=0; i<cnt; i++){
			str = br.readLine().split(" ");
			list.remove(list.indexOf(str[0] + " " + str[1]));
		}
		for(int i=0;i<list.size();i++){
			dis = list.get(i);
			System.out.println(dis);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int cnt = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		ArrayList<String> list = new ArrayList<String>();
		String dis;
		for(int n=0;n<4;n++){
			for(int m=1;m<=13;m++){
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			}
		}
		for(int i=0; i<cnt; i++){
			str = br.readLine().split(" ");
			list.remove(list.indexOf(str[0] + " " + str[1]));
		}
		for(int i=0;i<list.size();i++){
			dis = list.get(i);
			System.out.println(dis);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int cnt = Integer.parseInt(br.readLine()); cnt Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] str = new String[2]; str new String[2] 2 ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() String dis; dis for(int n=0;n<4;n++){
			for(int m=1;m<=13;m++){
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			}
		} int n=0; int n=0; n 0 n<4 n 4 n++ n++ n {
			for(int m=1;m<=13;m++){
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			}
		} {
			for(int m=1;m<=13;m++){
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			}
		} for(int m=1;m<=13;m++){
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			} int m=1; int m=1; m 1 m<=13 m 13 m++ m++ m {
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			} {
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			} switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				} n case 0: 0 case 0: list.add("S "+ m) list.add list "S "+ m "S " m break; case 1: 1 case 1: list.add("H "+ m) list.add list "H "+ m "H " m break; case 2: 2 case 2: list.add("C "+ m) list.add list "C "+ m "C " m break; case 3: 3 case 3: list.add("D "+ m) list.add list "D "+ m "D " m break; for(int i=0; i<cnt; i++){
			str = br.readLine().split(" ");
			list.remove(list.indexOf(str[0] + " " + str[1]));
		} int i=0; int i=0; i 0 i<cnt i cnt i++ i++ i {
			str = br.readLine().split(" ");
			list.remove(list.indexOf(str[0] + " " + str[1]));
		} {
			str = br.readLine().split(" ");
			list.remove(list.indexOf(str[0] + " " + str[1]));
		} str = br.readLine().split(" ") str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " list.remove(list.indexOf(str[0] + " " + str[1])) list.remove list list.indexOf(str[0] + " " + str[1]) list.indexOf list str[0] + " " + str[1] str[0] + " " + str[1] str[0] str 0 " " str[1] str 1 for(int i=0;i<list.size();i++){
			dis = list.get(i);
			System.out.println(dis);
		} int i=0; int i=0; i 0 i<list.size() i list.size() list.size list i++ i++ i {
			dis = list.get(i);
			System.out.println(dis);
		} {
			dis = list.get(i);
			System.out.println(dis);
		} dis = list.get(i) dis list.get(i) list.get list i System.out.println(dis) System.out.println System.out System System.out dis String[] args args
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayList;

class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int cnt = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		ArrayList<String> list = new ArrayList<String>();
		String dis;
		for(int n=0;n<4;n++){
			for(int m=1;m<=13;m++){
				switch(n){
				case 0:
					list.add("S "+ m);
					break;
				case 1:
					list.add("H "+ m);
					break;
				case 2:
					list.add("C "+ m);
					break;
				case 3:
					list.add("D "+ m);
					break;
				}
			}
		}
		for(int i=0; i<cnt; i++){
			str = br.readLine().split(" ");
			list.remove(list.indexOf(str[0] + " " + str[1]));
		}
		for(int i=0;i<list.size();i++){
			dis = list.get(i);
			System.out.println(dis);
		}
	}
}