import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

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

		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		// ??¨???????????£????????????????????????????????????
		List<String> all = new ArrayList<String>();
		for (char c : "SHCD".toCharArray()) {
			for (int i = 1; i <= 13; i++) {
				all.add(String.format("%c %d", c, i));
			}
		}
		
		// ?????£???????????????????????????????????????
		int count = sc.nextInt();
		sc.nextLine();
		for (int i = 0; i < count; i++) {
			all.remove(sc.nextLine());
		}
		
		// ?????£??????????????????
		for (String s : all) {
			System.out.println(s);
		}
	}
}