import java.util.*;

public class Main {
	public static void main(String args[]) {
		char design[] = {'S', 'H', 'C', 'D'};
		HashMap<Character, boolean[]> trump = new HashMap<Character, boolean[]>();

		for (char d : design)
			trump.put(d, new boolean[13]);

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			char d = scan.next().charAt(0);
			int r = scan.nextInt();

			trump.get(d)[r-1] = true;
		}

		for (char d : design){
			boolean t[] = trump.get(d);
			for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1));
		}
	}
}
 import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		char design[] = {'S', 'H', 'C', 'D'};
		HashMap<Character, boolean[]> trump = new HashMap<Character, boolean[]>();

		for (char d : design)
			trump.put(d, new boolean[13]);

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			char d = scan.next().charAt(0);
			int r = scan.nextInt();

			trump.get(d)[r-1] = true;
		}

		for (char d : design){
			boolean t[] = trump.get(d);
			for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1));
		}
	}
} Main public static void main(String args[]) {
		char design[] = {'S', 'H', 'C', 'D'};
		HashMap<Character, boolean[]> trump = new HashMap<Character, boolean[]>();

		for (char d : design)
			trump.put(d, new boolean[13]);

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			char d = scan.next().charAt(0);
			int r = scan.nextInt();

			trump.get(d)[r-1] = true;
		}

		for (char d : design){
			boolean t[] = trump.get(d);
			for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1));
		}
	} main {
		char design[] = {'S', 'H', 'C', 'D'};
		HashMap<Character, boolean[]> trump = new HashMap<Character, boolean[]>();

		for (char d : design)
			trump.put(d, new boolean[13]);

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			char d = scan.next().charAt(0);
			int r = scan.nextInt();

			trump.get(d)[r-1] = true;
		}

		for (char d : design){
			boolean t[] = trump.get(d);
			for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1));
		}
	} char design[] = {'S', 'H', 'C', 'D'}; design {'S', 'H', 'C', 'D'} 'S' 'H' 'C' 'D' HashMap<Character, boolean[]> trump = new HashMap<Character, boolean[]>(); trump new HashMap<Character, boolean[]>() for (char d : design)
			trump.put(d, new boolean[13]); char d design trump.put(d, new boolean[13]); trump.put(d, new boolean[13]) trump.put trump d new boolean[13] 13 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan for(int i = 0; i < n; i++){
			char d = scan.next().charAt(0);
			int r = scan.nextInt();

			trump.get(d)[r-1] = true;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			char d = scan.next().charAt(0);
			int r = scan.nextInt();

			trump.get(d)[r-1] = true;
		} {
			char d = scan.next().charAt(0);
			int r = scan.nextInt();

			trump.get(d)[r-1] = true;
		} char d = scan.next().charAt(0); d scan.next().charAt(0) scan.next().charAt scan.next() scan.next scan 0 int r = scan.nextInt(); r scan.nextInt() scan.nextInt scan trump.get(d)[r-1] = true trump.get(d)[r-1] trump.get(d) trump.get trump d r-1 r 1 true for (char d : design){
			boolean t[] = trump.get(d);
			for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1));
		} char d design {
			boolean t[] = trump.get(d);
			for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1));
		} {
			boolean t[] = trump.get(d);
			for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1));
		} boolean t[] = trump.get(d); t trump.get(d) trump.get trump d for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1)); int i = 0; int i = 0; i 0 i < t.length i t.length t t.length i++ i++ i if(!t[i])
					System.out.println(String.format("%c %d", d, i+1)); if(!t[i])
					System.out.println(String.format("%c %d", d, i+1)); !t[i] t[i] t i System.out.println(String.format("%c %d", d, i+1)) System.out.println System.out System System.out String.format("%c %d", d, i+1) String.format String "%c %d" d i+1 i 1 String args[] args public class Main {
	public static void main(String args[]) {
		char design[] = {'S', 'H', 'C', 'D'};
		HashMap<Character, boolean[]> trump = new HashMap<Character, boolean[]>();

		for (char d : design)
			trump.put(d, new boolean[13]);

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			char d = scan.next().charAt(0);
			int r = scan.nextInt();

			trump.get(d)[r-1] = true;
		}

		for (char d : design){
			boolean t[] = trump.get(d);
			for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1));
		}
	}
} public class Main {
	public static void main(String args[]) {
		char design[] = {'S', 'H', 'C', 'D'};
		HashMap<Character, boolean[]> trump = new HashMap<Character, boolean[]>();

		for (char d : design)
			trump.put(d, new boolean[13]);

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			char d = scan.next().charAt(0);
			int r = scan.nextInt();

			trump.get(d)[r-1] = true;
		}

		for (char d : design){
			boolean t[] = trump.get(d);
			for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1));
		}
	}
} Main
import java.util.*;

public class Main {
	public static void main(String args[]) {
		char design[] = {'S', 'H', 'C', 'D'};
		HashMap<Character, boolean[]> trump = new HashMap<Character, boolean[]>();

		for (char d : design)
			trump.put(d, new boolean[13]);

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			char d = scan.next().charAt(0);
			int r = scan.nextInt();

			trump.get(d)[r-1] = true;
		}

		for (char d : design){
			boolean t[] = trump.get(d);
			for (int i = 0; i < t.length; i++)
				if(!t[i])
					System.out.println(String.format("%c %d", d, i+1));
		}
	}
}

