import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i, j, k;
		int trmp[][];
		trmp = new int[4][13];
		
		String egara[] = { "S", "H", "C", "D" };
		
		int n = scan.nextInt();
		String x="0";
		int y=0;int card;
		for (k = 1; k <= n; k++) {
			x = scan.next();
			y = scan.nextInt();
if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			}


		}
		for (j = 0; j < 4; j++) {
			for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			}
		}

	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i, j, k;
		int trmp[][];
		trmp = new int[4][13];
		
		String egara[] = { "S", "H", "C", "D" };
		
		int n = scan.nextInt();
		String x="0";
		int y=0;int card;
		for (k = 1; k <= n; k++) {
			x = scan.next();
			y = scan.nextInt();
if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			}


		}
		for (j = 0; j < 4; j++) {
			for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			}
		}

	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i, j, k;
		int trmp[][];
		trmp = new int[4][13];
		
		String egara[] = { "S", "H", "C", "D" };
		
		int n = scan.nextInt();
		String x="0";
		int y=0;int card;
		for (k = 1; k <= n; k++) {
			x = scan.next();
			y = scan.nextInt();
if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			}


		}
		for (j = 0; j < 4; j++) {
			for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			}
		}

	} main {
		Scanner scan = new Scanner(System.in);
		int i, j, k;
		int trmp[][];
		trmp = new int[4][13];
		
		String egara[] = { "S", "H", "C", "D" };
		
		int n = scan.nextInt();
		String x="0";
		int y=0;int card;
		for (k = 1; k <= n; k++) {
			x = scan.next();
			y = scan.nextInt();
if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			}


		}
		for (j = 0; j < 4; j++) {
			for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			}
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int i i j j k; k int trmp[][]; trmp trmp = new int[4][13] trmp new int[4][13] 4 13 String egara[] = { "S", "H", "C", "D" }; egara { "S", "H", "C", "D" } "S" "H" "C" "D" int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan String x="0"; x "0" int y=0; y 0 int card; card for (k = 1; k <= n; k++) {
			x = scan.next();
			y = scan.nextInt();
if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			}


		} k = 1; k = 1 k 1 k <= n k n k++ k++ k {
			x = scan.next();
			y = scan.nextInt();
if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			}


		} {
			x = scan.next();
			y = scan.nextInt();
if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			}


		} x = scan.next() x scan.next() scan.next scan y = scan.nextInt() y scan.nextInt() scan.nextInt scan if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			} x.equals(egara[0]) x.equals x egara[0] egara 0 {
	card=0;
	trmp[card][y-1]=9999;
} card=0 card 0 trmp[card][y-1]=9999 trmp[card][y-1] trmp[card] trmp card y-1 y 1 9999 if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			} x.equals(egara[1]) x.equals x egara[1] egara 1 {
	card=1;
	trmp[card][y-1]=9999;
	} card=1 card 1 trmp[card][y-1]=9999 trmp[card][y-1] trmp[card] trmp card y-1 y 1 9999 if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			} x.equals(egara[2]) x.equals x egara[2] egara 2 {
		card=2;
		trmp[card][y-1]=9999;
		} card=2 card 2 trmp[card][y-1]=9999 trmp[card][y-1] trmp[card] trmp card y-1 y 1 9999 {
			card=3;
			trmp[card][y-1]=9999;
			} card=3 card 3 trmp[card][y-1]=9999 trmp[card][y-1] trmp[card] trmp card y-1 y 1 9999 for (j = 0; j < 4; j++) {
			for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			}
		} j = 0; j = 0 j 0 j < 4 j 4 j++ j++ j {
			for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			}
		} {
			for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			}
		} for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			} i = 0; i = 0 i 0 i < 13 i 13 i++ i++ i {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			} {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			} if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				} trmp[j][i]!=9999 trmp[j][i] trmp[j] trmp j i 9999 {

					System.out.println(egara[j] + " " + (i+1));
				} System.out.println(egara[j] + " " + (i+1)) System.out.println System.out System System.out egara[j] + " " + (i+1) egara[j] + " " + (i+1) egara[j] egara j " " (i+1) i 1 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i, j, k;
		int trmp[][];
		trmp = new int[4][13];
		
		String egara[] = { "S", "H", "C", "D" };
		
		int n = scan.nextInt();
		String x="0";
		int y=0;int card;
		for (k = 1; k <= n; k++) {
			x = scan.next();
			y = scan.nextInt();
if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			}


		}
		for (j = 0; j < 4; j++) {
			for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			}
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i, j, k;
		int trmp[][];
		trmp = new int[4][13];
		
		String egara[] = { "S", "H", "C", "D" };
		
		int n = scan.nextInt();
		String x="0";
		int y=0;int card;
		for (k = 1; k <= n; k++) {
			x = scan.next();
			y = scan.nextInt();
if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			}


		}
		for (j = 0; j < 4; j++) {
			for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			}
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int i, j, k;
		int trmp[][];
		trmp = new int[4][13];
		
		String egara[] = { "S", "H", "C", "D" };
		
		int n = scan.nextInt();
		String x="0";
		int y=0;int card;
		for (k = 1; k <= n; k++) {
			x = scan.next();
			y = scan.nextInt();
if(x.equals(egara[0])){
	card=0;
	trmp[card][y-1]=9999;
}else if(x.equals(egara[1])){
	card=1;
	trmp[card][y-1]=9999;
	}else if(x.equals(egara[2])){
		card=2;
		trmp[card][y-1]=9999;
		}else {
			card=3;
			trmp[card][y-1]=9999;
			}


		}
		for (j = 0; j < 4; j++) {
			for (i = 0; i < 13; i++) {

				if (trmp[j][i]!=9999) {

					System.out.println(egara[j] + " " + (i+1));
				}

			}
		}

	}

}