import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line1 = reader.readLine();
		int n = Integer.parseInt(line1);
		int s[] = new int[13];
		int h[] = new int[13];
		int c[] = new int[13];
		int d[] = new int[13];
		for(int i = 0; i < 13; i++){
			s[i] = 0;
			h[i] = 0;
			c[i] = 0;
			d[i] = 0;
		}
		for(int j = 0; j < n; j++){
			String line = reader.readLine();
			String[] sarray = line.split(" ", -1);
			if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			}
		}
		for(int k = 0; k < 4; k++){
			for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			}
		}
	}
} import java.io.*; io.* java public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line1 = reader.readLine();
		int n = Integer.parseInt(line1);
		int s[] = new int[13];
		int h[] = new int[13];
		int c[] = new int[13];
		int d[] = new int[13];
		for(int i = 0; i < 13; i++){
			s[i] = 0;
			h[i] = 0;
			c[i] = 0;
			d[i] = 0;
		}
		for(int j = 0; j < n; j++){
			String line = reader.readLine();
			String[] sarray = line.split(" ", -1);
			if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			}
		}
		for(int k = 0; k < 4; k++){
			for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			}
		}
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line1 = reader.readLine();
		int n = Integer.parseInt(line1);
		int s[] = new int[13];
		int h[] = new int[13];
		int c[] = new int[13];
		int d[] = new int[13];
		for(int i = 0; i < 13; i++){
			s[i] = 0;
			h[i] = 0;
			c[i] = 0;
			d[i] = 0;
		}
		for(int j = 0; j < n; j++){
			String line = reader.readLine();
			String[] sarray = line.split(" ", -1);
			if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			}
		}
		for(int k = 0; k < 4; k++){
			for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			}
		}
	} main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line1 = reader.readLine();
		int n = Integer.parseInt(line1);
		int s[] = new int[13];
		int h[] = new int[13];
		int c[] = new int[13];
		int d[] = new int[13];
		for(int i = 0; i < 13; i++){
			s[i] = 0;
			h[i] = 0;
			c[i] = 0;
			d[i] = 0;
		}
		for(int j = 0; j < n; j++){
			String line = reader.readLine();
			String[] sarray = line.split(" ", -1);
			if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			}
		}
		for(int k = 0; k < 4; k++){
			for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			}
		}
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String line1 = reader.readLine(); line1 reader.readLine() reader.readLine reader int n = Integer.parseInt(line1); n Integer.parseInt(line1) Integer.parseInt Integer line1 int s[] = new int[13]; s new int[13] 13 int h[] = new int[13]; h new int[13] 13 int c[] = new int[13]; c new int[13] 13 int d[] = new int[13]; d new int[13] 13 for(int i = 0; i < 13; i++){
			s[i] = 0;
			h[i] = 0;
			c[i] = 0;
			d[i] = 0;
		} int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
			s[i] = 0;
			h[i] = 0;
			c[i] = 0;
			d[i] = 0;
		} {
			s[i] = 0;
			h[i] = 0;
			c[i] = 0;
			d[i] = 0;
		} s[i] = 0 s[i] s i 0 h[i] = 0 h[i] h i 0 c[i] = 0 c[i] c i 0 d[i] = 0 d[i] d i 0 for(int j = 0; j < n; j++){
			String line = reader.readLine();
			String[] sarray = line.split(" ", -1);
			if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			}
		} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
			String line = reader.readLine();
			String[] sarray = line.split(" ", -1);
			if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			}
		} {
			String line = reader.readLine();
			String[] sarray = line.split(" ", -1);
			if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			}
		} String line = reader.readLine(); line reader.readLine() reader.readLine reader String[] sarray = line.split(" ", -1); sarray line.split(" ", -1) line.split line " " -1 1 if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			} sarray[0].equals("S") sarray[0].equals sarray[0] sarray 0 "S" {
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} s[(Integer.parseInt(sarray[1]) - 1)]++ s[(Integer.parseInt(sarray[1]) - 1)] s (Integer.parseInt(sarray[1]) - 1) Integer.parseInt(sarray[1]) Integer.parseInt Integer sarray[1] sarray 1 1 if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			} sarray[0].equals("H") sarray[0].equals sarray[0] sarray 0 "H" {
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} h[(Integer.parseInt(sarray[1]) - 1)]++ h[(Integer.parseInt(sarray[1]) - 1)] h (Integer.parseInt(sarray[1]) - 1) Integer.parseInt(sarray[1]) Integer.parseInt Integer sarray[1] sarray 1 1 if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			} sarray[0].equals("C") sarray[0].equals sarray[0] sarray 0 "C" {
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} c[(Integer.parseInt(sarray[1]) - 1)]++ c[(Integer.parseInt(sarray[1]) - 1)] c (Integer.parseInt(sarray[1]) - 1) Integer.parseInt(sarray[1]) Integer.parseInt Integer sarray[1] sarray 1 1 if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			} sarray[0].equals("D") sarray[0].equals sarray[0] sarray 0 "D" {
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			} d[(Integer.parseInt(sarray[1]) - 1)]++ d[(Integer.parseInt(sarray[1]) - 1)] d (Integer.parseInt(sarray[1]) - 1) Integer.parseInt(sarray[1]) Integer.parseInt Integer sarray[1] sarray 1 1 for(int k = 0; k < 4; k++){
			for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			}
		} int k = 0; int k = 0; k 0 k < 4 k 4 k++ k++ k {
			for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			}
		} {
			for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			}
		} for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			} int l = 0; int l = 0; l 0 l < 13 l 13 l++ l++ l {
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			} {
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			} switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				} k case 0: 0 case 0: if(s[l] == 0){
							System.out.println("S " + (l + 1));
						} s[l] == 0 s[l] s l 0 {
							System.out.println("S " + (l + 1));
						} System.out.println("S " + (l + 1)) System.out.println System.out System System.out "S " + (l + 1) "S " (l + 1) l 1 break; case 1: 1 case 1: if(h[l] == 0){
							System.out.println("H " + (l + 1));
						} h[l] == 0 h[l] h l 0 {
							System.out.println("H " + (l + 1));
						} System.out.println("H " + (l + 1)) System.out.println System.out System System.out "H " + (l + 1) "H " (l + 1) l 1 break; case 2: 2 case 2: if(c[l] == 0){
							System.out.println("C " + (l + 1));
						} c[l] == 0 c[l] c l 0 {
							System.out.println("C " + (l + 1));
						} System.out.println("C " + (l + 1)) System.out.println System.out System System.out "C " + (l + 1) "C " (l + 1) l 1 break; default: default: if(d[l] == 0){
							System.out.println("D " + (l + 1));
						} d[l] == 0 d[l] d l 0 {
							System.out.println("D " + (l + 1));
						} System.out.println("D " + (l + 1)) System.out.println System.out System System.out "D " + (l + 1) "D " (l + 1) l 1 String[] args args public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line1 = reader.readLine();
		int n = Integer.parseInt(line1);
		int s[] = new int[13];
		int h[] = new int[13];
		int c[] = new int[13];
		int d[] = new int[13];
		for(int i = 0; i < 13; i++){
			s[i] = 0;
			h[i] = 0;
			c[i] = 0;
			d[i] = 0;
		}
		for(int j = 0; j < n; j++){
			String line = reader.readLine();
			String[] sarray = line.split(" ", -1);
			if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			}
		}
		for(int k = 0; k < 4; k++){
			for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			}
		}
	}
} public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line1 = reader.readLine();
		int n = Integer.parseInt(line1);
		int s[] = new int[13];
		int h[] = new int[13];
		int c[] = new int[13];
		int d[] = new int[13];
		for(int i = 0; i < 13; i++){
			s[i] = 0;
			h[i] = 0;
			c[i] = 0;
			d[i] = 0;
		}
		for(int j = 0; j < n; j++){
			String line = reader.readLine();
			String[] sarray = line.split(" ", -1);
			if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			}
		}
		for(int k = 0; k < 4; k++){
			for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			}
		}
	}
} Main
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line1 = reader.readLine();
		int n = Integer.parseInt(line1);
		int s[] = new int[13];
		int h[] = new int[13];
		int c[] = new int[13];
		int d[] = new int[13];
		for(int i = 0; i < 13; i++){
			s[i] = 0;
			h[i] = 0;
			c[i] = 0;
			d[i] = 0;
		}
		for(int j = 0; j < n; j++){
			String line = reader.readLine();
			String[] sarray = line.split(" ", -1);
			if(sarray[0].equals("S")){
				s[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("H")){
				h[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("C")){
				c[(Integer.parseInt(sarray[1]) - 1)]++;
			} else if(sarray[0].equals("D")){
				d[(Integer.parseInt(sarray[1]) - 1)]++;
			}
		}
		for(int k = 0; k < 4; k++){
			for(int l = 0; l < 13; l++){
				switch(k){
					case 0:
						if(s[l] == 0){
							System.out.println("S " + (l + 1));
						}
						break;
					case 1:
						if(h[l] == 0){
							System.out.println("H " + (l + 1));
						}
						break;
					case 2:
						if(c[l] == 0){
							System.out.println("C " + (l + 1));
						}
						break;
					default:
						if(d[l] == 0){
							System.out.println("D " + (l + 1));
						}
				}
			}
		}
	}
}