import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		// 所持しているカードの入力

		ArrayList<HashMap<String, String>> existCards = new ArrayList<>();

		for(int i=0; i<n; i++) {
			HashMap<String, String> card = new HashMap<>();
			card.put("mark", sc.next());
			card.put("rank", sc.next());
			existCards.add(card);
		}

		sc.close();

		// 抜けているカードを割り出す
		ArrayList<HashMap<String, String>> notExistsCards = new ArrayList<>();

		// １つづつカードを調べる
		String marks[] = {"S", "H", "C", "D"};
		for(String mark : marks) {
			for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			}
		}

		// 出力
		for(HashMap<String, String> card : notExistsCards) {
			System.out.print(card.get("mark") + " " + card.get("rank") + "\n");
		}

	}

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		// 所持しているカードの入力

		ArrayList<HashMap<String, String>> existCards = new ArrayList<>();

		for(int i=0; i<n; i++) {
			HashMap<String, String> card = new HashMap<>();
			card.put("mark", sc.next());
			card.put("rank", sc.next());
			existCards.add(card);
		}

		sc.close();

		// 抜けているカードを割り出す
		ArrayList<HashMap<String, String>> notExistsCards = new ArrayList<>();

		// １つづつカードを調べる
		String marks[] = {"S", "H", "C", "D"};
		for(String mark : marks) {
			for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			}
		}

		// 出力
		for(HashMap<String, String> card : notExistsCards) {
			System.out.print(card.get("mark") + " " + card.get("rank") + "\n");
		}

	}

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

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		// 所持しているカードの入力

		ArrayList<HashMap<String, String>> existCards = new ArrayList<>();

		for(int i=0; i<n; i++) {
			HashMap<String, String> card = new HashMap<>();
			card.put("mark", sc.next());
			card.put("rank", sc.next());
			existCards.add(card);
		}

		sc.close();

		// 抜けているカードを割り出す
		ArrayList<HashMap<String, String>> notExistsCards = new ArrayList<>();

		// １つづつカードを調べる
		String marks[] = {"S", "H", "C", "D"};
		for(String mark : marks) {
			for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			}
		}

		// 出力
		for(HashMap<String, String> card : notExistsCards) {
			System.out.print(card.get("mark") + " " + card.get("rank") + "\n");
		}

	} main {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		// 所持しているカードの入力

		ArrayList<HashMap<String, String>> existCards = new ArrayList<>();

		for(int i=0; i<n; i++) {
			HashMap<String, String> card = new HashMap<>();
			card.put("mark", sc.next());
			card.put("rank", sc.next());
			existCards.add(card);
		}

		sc.close();

		// 抜けているカードを割り出す
		ArrayList<HashMap<String, String>> notExistsCards = new ArrayList<>();

		// １つづつカードを調べる
		String marks[] = {"S", "H", "C", "D"};
		for(String mark : marks) {
			for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			}
		}

		// 出力
		for(HashMap<String, String> card : notExistsCards) {
			System.out.print(card.get("mark") + " " + card.get("rank") + "\n");
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc ArrayList<HashMap<String, String>> existCards = new ArrayList<>(); existCards new ArrayList<>() for(int i=0; i<n; i++) {
			HashMap<String, String> card = new HashMap<>();
			card.put("mark", sc.next());
			card.put("rank", sc.next());
			existCards.add(card);
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			HashMap<String, String> card = new HashMap<>();
			card.put("mark", sc.next());
			card.put("rank", sc.next());
			existCards.add(card);
		} {
			HashMap<String, String> card = new HashMap<>();
			card.put("mark", sc.next());
			card.put("rank", sc.next());
			existCards.add(card);
		} HashMap<String, String> card = new HashMap<>(); card new HashMap<>() card.put("mark", sc.next()) card.put card "mark" sc.next() sc.next sc card.put("rank", sc.next()) card.put card "rank" sc.next() sc.next sc existCards.add(card) existCards.add existCards card sc.close() sc.close sc ArrayList<HashMap<String, String>> notExistsCards = new ArrayList<>(); notExistsCards new ArrayList<>() String marks[] = {"S", "H", "C", "D"}; marks {"S", "H", "C", "D"} "S" "H" "C" "D" for(String mark : marks) {
			for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			}
		} String mark marks {
			for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			}
		} {
			for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			}
		} for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			} {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			} HashMap<String, String> checkCard = new HashMap<>(); checkCard new HashMap<>() checkCard.put("mark", mark) checkCard.put checkCard "mark" mark checkCard.put("rank", String.valueOf(i)) checkCard.put checkCard "rank" String.valueOf(i) String.valueOf String i if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				} existCards.indexOf(checkCard) == -1 existCards.indexOf(checkCard) existCards.indexOf existCards checkCard -1 1 {
					notExistsCards.add(checkCard);
				} notExistsCards.add(checkCard) notExistsCards.add notExistsCards checkCard for(HashMap<String, String> card : notExistsCards) {
			System.out.print(card.get("mark") + " " + card.get("rank") + "\n");
		} HashMap<String, String> card notExistsCards {
			System.out.print(card.get("mark") + " " + card.get("rank") + "\n");
		} {
			System.out.print(card.get("mark") + " " + card.get("rank") + "\n");
		} System.out.print(card.get("mark") + " " + card.get("rank") + "\n") System.out.print System.out System System.out card.get("mark") + " " + card.get("rank") + "\n" card.get("rank") card.get("mark") + " " + card.get("rank") + "\n" card.get("mark") card.get card "mark" " " card.get("rank") card.get card "rank" "\n" String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		// 所持しているカードの入力

		ArrayList<HashMap<String, String>> existCards = new ArrayList<>();

		for(int i=0; i<n; i++) {
			HashMap<String, String> card = new HashMap<>();
			card.put("mark", sc.next());
			card.put("rank", sc.next());
			existCards.add(card);
		}

		sc.close();

		// 抜けているカードを割り出す
		ArrayList<HashMap<String, String>> notExistsCards = new ArrayList<>();

		// １つづつカードを調べる
		String marks[] = {"S", "H", "C", "D"};
		for(String mark : marks) {
			for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			}
		}

		// 出力
		for(HashMap<String, String> card : notExistsCards) {
			System.out.print(card.get("mark") + " " + card.get("rank") + "\n");
		}

	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		// 所持しているカードの入力

		ArrayList<HashMap<String, String>> existCards = new ArrayList<>();

		for(int i=0; i<n; i++) {
			HashMap<String, String> card = new HashMap<>();
			card.put("mark", sc.next());
			card.put("rank", sc.next());
			existCards.add(card);
		}

		sc.close();

		// 抜けているカードを割り出す
		ArrayList<HashMap<String, String>> notExistsCards = new ArrayList<>();

		// １つづつカードを調べる
		String marks[] = {"S", "H", "C", "D"};
		for(String mark : marks) {
			for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			}
		}

		// 出力
		for(HashMap<String, String> card : notExistsCards) {
			System.out.print(card.get("mark") + " " + card.get("rank") + "\n");
		}

	}

} Main
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		// 所持しているカードの入力

		ArrayList<HashMap<String, String>> existCards = new ArrayList<>();

		for(int i=0; i<n; i++) {
			HashMap<String, String> card = new HashMap<>();
			card.put("mark", sc.next());
			card.put("rank", sc.next());
			existCards.add(card);
		}

		sc.close();

		// 抜けているカードを割り出す
		ArrayList<HashMap<String, String>> notExistsCards = new ArrayList<>();

		// １つづつカードを調べる
		String marks[] = {"S", "H", "C", "D"};
		for(String mark : marks) {
			for(int i=1; i<=13; i++) {
				HashMap<String, String> checkCard = new HashMap<>();
				checkCard.put("mark", mark);
				checkCard.put("rank", String.valueOf(i));
				if(existCards.indexOf(checkCard) == -1) {
					notExistsCards.add(checkCard);
				}
			}
		}

		// 出力
		for(HashMap<String, String> card : notExistsCards) {
			System.out.print(card.get("mark") + " " + card.get("rank") + "\n");
		}

	}

}
