import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		boolean[][] found = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		while(n-- > 0){
			String mark = sc.next();
			int markNum = 0;
			if(mark.equals("S")) markNum = 0;
			else if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3;
			int num = sc.nextInt();
			found[markNum][num-1] = true;
		}
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			}
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		boolean[][] found = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		while(n-- > 0){
			String mark = sc.next();
			int markNum = 0;
			if(mark.equals("S")) markNum = 0;
			else if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3;
			int num = sc.nextInt();
			found[markNum][num-1] = true;
		}
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			}
		}
	}

} Main public static void main(String[] args) {
		boolean[][] found = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		while(n-- > 0){
			String mark = sc.next();
			int markNum = 0;
			if(mark.equals("S")) markNum = 0;
			else if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3;
			int num = sc.nextInt();
			found[markNum][num-1] = true;
		}
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			}
		}
	} main {
		boolean[][] found = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		while(n-- > 0){
			String mark = sc.next();
			int markNum = 0;
			if(mark.equals("S")) markNum = 0;
			else if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3;
			int num = sc.nextInt();
			found[markNum][num-1] = true;
		}
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			}
		}
	} boolean[][] found = new boolean[4][13]; found new boolean[4][13] 4 13 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc while(n-- > 0){
			String mark = sc.next();
			int markNum = 0;
			if(mark.equals("S")) markNum = 0;
			else if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3;
			int num = sc.nextInt();
			found[markNum][num-1] = true;
		} n-- > 0 n-- n 0 {
			String mark = sc.next();
			int markNum = 0;
			if(mark.equals("S")) markNum = 0;
			else if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3;
			int num = sc.nextInt();
			found[markNum][num-1] = true;
		} String mark = sc.next(); mark sc.next() sc.next sc int markNum = 0; markNum 0 if(mark.equals("S")) markNum = 0;
			else if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3; mark.equals("S") mark.equals mark "S" markNum = 0 markNum 0 if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3; mark.equals("H") mark.equals mark "H" markNum = 1 markNum 1 if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3; mark.equals("C") mark.equals mark "C" markNum = 2 markNum 2 if(mark.equals("D")) markNum = 3; mark.equals("D") mark.equals mark "D" markNum = 3 markNum 3 int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc found[markNum][num-1] = true found[markNum][num-1] found[markNum] found markNum num-1 num 1 true for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (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(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			}
		} {
			for(int j = 0; j < 13; j++){
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			}
		} for(int j = 0; j < 13; j++){
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			} {
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			} if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				} !found[i][j] found[i][j] found[i] found i j {
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				} if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D"); i == 0 i 0 System.out.print("S") System.out.print System.out System System.out "S" if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D"); i == 1 i 1 System.out.print("H") System.out.print System.out System System.out "H" if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D"); i == 2 i 2 System.out.print("C") System.out.print System.out System System.out "C" if(i == 3) System.out.print("D"); i == 3 i 3 System.out.print("D") System.out.print System.out System System.out "D" System.out.println(" " + (j+1)) System.out.println System.out System System.out " " + (j+1) " " (j+1) j 1 String[] args args public class Main {

	public static void main(String[] args) {
		boolean[][] found = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		while(n-- > 0){
			String mark = sc.next();
			int markNum = 0;
			if(mark.equals("S")) markNum = 0;
			else if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3;
			int num = sc.nextInt();
			found[markNum][num-1] = true;
		}
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			}
		}
	}

} public class Main {

	public static void main(String[] args) {
		boolean[][] found = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		while(n-- > 0){
			String mark = sc.next();
			int markNum = 0;
			if(mark.equals("S")) markNum = 0;
			else if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3;
			int num = sc.nextInt();
			found[markNum][num-1] = true;
		}
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			}
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		boolean[][] found = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		while(n-- > 0){
			String mark = sc.next();
			int markNum = 0;
			if(mark.equals("S")) markNum = 0;
			else if(mark.equals("H")) markNum = 1;
			else if(mark.equals("C")) markNum = 2;
			else if(mark.equals("D")) markNum = 3;
			int num = sc.nextInt();
			found[markNum][num-1] = true;
		}
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if(!found[i][j]){
					if(i == 0) System.out.print("S");
					else if(i == 1) System.out.print("H");
					else if(i == 2) System.out.print("C");
					else if(i == 3) System.out.print("D");
					System.out.println(" " + (j+1));
				}
			}
		}
	}

}