import java.util.*;
class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		boolean[][] cards = new boolean[4][13];
		for (int i=0; i<n; i++) {
			String s = stdIn.next();
			switch (s.charAt(0)) {
				case 'S':cards[0][stdIn.nextInt()-1] = true; break;
				case 'H':cards[1][stdIn.nextInt()-1] = true; break;
				case 'C':cards[2][stdIn.nextInt()-1] = true; break;
				case 'D':cards[3][stdIn.nextInt()-1] = true; break;
			}
		}
		char[] c = {'S','H','C','D'};
		for (int i=0; i<4; i++) {
			for (int j=0; j<13; j++) {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			}
		}
	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		boolean[][] cards = new boolean[4][13];
		for (int i=0; i<n; i++) {
			String s = stdIn.next();
			switch (s.charAt(0)) {
				case 'S':cards[0][stdIn.nextInt()-1] = true; break;
				case 'H':cards[1][stdIn.nextInt()-1] = true; break;
				case 'C':cards[2][stdIn.nextInt()-1] = true; break;
				case 'D':cards[3][stdIn.nextInt()-1] = true; break;
			}
		}
		char[] c = {'S','H','C','D'};
		for (int i=0; i<4; i++) {
			for (int j=0; j<13; j++) {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		boolean[][] cards = new boolean[4][13];
		for (int i=0; i<n; i++) {
			String s = stdIn.next();
			switch (s.charAt(0)) {
				case 'S':cards[0][stdIn.nextInt()-1] = true; break;
				case 'H':cards[1][stdIn.nextInt()-1] = true; break;
				case 'C':cards[2][stdIn.nextInt()-1] = true; break;
				case 'D':cards[3][stdIn.nextInt()-1] = true; break;
			}
		}
		char[] c = {'S','H','C','D'};
		for (int i=0; i<4; i++) {
			for (int j=0; j<13; j++) {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			}
		}
	} main {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		boolean[][] cards = new boolean[4][13];
		for (int i=0; i<n; i++) {
			String s = stdIn.next();
			switch (s.charAt(0)) {
				case 'S':cards[0][stdIn.nextInt()-1] = true; break;
				case 'H':cards[1][stdIn.nextInt()-1] = true; break;
				case 'C':cards[2][stdIn.nextInt()-1] = true; break;
				case 'D':cards[3][stdIn.nextInt()-1] = true; break;
			}
		}
		char[] c = {'S','H','C','D'};
		for (int i=0; i<4; i++) {
			for (int j=0; j<13; j++) {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			}
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn boolean[][] cards = new boolean[4][13]; cards new boolean[4][13] 4 13 for (int i=0; i<n; i++) {
			String s = stdIn.next();
			switch (s.charAt(0)) {
				case 'S':cards[0][stdIn.nextInt()-1] = true; break;
				case 'H':cards[1][stdIn.nextInt()-1] = true; break;
				case 'C':cards[2][stdIn.nextInt()-1] = true; break;
				case 'D':cards[3][stdIn.nextInt()-1] = true; break;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			String s = stdIn.next();
			switch (s.charAt(0)) {
				case 'S':cards[0][stdIn.nextInt()-1] = true; break;
				case 'H':cards[1][stdIn.nextInt()-1] = true; break;
				case 'C':cards[2][stdIn.nextInt()-1] = true; break;
				case 'D':cards[3][stdIn.nextInt()-1] = true; break;
			}
		} {
			String s = stdIn.next();
			switch (s.charAt(0)) {
				case 'S':cards[0][stdIn.nextInt()-1] = true; break;
				case 'H':cards[1][stdIn.nextInt()-1] = true; break;
				case 'C':cards[2][stdIn.nextInt()-1] = true; break;
				case 'D':cards[3][stdIn.nextInt()-1] = true; break;
			}
		} String s = stdIn.next(); s stdIn.next() stdIn.next stdIn switch (s.charAt(0)) {
				case 'S':cards[0][stdIn.nextInt()-1] = true; break;
				case 'H':cards[1][stdIn.nextInt()-1] = true; break;
				case 'C':cards[2][stdIn.nextInt()-1] = true; break;
				case 'D':cards[3][stdIn.nextInt()-1] = true; break;
			} s.charAt(0) s.charAt s 0 case 'S': 'S' case 'S': cards[0][stdIn.nextInt()-1] = true cards[0][stdIn.nextInt()-1] cards[0] cards 0 stdIn.nextInt()-1 stdIn.nextInt() stdIn.nextInt stdIn 1 true break; case 'H': 'H' case 'H': cards[1][stdIn.nextInt()-1] = true cards[1][stdIn.nextInt()-1] cards[1] cards 1 stdIn.nextInt()-1 stdIn.nextInt() stdIn.nextInt stdIn 1 true break; case 'C': 'C' case 'C': cards[2][stdIn.nextInt()-1] = true cards[2][stdIn.nextInt()-1] cards[2] cards 2 stdIn.nextInt()-1 stdIn.nextInt() stdIn.nextInt stdIn 1 true break; case 'D': 'D' case 'D': cards[3][stdIn.nextInt()-1] = true cards[3][stdIn.nextInt()-1] cards[3] cards 3 stdIn.nextInt()-1 stdIn.nextInt() stdIn.nextInt stdIn 1 true break; char[] c = {'S','H','C','D'}; c {'S','H','C','D'} 'S' 'H' 'C' 'D' for (int i=0; i<4; i++) {
			for (int j=0; j<13; j++) {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			}
		} int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
			for (int j=0; j<13; j++) {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			}
		} {
			for (int j=0; j<13; j++) {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			}
		} for (int j=0; j<13; j++) {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			} int j=0; int j=0; j 0 j<13 j 13 j++ j++ j {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			} {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			} if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				} !cards[i][j] cards[i][j] cards[i] cards i j {
					System.out.println(c[i]+" "+(j+1));
				} System.out.println(c[i]+" "+(j+1)) System.out.println System.out System System.out c[i]+" "+(j+1) c[i]+" "+(j+1) c[i] c i " " (j+1) j 1 String[] args args
import java.util.*;
class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		boolean[][] cards = new boolean[4][13];
		for (int i=0; i<n; i++) {
			String s = stdIn.next();
			switch (s.charAt(0)) {
				case 'S':cards[0][stdIn.nextInt()-1] = true; break;
				case 'H':cards[1][stdIn.nextInt()-1] = true; break;
				case 'C':cards[2][stdIn.nextInt()-1] = true; break;
				case 'D':cards[3][stdIn.nextInt()-1] = true; break;
			}
		}
		char[] c = {'S','H','C','D'};
		for (int i=0; i<4; i++) {
			for (int j=0; j<13; j++) {
				if (!cards[i][j]) {
					System.out.println(c[i]+" "+(j+1));
				}
			}
		}
	}
}