import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		// 出力用(カードの種類ごとに用意)
		StringBuilder output_s = new StringBuilder();
		StringBuilder output_h = new StringBuilder();
		StringBuilder output_c = new StringBuilder();
		StringBuilder output_d = new StringBuilder();
		// 種類ごとに全部の数字を配列で用意
		int[] spades = new int[13];
		int[] hearts = new int[13];
		int[] clubs = new int[13];
		int[] diamonds = new int[13];
		
		// 初期化
		for (int i = 0; i < 13; i++) {
			spades[i] = i + 1;
			hearts[i] = i + 1;
			clubs[i] = i + 1;
			diamonds[i] = i + 1;
		}
		
		int amount = scan.nextInt();
		String mark;
		int number;
		// 持っているカードのところを0で上書き
		for (int j = 0; j < amount; j++) {
			mark = scan.next();
			number = scan.nextInt();
			if ("S".equals(mark)) {
				spades[number - 1] = 0;
			}
			if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			}
			if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			}
			if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			}
		}
		
		// 0ではない要素(足りてないカード)を出力用のやつにくっつける
		for (int i = 0; i < 13; i++) {
			if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			}
			if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			}
			if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			}
			if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			}
		}
		
		// 出力
		System.out.print(output_s);
		System.out.print(output_h);
		System.out.print(output_c);
		System.out.print(output_d);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		// 出力用(カードの種類ごとに用意)
		StringBuilder output_s = new StringBuilder();
		StringBuilder output_h = new StringBuilder();
		StringBuilder output_c = new StringBuilder();
		StringBuilder output_d = new StringBuilder();
		// 種類ごとに全部の数字を配列で用意
		int[] spades = new int[13];
		int[] hearts = new int[13];
		int[] clubs = new int[13];
		int[] diamonds = new int[13];
		
		// 初期化
		for (int i = 0; i < 13; i++) {
			spades[i] = i + 1;
			hearts[i] = i + 1;
			clubs[i] = i + 1;
			diamonds[i] = i + 1;
		}
		
		int amount = scan.nextInt();
		String mark;
		int number;
		// 持っているカードのところを0で上書き
		for (int j = 0; j < amount; j++) {
			mark = scan.next();
			number = scan.nextInt();
			if ("S".equals(mark)) {
				spades[number - 1] = 0;
			}
			if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			}
			if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			}
			if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			}
		}
		
		// 0ではない要素(足りてないカード)を出力用のやつにくっつける
		for (int i = 0; i < 13; i++) {
			if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			}
			if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			}
			if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			}
			if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			}
		}
		
		// 出力
		System.out.print(output_s);
		System.out.print(output_h);
		System.out.print(output_c);
		System.out.print(output_d);
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		// 出力用(カードの種類ごとに用意)
		StringBuilder output_s = new StringBuilder();
		StringBuilder output_h = new StringBuilder();
		StringBuilder output_c = new StringBuilder();
		StringBuilder output_d = new StringBuilder();
		// 種類ごとに全部の数字を配列で用意
		int[] spades = new int[13];
		int[] hearts = new int[13];
		int[] clubs = new int[13];
		int[] diamonds = new int[13];
		
		// 初期化
		for (int i = 0; i < 13; i++) {
			spades[i] = i + 1;
			hearts[i] = i + 1;
			clubs[i] = i + 1;
			diamonds[i] = i + 1;
		}
		
		int amount = scan.nextInt();
		String mark;
		int number;
		// 持っているカードのところを0で上書き
		for (int j = 0; j < amount; j++) {
			mark = scan.next();
			number = scan.nextInt();
			if ("S".equals(mark)) {
				spades[number - 1] = 0;
			}
			if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			}
			if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			}
			if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			}
		}
		
		// 0ではない要素(足りてないカード)を出力用のやつにくっつける
		for (int i = 0; i < 13; i++) {
			if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			}
			if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			}
			if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			}
			if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			}
		}
		
		// 出力
		System.out.print(output_s);
		System.out.print(output_h);
		System.out.print(output_c);
		System.out.print(output_d);
	} main {
		Scanner scan = new Scanner(System.in);
		// 出力用(カードの種類ごとに用意)
		StringBuilder output_s = new StringBuilder();
		StringBuilder output_h = new StringBuilder();
		StringBuilder output_c = new StringBuilder();
		StringBuilder output_d = new StringBuilder();
		// 種類ごとに全部の数字を配列で用意
		int[] spades = new int[13];
		int[] hearts = new int[13];
		int[] clubs = new int[13];
		int[] diamonds = new int[13];
		
		// 初期化
		for (int i = 0; i < 13; i++) {
			spades[i] = i + 1;
			hearts[i] = i + 1;
			clubs[i] = i + 1;
			diamonds[i] = i + 1;
		}
		
		int amount = scan.nextInt();
		String mark;
		int number;
		// 持っているカードのところを0で上書き
		for (int j = 0; j < amount; j++) {
			mark = scan.next();
			number = scan.nextInt();
			if ("S".equals(mark)) {
				spades[number - 1] = 0;
			}
			if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			}
			if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			}
			if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			}
		}
		
		// 0ではない要素(足りてないカード)を出力用のやつにくっつける
		for (int i = 0; i < 13; i++) {
			if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			}
			if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			}
			if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			}
			if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			}
		}
		
		// 出力
		System.out.print(output_s);
		System.out.print(output_h);
		System.out.print(output_c);
		System.out.print(output_d);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) StringBuilder output_s = new StringBuilder(); output_s new StringBuilder() StringBuilder output_h = new StringBuilder(); output_h new StringBuilder() StringBuilder output_c = new StringBuilder(); output_c new StringBuilder() StringBuilder output_d = new StringBuilder(); output_d new StringBuilder() int[] spades = new int[13]; spades new int[13] 13 int[] hearts = new int[13]; hearts new int[13] 13 int[] clubs = new int[13]; clubs new int[13] 13 int[] diamonds = new int[13]; diamonds new int[13] 13 for (int i = 0; i < 13; i++) {
			spades[i] = i + 1;
			hearts[i] = i + 1;
			clubs[i] = i + 1;
			diamonds[i] = i + 1;
		} int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
			spades[i] = i + 1;
			hearts[i] = i + 1;
			clubs[i] = i + 1;
			diamonds[i] = i + 1;
		} {
			spades[i] = i + 1;
			hearts[i] = i + 1;
			clubs[i] = i + 1;
			diamonds[i] = i + 1;
		} spades[i] = i + 1 spades[i] spades i i + 1 i 1 hearts[i] = i + 1 hearts[i] hearts i i + 1 i 1 clubs[i] = i + 1 clubs[i] clubs i i + 1 i 1 diamonds[i] = i + 1 diamonds[i] diamonds i i + 1 i 1 int amount = scan.nextInt(); amount scan.nextInt() scan.nextInt scan String mark; mark int number; number for (int j = 0; j < amount; j++) {
			mark = scan.next();
			number = scan.nextInt();
			if ("S".equals(mark)) {
				spades[number - 1] = 0;
			}
			if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			}
			if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			}
			if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			}
		} int j = 0; int j = 0; j 0 j < amount j amount j++ j++ j {
			mark = scan.next();
			number = scan.nextInt();
			if ("S".equals(mark)) {
				spades[number - 1] = 0;
			}
			if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			}
			if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			}
			if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			}
		} {
			mark = scan.next();
			number = scan.nextInt();
			if ("S".equals(mark)) {
				spades[number - 1] = 0;
			}
			if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			}
			if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			}
			if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			}
		} mark = scan.next() mark scan.next() scan.next scan number = scan.nextInt() number scan.nextInt() scan.nextInt scan if ("S".equals(mark)) {
				spades[number - 1] = 0;
			} "S".equals(mark) "S".equals "S" mark {
				spades[number - 1] = 0;
			} spades[number - 1] = 0 spades[number - 1] spades number - 1 number 1 0 if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			} "H".equals(mark) "H".equals "H" mark {
				hearts[number - 1] = 0;
			} hearts[number - 1] = 0 hearts[number - 1] hearts number - 1 number 1 0 if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			} "C".equals(mark) "C".equals "C" mark {
				clubs[number - 1] = 0;
			} clubs[number - 1] = 0 clubs[number - 1] clubs number - 1 number 1 0 if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			} "D".equals(mark) "D".equals "D" mark {
				diamonds[number - 1] = 0;
			} diamonds[number - 1] = 0 diamonds[number - 1] diamonds number - 1 number 1 0 for (int i = 0; i < 13; i++) {
			if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			}
			if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			}
			if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			}
			if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			}
		} int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
			if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			}
			if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			}
			if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			}
			if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			}
		} {
			if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			}
			if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			}
			if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			}
			if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			}
		} if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			} spades[i] != 0 spades[i] spades i 0 {
				output_s.append("S" + " " + (i + 1)).append('\n');
			} output_s.append("S" + " " + (i + 1)).append('\n') output_s.append("S" + " " + (i + 1)).append output_s.append("S" + " " + (i + 1)) output_s.append output_s "S" + " " + (i + 1) "S" + " " + (i + 1) "S" " " (i + 1) i 1 '\n' if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			} hearts[i] != 0 hearts[i] hearts i 0 {
				output_h.append("H" + " " + (i + 1)).append('\n');
			} output_h.append("H" + " " + (i + 1)).append('\n') output_h.append("H" + " " + (i + 1)).append output_h.append("H" + " " + (i + 1)) output_h.append output_h "H" + " " + (i + 1) "H" + " " + (i + 1) "H" " " (i + 1) i 1 '\n' if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			} clubs[i] != 0 clubs[i] clubs i 0 {
				output_c.append("C" + " " + (i + 1)).append('\n');
			} output_c.append("C" + " " + (i + 1)).append('\n') output_c.append("C" + " " + (i + 1)).append output_c.append("C" + " " + (i + 1)) output_c.append output_c "C" + " " + (i + 1) "C" + " " + (i + 1) "C" " " (i + 1) i 1 '\n' if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			} diamonds[i] != 0 diamonds[i] diamonds i 0 {
				output_d.append("D" + " " + (i + 1)).append('\n');
			} output_d.append("D" + " " + (i + 1)).append('\n') output_d.append("D" + " " + (i + 1)).append output_d.append("D" + " " + (i + 1)) output_d.append output_d "D" + " " + (i + 1) "D" + " " + (i + 1) "D" " " (i + 1) i 1 '\n' System.out.print(output_s) System.out.print System.out System System.out output_s System.out.print(output_h) System.out.print System.out System System.out output_h System.out.print(output_c) System.out.print System.out System System.out output_c System.out.print(output_d) System.out.print System.out System System.out output_d String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		// 出力用(カードの種類ごとに用意)
		StringBuilder output_s = new StringBuilder();
		StringBuilder output_h = new StringBuilder();
		StringBuilder output_c = new StringBuilder();
		StringBuilder output_d = new StringBuilder();
		// 種類ごとに全部の数字を配列で用意
		int[] spades = new int[13];
		int[] hearts = new int[13];
		int[] clubs = new int[13];
		int[] diamonds = new int[13];
		
		// 初期化
		for (int i = 0; i < 13; i++) {
			spades[i] = i + 1;
			hearts[i] = i + 1;
			clubs[i] = i + 1;
			diamonds[i] = i + 1;
		}
		
		int amount = scan.nextInt();
		String mark;
		int number;
		// 持っているカードのところを0で上書き
		for (int j = 0; j < amount; j++) {
			mark = scan.next();
			number = scan.nextInt();
			if ("S".equals(mark)) {
				spades[number - 1] = 0;
			}
			if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			}
			if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			}
			if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			}
		}
		
		// 0ではない要素(足りてないカード)を出力用のやつにくっつける
		for (int i = 0; i < 13; i++) {
			if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			}
			if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			}
			if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			}
			if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			}
		}
		
		// 出力
		System.out.print(output_s);
		System.out.print(output_h);
		System.out.print(output_c);
		System.out.print(output_d);
	}

} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		// 出力用(カードの種類ごとに用意)
		StringBuilder output_s = new StringBuilder();
		StringBuilder output_h = new StringBuilder();
		StringBuilder output_c = new StringBuilder();
		StringBuilder output_d = new StringBuilder();
		// 種類ごとに全部の数字を配列で用意
		int[] spades = new int[13];
		int[] hearts = new int[13];
		int[] clubs = new int[13];
		int[] diamonds = new int[13];
		
		// 初期化
		for (int i = 0; i < 13; i++) {
			spades[i] = i + 1;
			hearts[i] = i + 1;
			clubs[i] = i + 1;
			diamonds[i] = i + 1;
		}
		
		int amount = scan.nextInt();
		String mark;
		int number;
		// 持っているカードのところを0で上書き
		for (int j = 0; j < amount; j++) {
			mark = scan.next();
			number = scan.nextInt();
			if ("S".equals(mark)) {
				spades[number - 1] = 0;
			}
			if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			}
			if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			}
			if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			}
		}
		
		// 0ではない要素(足りてないカード)を出力用のやつにくっつける
		for (int i = 0; i < 13; i++) {
			if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			}
			if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			}
			if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			}
			if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			}
		}
		
		// 出力
		System.out.print(output_s);
		System.out.print(output_h);
		System.out.print(output_c);
		System.out.print(output_d);
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		// 出力用(カードの種類ごとに用意)
		StringBuilder output_s = new StringBuilder();
		StringBuilder output_h = new StringBuilder();
		StringBuilder output_c = new StringBuilder();
		StringBuilder output_d = new StringBuilder();
		// 種類ごとに全部の数字を配列で用意
		int[] spades = new int[13];
		int[] hearts = new int[13];
		int[] clubs = new int[13];
		int[] diamonds = new int[13];
		
		// 初期化
		for (int i = 0; i < 13; i++) {
			spades[i] = i + 1;
			hearts[i] = i + 1;
			clubs[i] = i + 1;
			diamonds[i] = i + 1;
		}
		
		int amount = scan.nextInt();
		String mark;
		int number;
		// 持っているカードのところを0で上書き
		for (int j = 0; j < amount; j++) {
			mark = scan.next();
			number = scan.nextInt();
			if ("S".equals(mark)) {
				spades[number - 1] = 0;
			}
			if ("H".equals(mark)) {
				hearts[number - 1] = 0;
			}
			if ("C".equals(mark)) {
				clubs[number - 1] = 0;
			}
			if ("D".equals(mark)) {
				diamonds[number - 1] = 0;
			}
		}
		
		// 0ではない要素(足りてないカード)を出力用のやつにくっつける
		for (int i = 0; i < 13; i++) {
			if (spades[i] != 0) {
				output_s.append("S" + " " + (i + 1)).append('\n');
			}
			if (hearts[i] != 0) {
				output_h.append("H" + " " + (i + 1)).append('\n');
			}
			if (clubs[i] != 0) {
				output_c.append("C" + " " + (i + 1)).append('\n');
			}
			if (diamonds[i] != 0) {
				output_d.append("D" + " " + (i + 1)).append('\n');
			}
		}
		
		// 出力
		System.out.print(output_s);
		System.out.print(output_h);
		System.out.print(output_c);
		System.out.print(output_d);
	}

}