import java.util.Scanner;

public class Main {

	public static void main (String[] args) {

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

		int[] s = new int[13];
		int[] h = new int[13];
		int[] c = new int[13];
		int[] d = new int[13];

		for(int i = 0; i < 13; i++) {
			s[i] = 1;
			h[i] = 1;
			c[i] = 1;
			d[i] = 1;
		}

		String[] deleteMark = new String[n];
		int[] deleteRank = new int[n];

		for(int i = 0; i < n; i++) {
			deleteMark[i] = sc.next();
			deleteRank[i] = sc.nextInt();
		}

		for(int i = 0; i < n; i++) {

			switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			}

		}

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

			if(s[i] == 1) System.out.println("S " + (i+1));

		}

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

			if(h[i] == 1) System.out.println("H " + (i+1));

		}

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

			if(c[i] == 1) System.out.println("C " + (i+1));

		}

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

			if(d[i] == 1) System.out.println("D " + (i+1));

		}

	}

}


 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();

		int[] s = new int[13];
		int[] h = new int[13];
		int[] c = new int[13];
		int[] d = new int[13];

		for(int i = 0; i < 13; i++) {
			s[i] = 1;
			h[i] = 1;
			c[i] = 1;
			d[i] = 1;
		}

		String[] deleteMark = new String[n];
		int[] deleteRank = new int[n];

		for(int i = 0; i < n; i++) {
			deleteMark[i] = sc.next();
			deleteRank[i] = sc.nextInt();
		}

		for(int i = 0; i < n; i++) {

			switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			}

		}

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

			if(s[i] == 1) System.out.println("S " + (i+1));

		}

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

			if(h[i] == 1) System.out.println("H " + (i+1));

		}

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

			if(c[i] == 1) System.out.println("C " + (i+1));

		}

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

			if(d[i] == 1) System.out.println("D " + (i+1));

		}

	}

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

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

		int[] s = new int[13];
		int[] h = new int[13];
		int[] c = new int[13];
		int[] d = new int[13];

		for(int i = 0; i < 13; i++) {
			s[i] = 1;
			h[i] = 1;
			c[i] = 1;
			d[i] = 1;
		}

		String[] deleteMark = new String[n];
		int[] deleteRank = new int[n];

		for(int i = 0; i < n; i++) {
			deleteMark[i] = sc.next();
			deleteRank[i] = sc.nextInt();
		}

		for(int i = 0; i < n; i++) {

			switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			}

		}

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

			if(s[i] == 1) System.out.println("S " + (i+1));

		}

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

			if(h[i] == 1) System.out.println("H " + (i+1));

		}

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

			if(c[i] == 1) System.out.println("C " + (i+1));

		}

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

			if(d[i] == 1) System.out.println("D " + (i+1));

		}

	} main {

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

		int[] s = new int[13];
		int[] h = new int[13];
		int[] c = new int[13];
		int[] d = new int[13];

		for(int i = 0; i < 13; i++) {
			s[i] = 1;
			h[i] = 1;
			c[i] = 1;
			d[i] = 1;
		}

		String[] deleteMark = new String[n];
		int[] deleteRank = new int[n];

		for(int i = 0; i < n; i++) {
			deleteMark[i] = sc.next();
			deleteRank[i] = sc.nextInt();
		}

		for(int i = 0; i < n; i++) {

			switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			}

		}

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

			if(s[i] == 1) System.out.println("S " + (i+1));

		}

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

			if(h[i] == 1) System.out.println("H " + (i+1));

		}

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

			if(c[i] == 1) System.out.println("C " + (i+1));

		}

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

			if(d[i] == 1) System.out.println("D " + (i+1));

		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] s = new int[13]; s new int[13] 13 int[] h = new int[13]; h new int[13] 13 int[] c = new int[13]; c new int[13] 13 int[] d = new int[13]; d new int[13] 13 for(int i = 0; i < 13; i++) {
			s[i] = 1;
			h[i] = 1;
			c[i] = 1;
			d[i] = 1;
		} int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
			s[i] = 1;
			h[i] = 1;
			c[i] = 1;
			d[i] = 1;
		} {
			s[i] = 1;
			h[i] = 1;
			c[i] = 1;
			d[i] = 1;
		} s[i] = 1 s[i] s i 1 h[i] = 1 h[i] h i 1 c[i] = 1 c[i] c i 1 d[i] = 1 d[i] d i 1 String[] deleteMark = new String[n]; deleteMark new String[n] n int[] deleteRank = new int[n]; deleteRank new int[n] n for(int i = 0; i < n; i++) {
			deleteMark[i] = sc.next();
			deleteRank[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			deleteMark[i] = sc.next();
			deleteRank[i] = sc.nextInt();
		} {
			deleteMark[i] = sc.next();
			deleteRank[i] = sc.nextInt();
		} deleteMark[i] = sc.next() deleteMark[i] deleteMark i sc.next() sc.next sc deleteRank[i] = sc.nextInt() deleteRank[i] deleteRank i sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i++) {

			switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			}

		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {

			switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			}

		} {

			switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			}

		} switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			} deleteMark[i] deleteMark i case ("S"): ("S") case ("S"): s[deleteRank[i]-1] = 0 s[deleteRank[i]-1] s deleteRank[i]-1 deleteRank[i] deleteRank i 1 0 break; case ("H"): ("H") case ("H"): h[deleteRank[i]-1] = 0 h[deleteRank[i]-1] h deleteRank[i]-1 deleteRank[i] deleteRank i 1 0 break; case ("C"): ("C") case ("C"): c[deleteRank[i]-1] = 0 c[deleteRank[i]-1] c deleteRank[i]-1 deleteRank[i] deleteRank i 1 0 break; case ("D"): ("D") case ("D"): d[deleteRank[i]-1] = 0 d[deleteRank[i]-1] d deleteRank[i]-1 deleteRank[i] deleteRank i 1 0 break; for(int i = 0; i < 13; i++) {

			if(s[i] == 1) System.out.println("S " + (i+1));

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

			if(s[i] == 1) System.out.println("S " + (i+1));

		} {

			if(s[i] == 1) System.out.println("S " + (i+1));

		} if(s[i] == 1) System.out.println("S " + (i+1)); s[i] == 1 s[i] s i 1 System.out.println("S " + (i+1)) System.out.println System.out System System.out "S " + (i+1) "S " (i+1) i 1 for(int i = 0; i < 13; i++) {

			if(h[i] == 1) System.out.println("H " + (i+1));

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

			if(h[i] == 1) System.out.println("H " + (i+1));

		} {

			if(h[i] == 1) System.out.println("H " + (i+1));

		} if(h[i] == 1) System.out.println("H " + (i+1)); h[i] == 1 h[i] h i 1 System.out.println("H " + (i+1)) System.out.println System.out System System.out "H " + (i+1) "H " (i+1) i 1 for(int i = 0; i < 13; i++) {

			if(c[i] == 1) System.out.println("C " + (i+1));

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

			if(c[i] == 1) System.out.println("C " + (i+1));

		} {

			if(c[i] == 1) System.out.println("C " + (i+1));

		} if(c[i] == 1) System.out.println("C " + (i+1)); c[i] == 1 c[i] c i 1 System.out.println("C " + (i+1)) System.out.println System.out System System.out "C " + (i+1) "C " (i+1) i 1 for(int i = 0; i < 13; i++) {

			if(d[i] == 1) System.out.println("D " + (i+1));

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

			if(d[i] == 1) System.out.println("D " + (i+1));

		} {

			if(d[i] == 1) System.out.println("D " + (i+1));

		} if(d[i] == 1) System.out.println("D " + (i+1)); d[i] == 1 d[i] d i 1 System.out.println("D " + (i+1)) System.out.println System.out System System.out "D " + (i+1) "D " (i+1) i 1 String[] args args public class Main {

	public static void main (String[] args) {

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

		int[] s = new int[13];
		int[] h = new int[13];
		int[] c = new int[13];
		int[] d = new int[13];

		for(int i = 0; i < 13; i++) {
			s[i] = 1;
			h[i] = 1;
			c[i] = 1;
			d[i] = 1;
		}

		String[] deleteMark = new String[n];
		int[] deleteRank = new int[n];

		for(int i = 0; i < n; i++) {
			deleteMark[i] = sc.next();
			deleteRank[i] = sc.nextInt();
		}

		for(int i = 0; i < n; i++) {

			switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			}

		}

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

			if(s[i] == 1) System.out.println("S " + (i+1));

		}

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

			if(h[i] == 1) System.out.println("H " + (i+1));

		}

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

			if(c[i] == 1) System.out.println("C " + (i+1));

		}

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

			if(d[i] == 1) System.out.println("D " + (i+1));

		}

	}

} public class Main {

	public static void main (String[] args) {

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

		int[] s = new int[13];
		int[] h = new int[13];
		int[] c = new int[13];
		int[] d = new int[13];

		for(int i = 0; i < 13; i++) {
			s[i] = 1;
			h[i] = 1;
			c[i] = 1;
			d[i] = 1;
		}

		String[] deleteMark = new String[n];
		int[] deleteRank = new int[n];

		for(int i = 0; i < n; i++) {
			deleteMark[i] = sc.next();
			deleteRank[i] = sc.nextInt();
		}

		for(int i = 0; i < n; i++) {

			switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			}

		}

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

			if(s[i] == 1) System.out.println("S " + (i+1));

		}

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

			if(h[i] == 1) System.out.println("H " + (i+1));

		}

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

			if(c[i] == 1) System.out.println("C " + (i+1));

		}

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

			if(d[i] == 1) System.out.println("D " + (i+1));

		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main (String[] args) {

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

		int[] s = new int[13];
		int[] h = new int[13];
		int[] c = new int[13];
		int[] d = new int[13];

		for(int i = 0; i < 13; i++) {
			s[i] = 1;
			h[i] = 1;
			c[i] = 1;
			d[i] = 1;
		}

		String[] deleteMark = new String[n];
		int[] deleteRank = new int[n];

		for(int i = 0; i < n; i++) {
			deleteMark[i] = sc.next();
			deleteRank[i] = sc.nextInt();
		}

		for(int i = 0; i < n; i++) {

			switch (deleteMark[i]) {

			case ("S"):
				s[deleteRank[i]-1] = 0;
			break;

			case ("H"):
				h[deleteRank[i]-1] = 0;
			break;

			case ("C"):
				c[deleteRank[i]-1] = 0;
			break;

			case ("D"):
				d[deleteRank[i]-1] = 0;
			break;

			}

		}

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

			if(s[i] == 1) System.out.println("S " + (i+1));

		}

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

			if(h[i] == 1) System.out.println("H " + (i+1));

		}

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

			if(c[i] == 1) System.out.println("C " + (i+1));

		}

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

			if(d[i] == 1) System.out.println("D " + (i+1));

		}

	}

}



