

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


public class Main {
	public static void main(String[] args) throws IOException{

		boolean[] S = new boolean[14];
		boolean[] H = new boolean[14];
		boolean[] C = new boolean[14];
		boolean[] D = new boolean[14];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input = br.readLine();
		int num = Integer.parseInt(input);
		int n=0;

		for(int i = 0;i<num;i++){


			String[] rank = br.readLine().split(" ");

			n=Integer.parseInt(rank[1]);

			switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			}


		}

		for(int i=1;i<14;i++){
			if(S[i]==false){
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(H[i]==false){
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(C[i]==false){
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(D[i]==false){
				System.out.println("D "+i);
			}
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException{

		boolean[] S = new boolean[14];
		boolean[] H = new boolean[14];
		boolean[] C = new boolean[14];
		boolean[] D = new boolean[14];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input = br.readLine();
		int num = Integer.parseInt(input);
		int n=0;

		for(int i = 0;i<num;i++){


			String[] rank = br.readLine().split(" ");

			n=Integer.parseInt(rank[1]);

			switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			}


		}

		for(int i=1;i<14;i++){
			if(S[i]==false){
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(H[i]==false){
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(C[i]==false){
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(D[i]==false){
				System.out.println("D "+i);
			}
		}
	}

} Main public static void main(String[] args) throws IOException{

		boolean[] S = new boolean[14];
		boolean[] H = new boolean[14];
		boolean[] C = new boolean[14];
		boolean[] D = new boolean[14];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input = br.readLine();
		int num = Integer.parseInt(input);
		int n=0;

		for(int i = 0;i<num;i++){


			String[] rank = br.readLine().split(" ");

			n=Integer.parseInt(rank[1]);

			switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			}


		}

		for(int i=1;i<14;i++){
			if(S[i]==false){
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(H[i]==false){
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(C[i]==false){
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(D[i]==false){
				System.out.println("D "+i);
			}
		}
	} main {

		boolean[] S = new boolean[14];
		boolean[] H = new boolean[14];
		boolean[] C = new boolean[14];
		boolean[] D = new boolean[14];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input = br.readLine();
		int num = Integer.parseInt(input);
		int n=0;

		for(int i = 0;i<num;i++){


			String[] rank = br.readLine().split(" ");

			n=Integer.parseInt(rank[1]);

			switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			}


		}

		for(int i=1;i<14;i++){
			if(S[i]==false){
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(H[i]==false){
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(C[i]==false){
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(D[i]==false){
				System.out.println("D "+i);
			}
		}
	} boolean[] S = new boolean[14]; S new boolean[14] 14 boolean[] H = new boolean[14]; H new boolean[14] 14 boolean[] C = new boolean[14]; C new boolean[14] 14 boolean[] D = new boolean[14]; D new boolean[14] 14 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String input = br.readLine(); input br.readLine() br.readLine br int num = Integer.parseInt(input); num Integer.parseInt(input) Integer.parseInt Integer input int n=0; n 0 for(int i = 0;i<num;i++){


			String[] rank = br.readLine().split(" ");

			n=Integer.parseInt(rank[1]);

			switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			}


		} int i = 0; int i = 0; i 0 i<num i num i++ i++ i {


			String[] rank = br.readLine().split(" ");

			n=Integer.parseInt(rank[1]);

			switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			}


		} {


			String[] rank = br.readLine().split(" ");

			n=Integer.parseInt(rank[1]);

			switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			}


		} String[] rank = br.readLine().split(" "); rank br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " n=Integer.parseInt(rank[1]) n Integer.parseInt(rank[1]) Integer.parseInt Integer rank[1] rank 1 switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			} rank[0] rank 0 case "S": "S" case "S": S[n]=true S[n] S n true break; case "H": "H" case "H": H[n]=true H[n] H n true break; case "C": "C" case "C": C[n]=true C[n] C n true break; case "D": "D" case "D": D[n]=true D[n] D n true break; for(int i=1;i<14;i++){
			if(S[i]==false){
				System.out.println("S "+i);
			}
		} int i=1; int i=1; i 1 i<14 i 14 i++ i++ i {
			if(S[i]==false){
				System.out.println("S "+i);
			}
		} {
			if(S[i]==false){
				System.out.println("S "+i);
			}
		} if(S[i]==false){
				System.out.println("S "+i);
			} S[i]==false S[i] S i false {
				System.out.println("S "+i);
			} System.out.println("S "+i) System.out.println System.out System System.out "S "+i "S " i for(int i=1;i<14;i++){
			if(H[i]==false){
				System.out.println("H "+i);
			}
		} int i=1; int i=1; i 1 i<14 i 14 i++ i++ i {
			if(H[i]==false){
				System.out.println("H "+i);
			}
		} {
			if(H[i]==false){
				System.out.println("H "+i);
			}
		} if(H[i]==false){
				System.out.println("H "+i);
			} H[i]==false H[i] H i false {
				System.out.println("H "+i);
			} System.out.println("H "+i) System.out.println System.out System System.out "H "+i "H " i for(int i=1;i<14;i++){
			if(C[i]==false){
				System.out.println("C "+i);
			}
		} int i=1; int i=1; i 1 i<14 i 14 i++ i++ i {
			if(C[i]==false){
				System.out.println("C "+i);
			}
		} {
			if(C[i]==false){
				System.out.println("C "+i);
			}
		} if(C[i]==false){
				System.out.println("C "+i);
			} C[i]==false C[i] C i false {
				System.out.println("C "+i);
			} System.out.println("C "+i) System.out.println System.out System System.out "C "+i "C " i for(int i=1;i<14;i++){
			if(D[i]==false){
				System.out.println("D "+i);
			}
		} int i=1; int i=1; i 1 i<14 i 14 i++ i++ i {
			if(D[i]==false){
				System.out.println("D "+i);
			}
		} {
			if(D[i]==false){
				System.out.println("D "+i);
			}
		} if(D[i]==false){
				System.out.println("D "+i);
			} D[i]==false D[i] D i false {
				System.out.println("D "+i);
			} System.out.println("D "+i) System.out.println System.out System System.out "D "+i "D " i String[] args args public class Main {
	public static void main(String[] args) throws IOException{

		boolean[] S = new boolean[14];
		boolean[] H = new boolean[14];
		boolean[] C = new boolean[14];
		boolean[] D = new boolean[14];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input = br.readLine();
		int num = Integer.parseInt(input);
		int n=0;

		for(int i = 0;i<num;i++){


			String[] rank = br.readLine().split(" ");

			n=Integer.parseInt(rank[1]);

			switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			}


		}

		for(int i=1;i<14;i++){
			if(S[i]==false){
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(H[i]==false){
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(C[i]==false){
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(D[i]==false){
				System.out.println("D "+i);
			}
		}
	}

} public class Main {
	public static void main(String[] args) throws IOException{

		boolean[] S = new boolean[14];
		boolean[] H = new boolean[14];
		boolean[] C = new boolean[14];
		boolean[] D = new boolean[14];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input = br.readLine();
		int num = Integer.parseInt(input);
		int n=0;

		for(int i = 0;i<num;i++){


			String[] rank = br.readLine().split(" ");

			n=Integer.parseInt(rank[1]);

			switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			}


		}

		for(int i=1;i<14;i++){
			if(S[i]==false){
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(H[i]==false){
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(C[i]==false){
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(D[i]==false){
				System.out.println("D "+i);
			}
		}
	}

} Main


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


public class Main {
	public static void main(String[] args) throws IOException{

		boolean[] S = new boolean[14];
		boolean[] H = new boolean[14];
		boolean[] C = new boolean[14];
		boolean[] D = new boolean[14];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input = br.readLine();
		int num = Integer.parseInt(input);
		int n=0;

		for(int i = 0;i<num;i++){


			String[] rank = br.readLine().split(" ");

			n=Integer.parseInt(rank[1]);

			switch(rank[0]){
			case "S":
				S[n]=true;
				break;
			case "H":
				H[n]=true;
				break;
			case "C":
				C[n]=true;
				break;
			case "D":
				D[n]=true;
				break;
			}


		}

		for(int i=1;i<14;i++){
			if(S[i]==false){
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(H[i]==false){
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(C[i]==false){
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<14;i++){
			if(D[i]==false){
				System.out.println("D "+i);
			}
		}
	}

}