import java.io.IOException;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		Object[][] array = new Object[4][13];

		for(int i=0;i<x;i++) {
			String mark = sc.next();
			int num = sc.nextInt();

			if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			}
		}

		for(int i=0;i<4;i++) {
			for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			}
		}
		sc.close();
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		Object[][] array = new Object[4][13];

		for(int i=0;i<x;i++) {
			String mark = sc.next();
			int num = sc.nextInt();

			if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			}
		}

		for(int i=0;i<4;i++) {
			for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			}
		}
		sc.close();
	}
} Main public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		Object[][] array = new Object[4][13];

		for(int i=0;i<x;i++) {
			String mark = sc.next();
			int num = sc.nextInt();

			if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			}
		}

		for(int i=0;i<4;i++) {
			for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			}
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		Object[][] array = new Object[4][13];

		for(int i=0;i<x;i++) {
			String mark = sc.next();
			int num = sc.nextInt();

			if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			}
		}

		for(int i=0;i<4;i++) {
			for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			}
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc Object[][] array = new Object[4][13]; array new Object[4][13] 4 13 for(int i=0;i<x;i++) {
			String mark = sc.next();
			int num = sc.nextInt();

			if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			}
		} int i=0; int i=0; i 0 i<x i x i++ i++ i {
			String mark = sc.next();
			int num = sc.nextInt();

			if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			}
		} {
			String mark = sc.next();
			int num = sc.nextInt();

			if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			}
		} String mark = sc.next(); mark sc.next() sc.next sc int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			} mark.equals("S") mark.equals mark "S" {
				array[0][num-1] = num;
			} array[0][num-1] = num array[0][num-1] array[0] array 0 num-1 num 1 num if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			} mark.equals("H") mark.equals mark "H" {
				array[1][num-1] = num;
			} array[1][num-1] = num array[1][num-1] array[1] array 1 num-1 num 1 num if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			} mark.equals("C") mark.equals mark "C" {
				array[2][num-1] = num;
			} array[2][num-1] = num array[2][num-1] array[2] array 2 num-1 num 1 num if(mark.equals("D")) {
				array[3][num-1] = num;
			} mark.equals("D") mark.equals mark "D" {
				array[3][num-1] = num;
			} array[3][num-1] = num array[3][num-1] array[3] array 3 num-1 num 1 num for(int i=0;i<4;i++) {
			for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			}
		} int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
			for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			}
		} {
			for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			}
		} for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			} int j=0; int j=0; j 0 j<13 j 13 j++ j++ j {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			} {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			} if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				} array[i][j]==null array[i][j] array[i] array i j null {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				} if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					} i==0 i 0 {
						System.out.println("S " + (j+1));
					} System.out.println("S " + (j+1)) System.out.println System.out System System.out "S " + (j+1) "S " (j+1) j 1 if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					} i==1 i 1 {
						System.out.println("H " + (j+1));
					} System.out.println("H " + (j+1)) System.out.println System.out System System.out "H " + (j+1) "H " (j+1) j 1 if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					} i==2 i 2 {
						System.out.println("C " + (j+1));
					} System.out.println("C " + (j+1)) System.out.println System.out System System.out "C " + (j+1) "C " (j+1) j 1 if(i==3) {
						System.out.println("D " + (j+1));
					} i==3 i 3 {
						System.out.println("D " + (j+1));
					} System.out.println("D " + (j+1)) System.out.println System.out System System.out "D " + (j+1) "D " (j+1) j 1 sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		Object[][] array = new Object[4][13];

		for(int i=0;i<x;i++) {
			String mark = sc.next();
			int num = sc.nextInt();

			if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			}
		}

		for(int i=0;i<4;i++) {
			for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			}
		}
		sc.close();
	}
} public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		Object[][] array = new Object[4][13];

		for(int i=0;i<x;i++) {
			String mark = sc.next();
			int num = sc.nextInt();

			if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			}
		}

		for(int i=0;i<4;i++) {
			for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			}
		}
		sc.close();
	}
} Main
import java.io.IOException;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		Object[][] array = new Object[4][13];

		for(int i=0;i<x;i++) {
			String mark = sc.next();
			int num = sc.nextInt();

			if(mark.equals("S")) {
				array[0][num-1] = num;
			}else if(mark.equals("H")) {
				array[1][num-1] = num;
			}else if(mark.equals("C")) {
				array[2][num-1] = num;
			}else if(mark.equals("D")) {
				array[3][num-1] = num;
			}
		}

		for(int i=0;i<4;i++) {
			for(int j=0;j<13;j++) {
				if(array[i][j]==null) {
					if(i==0) {
						System.out.println("S " + (j+1));
					}else if(i==1) {
						System.out.println("H " + (j+1));
					}else if(i==2) {
						System.out.println("C " + (j+1));
					}else if(i==3) {
						System.out.println("D " + (j+1));
					}
				}
			}
		}
		sc.close();
	}
}
