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

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.parseInt(br.readLine());
		String[] cards = new String[52];
		Boolean[] flags = new Boolean[52];

		String[] suit = {"S","H","C","D"};

		for(int i=0 ; i<suit.length; i++) {
			for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			}
		}

		for(int j = 0; j<N; j++){
			String set = br.readLine();
			for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			}
		}

		for(int l=0 ; l<cards.length; l++) {
			if(!flags[l]){
				System.out.println(cards[l]);
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.parseInt(br.readLine());
		String[] cards = new String[52];
		Boolean[] flags = new Boolean[52];

		String[] suit = {"S","H","C","D"};

		for(int i=0 ; i<suit.length; i++) {
			for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			}
		}

		for(int j = 0; j<N; j++){
			String set = br.readLine();
			for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			}
		}

		for(int l=0 ; l<cards.length; l++) {
			if(!flags[l]){
				System.out.println(cards[l]);
			}
		}
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.parseInt(br.readLine());
		String[] cards = new String[52];
		Boolean[] flags = new Boolean[52];

		String[] suit = {"S","H","C","D"};

		for(int i=0 ; i<suit.length; i++) {
			for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			}
		}

		for(int j = 0; j<N; j++){
			String set = br.readLine();
			for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			}
		}

		for(int l=0 ; l<cards.length; l++) {
			if(!flags[l]){
				System.out.println(cards[l]);
			}
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.parseInt(br.readLine());
		String[] cards = new String[52];
		Boolean[] flags = new Boolean[52];

		String[] suit = {"S","H","C","D"};

		for(int i=0 ; i<suit.length; i++) {
			for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			}
		}

		for(int j = 0; j<N; j++){
			String set = br.readLine();
			for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			}
		}

		for(int l=0 ; l<cards.length; l++) {
			if(!flags[l]){
				System.out.println(cards[l]);
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int N = Integer.parseInt(br.readLine()); N Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] cards = new String[52]; cards new String[52] 52 Boolean[] flags = new Boolean[52]; flags new Boolean[52] 52 String[] suit = {"S","H","C","D"}; suit {"S","H","C","D"} "S" "H" "C" "D" for(int i=0 ; i<suit.length; i++) {
			for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			}
		} int i=0 ; int i=0 ; i 0 i<suit.length i suit.length suit suit.length i++ i++ i {
			for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			}
		} {
			for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			}
		} for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			} int num=1; int num=1; num 1 num<=13 num 13 num++ num++ num {
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			} {
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			} cards[i*13 + num-1] = suit[i] + " " + num cards[i*13 + num-1] cards i*13 + num-1 i*13 + num i*13 i 13 num 1 suit[i] + " " + num suit[i] + " " + num suit[i] suit i " " num flags[i*13 + num-1] = false flags[i*13 + num-1] flags i*13 + num-1 i*13 + num i*13 i 13 num 1 false for(int j = 0; j<N; j++){
			String set = br.readLine();
			for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			}
		} int j = 0; int j = 0; j 0 j<N j N j++ j++ j {
			String set = br.readLine();
			for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			}
		} {
			String set = br.readLine();
			for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			}
		} String set = br.readLine(); set br.readLine() br.readLine br for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			} int k = 0; int k = 0; k 0 k<cards.length k cards.length cards cards.length k++ k++ k {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			} {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			} if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				} set.equals(cards[k]) set.equals set cards[k] cards k {
						flags[k] = true;
						break;
				} flags[k] = true flags[k] flags k true break; for(int l=0 ; l<cards.length; l++) {
			if(!flags[l]){
				System.out.println(cards[l]);
			}
		} int l=0 ; int l=0 ; l 0 l<cards.length l cards.length cards cards.length l++ l++ l {
			if(!flags[l]){
				System.out.println(cards[l]);
			}
		} {
			if(!flags[l]){
				System.out.println(cards[l]);
			}
		} if(!flags[l]){
				System.out.println(cards[l]);
			} !flags[l] flags[l] flags l {
				System.out.println(cards[l]);
			} System.out.println(cards[l]) System.out.println System.out System System.out cards[l] cards l String[] args args public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.parseInt(br.readLine());
		String[] cards = new String[52];
		Boolean[] flags = new Boolean[52];

		String[] suit = {"S","H","C","D"};

		for(int i=0 ; i<suit.length; i++) {
			for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			}
		}

		for(int j = 0; j<N; j++){
			String set = br.readLine();
			for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			}
		}

		for(int l=0 ; l<cards.length; l++) {
			if(!flags[l]){
				System.out.println(cards[l]);
			}
		}
	}
} public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.parseInt(br.readLine());
		String[] cards = new String[52];
		Boolean[] flags = new Boolean[52];

		String[] suit = {"S","H","C","D"};

		for(int i=0 ; i<suit.length; i++) {
			for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			}
		}

		for(int j = 0; j<N; j++){
			String set = br.readLine();
			for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			}
		}

		for(int l=0 ; l<cards.length; l++) {
			if(!flags[l]){
				System.out.println(cards[l]);
			}
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.parseInt(br.readLine());
		String[] cards = new String[52];
		Boolean[] flags = new Boolean[52];

		String[] suit = {"S","H","C","D"};

		for(int i=0 ; i<suit.length; i++) {
			for (int num=1; num<=13; num++){
				cards[i*13 + num-1] = suit[i] + " " + num;
				flags[i*13 + num-1] = false;
			}
		}

		for(int j = 0; j<N; j++){
			String set = br.readLine();
			for(int k = 0; k<cards.length; k++) {
				if(set.equals(cards[k])) {
						flags[k] = true;
						break;
				}
			}
		}

		for(int l=0 ; l<cards.length; l++) {
			if(!flags[l]){
				System.out.println(cards[l]);
			}
		}
	}
}