import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * ??¢?´¢?????????
 *
 * @author B7078
 *
 */
class Trump {
	public void trump(int n) throws IOException{
		String str;
		int ret;
		String g[] = new String[2];
		boolean trump[][] = new boolean[4][13];
		BufferedReader trum = new BufferedReader(new InputStreamReader(System.in));
		/**
		 * ??\????????????true or false??????????????¨?????¶????¨???¶
		 */
		if(n == 0){
			for (int p = 0; p < 4; ++p) {
				for (int k = 0; k < 13; ++k) {
					if (trump[p][k] == false) {
						if (p == 0) { //S??????
							System.out.println("S" + " " + (k+1));
						} else if (p == 1) { //H??????
							System.out.println("H" + " " + (k+1));
						} else if (p == 2) { //C??????
							System.out.println("C" + " " + (k+1));
						} else if (p == 3) { //D??????
							System.out.println("D" + " " + (k+1));
						}
					}
				}
			}
			}
		else if(n == 52){
			System.out.println("");
		}
		else{
		for (int i = 0; i < n; ++i) { // ?????????????????°(count)????????°?????????
			str = trum.readLine();
			g = str.split(" ");
			ret = Integer.parseInt(g[1])-1;

			if(g[0].equals("S")){
				trump[0][ret] = true;
			}
			else if(g[0].equals("H")){
				trump[1][ret] = true;
			}
			else if(g[0].equals("C")){
				trump[2][ret] = true;
			}
			else if(g[0].equals("D")){
				trump[3][ret] = true;
			}
		}
		/**
		 * ???????????¶?????????false(?¬??????????????????????)???????????????
		 */

		for (int p = 0; p < 4; ++p) {
			for (int k = 0; k < 13; ++k) {
				if (trump[p][k] == false) {
					if (p == 0) { //S??????
						System.out.println("S" + " " + (k+1));
					} else if (p == 1) { //H??????
						System.out.println("H" + " " + (k+1));
					} else if (p == 2) { //C??????
						System.out.println("C" + " " + (k+1));
					} else if (p == 3) { //D??????
						System.out.println("D" + " " + (k+1));
					}
				}
			}
		}
	}
	}
}

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		/**
		 *
		 */
		Trump trump1 = new Trump();
		/**
		 * ?????°?????£?¨?
		 */
		int n = 0;
		/**
		 * n(??????????????°)?????\???
		 */
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		n = Integer.parseInt(br.readLine()); // n<=52 (0:S 1:H 2:C 3:D)
		/**
		 * ??????????????????????????¨??????
		 */
		if(n<=52){
		trump1.trump(n);
		}
	}

}