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

public class Main {
	public static void main(String[] args)throws IOException{
		int rank = 0;
		String[] look;
		boolean [] S = new boolean [13];
		boolean [] H = new boolean [13];
		boolean [] C = new boolean [13];
		boolean [] D = new boolean [13];

		BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
		int card = Integer.parseInt(br.readLine());

		for(int i = 0; i < card; i++){
			look = br.readLine().split(" ");
			rank = Integer.parseInt(look[1]);

			if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			}
		}
		for(int s = 0; s < 13; s++){
			if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			}
		}
	}
} 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{
		int rank = 0;
		String[] look;
		boolean [] S = new boolean [13];
		boolean [] H = new boolean [13];
		boolean [] C = new boolean [13];
		boolean [] D = new boolean [13];

		BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
		int card = Integer.parseInt(br.readLine());

		for(int i = 0; i < card; i++){
			look = br.readLine().split(" ");
			rank = Integer.parseInt(look[1]);

			if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			}
		}
		for(int s = 0; s < 13; s++){
			if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			}
		}
	}
} Main public static void main(String[] args)throws IOException{
		int rank = 0;
		String[] look;
		boolean [] S = new boolean [13];
		boolean [] H = new boolean [13];
		boolean [] C = new boolean [13];
		boolean [] D = new boolean [13];

		BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
		int card = Integer.parseInt(br.readLine());

		for(int i = 0; i < card; i++){
			look = br.readLine().split(" ");
			rank = Integer.parseInt(look[1]);

			if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			}
		}
		for(int s = 0; s < 13; s++){
			if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			}
		}
	} main {
		int rank = 0;
		String[] look;
		boolean [] S = new boolean [13];
		boolean [] H = new boolean [13];
		boolean [] C = new boolean [13];
		boolean [] D = new boolean [13];

		BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
		int card = Integer.parseInt(br.readLine());

		for(int i = 0; i < card; i++){
			look = br.readLine().split(" ");
			rank = Integer.parseInt(look[1]);

			if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			}
		}
		for(int s = 0; s < 13; s++){
			if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			}
		}
	} int rank = 0; rank 0 String[] look; look boolean [] S = new boolean [13]; S new boolean [13] 13 boolean [] H = new boolean [13]; H new boolean [13] 13 boolean [] C = new boolean [13]; C new boolean [13] 13 boolean [] D = new boolean [13]; D new boolean [13] 13 BufferedReader  br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int card = Integer.parseInt(br.readLine()); card Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < card; i++){
			look = br.readLine().split(" ");
			rank = Integer.parseInt(look[1]);

			if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			}
		} int i = 0; int i = 0; i 0 i < card i card i++ i++ i {
			look = br.readLine().split(" ");
			rank = Integer.parseInt(look[1]);

			if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			}
		} {
			look = br.readLine().split(" ");
			rank = Integer.parseInt(look[1]);

			if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			}
		} look = br.readLine().split(" ") look br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " rank = Integer.parseInt(look[1]) rank Integer.parseInt(look[1]) Integer.parseInt Integer look[1] look 1 if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			} look[0].equals("S") look[0].equals look[0] look 0 "S" {
				S[rank - 1] = true;
			} S[rank - 1] = true S[rank - 1] S rank - 1 rank 1 true if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			} look[0].equals("H") look[0].equals look[0] look 0 "H" {
				H[rank - 1] = true;
			} H[rank - 1] = true H[rank - 1] H rank - 1 rank 1 true if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			} look[0].equals("C") look[0].equals look[0] look 0 "C" {
				C[rank - 1] = true;
			} C[rank - 1] = true C[rank - 1] C rank - 1 rank 1 true if(look[0].equals("D")){
				D[rank - 1] = true;
			} look[0].equals("D") look[0].equals look[0] look 0 "D" {
				D[rank - 1] = true;
			} D[rank - 1] = true D[rank - 1] D rank - 1 rank 1 true for(int s = 0; s < 13; s++){
			if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			}
		} int s = 0; int s = 0; s 0 s < 13 s 13 s++ s++ s {
			if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			}
		} {
			if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			}
		} if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			} !S[s] S[s] S s {
				System.out.println("S" + " " + (s + 1));
			} System.out.println("S" + " " + (s + 1)) System.out.println System.out System System.out "S" + " " + (s + 1) "S" + " " + (s + 1) "S" " " (s + 1) s 1 for(int s = 0; s < 13; s++){
			if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			}
		} int s = 0; int s = 0; s 0 s < 13 s 13 s++ s++ s {
			if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			}
		} {
			if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			}
		} if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			} !H[s] H[s] H s {
				System.out.println("H" + " " + (s + 1));
			} System.out.println("H" + " " + (s + 1)) System.out.println System.out System System.out "H" + " " + (s + 1) "H" + " " + (s + 1) "H" " " (s + 1) s 1 for(int s = 0; s < 13; s++){
			if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			}
		} int s = 0; int s = 0; s 0 s < 13 s 13 s++ s++ s {
			if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			}
		} {
			if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			}
		} if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			} !C[s] C[s] C s {
				System.out.println("C" + " " + (s + 1));
			} System.out.println("C" + " " + (s + 1)) System.out.println System.out System System.out "C" + " " + (s + 1) "C" + " " + (s + 1) "C" " " (s + 1) s 1 for(int s = 0; s < 13; s++){
			if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			}
		} int s = 0; int s = 0; s 0 s < 13 s 13 s++ s++ s {
			if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			}
		} {
			if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			}
		} if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			} !D[s] D[s] D s {
				System.out.println("D" + " " + (s + 1));
			} System.out.println("D" + " " + (s + 1)) System.out.println System.out System System.out "D" + " " + (s + 1) "D" + " " + (s + 1) "D" " " (s + 1) s 1 String[] args args public class Main {
	public static void main(String[] args)throws IOException{
		int rank = 0;
		String[] look;
		boolean [] S = new boolean [13];
		boolean [] H = new boolean [13];
		boolean [] C = new boolean [13];
		boolean [] D = new boolean [13];

		BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
		int card = Integer.parseInt(br.readLine());

		for(int i = 0; i < card; i++){
			look = br.readLine().split(" ");
			rank = Integer.parseInt(look[1]);

			if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			}
		}
		for(int s = 0; s < 13; s++){
			if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			}
		}
	}
} public class Main {
	public static void main(String[] args)throws IOException{
		int rank = 0;
		String[] look;
		boolean [] S = new boolean [13];
		boolean [] H = new boolean [13];
		boolean [] C = new boolean [13];
		boolean [] D = new boolean [13];

		BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
		int card = Integer.parseInt(br.readLine());

		for(int i = 0; i < card; i++){
			look = br.readLine().split(" ");
			rank = Integer.parseInt(look[1]);

			if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			}
		}
		for(int s = 0; s < 13; s++){
			if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			}
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args)throws IOException{
		int rank = 0;
		String[] look;
		boolean [] S = new boolean [13];
		boolean [] H = new boolean [13];
		boolean [] C = new boolean [13];
		boolean [] D = new boolean [13];

		BufferedReader  br = new BufferedReader(new InputStreamReader(System.in));
		int card = Integer.parseInt(br.readLine());

		for(int i = 0; i < card; i++){
			look = br.readLine().split(" ");
			rank = Integer.parseInt(look[1]);

			if(look[0].equals("S")){
				S[rank - 1] = true;
			}else if(look[0].equals("H")){
				H[rank - 1] = true;
			}else if(look[0].equals("C")){
				C[rank - 1] = true;
			}else if(look[0].equals("D")){
				D[rank - 1] = true;
			}
		}
		for(int s = 0; s < 13; s++){
			if(!S[s]){
				System.out.println("S" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!H[s]){
				System.out.println("H" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!C[s]){
				System.out.println("C" + " " + (s + 1));
			}
		}
		for(int s = 0; s < 13; s++){
			if(!D[s]){
				System.out.println("D" + " " + (s + 1));
			}
		}
	}
}