import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        boolean[][] l = new boolean[4][13];
        char[] card = new char[] {'S', 'H', 'C', 'D'};

        for(int i = 0; i < a; i++) {
        	char cardType = sc.next().charAt(0);
        	int cardNum = sc.nextInt();

        	switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	}
        }

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

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

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	}
        }
	}
}
 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        boolean[][] l = new boolean[4][13];
        char[] card = new char[] {'S', 'H', 'C', 'D'};

        for(int i = 0; i < a; i++) {
        	char cardType = sc.next().charAt(0);
        	int cardNum = sc.nextInt();

        	switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	}
        }

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

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

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	}
        }
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        boolean[][] l = new boolean[4][13];
        char[] card = new char[] {'S', 'H', 'C', 'D'};

        for(int i = 0; i < a; i++) {
        	char cardType = sc.next().charAt(0);
        	int cardNum = sc.nextInt();

        	switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	}
        }

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

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

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	}
        }
	} main {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        boolean[][] l = new boolean[4][13];
        char[] card = new char[] {'S', 'H', 'C', 'D'};

        for(int i = 0; i < a; i++) {
        	char cardType = sc.next().charAt(0);
        	int cardNum = sc.nextInt();

        	switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	}
        }

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

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

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	}
        }
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc boolean[][] l = new boolean[4][13]; l new boolean[4][13] 4 13 char[] card = new char[] {'S', 'H', 'C', 'D'}; card new char[] {'S', 'H', 'C', 'D'} for(int i = 0; i < a; i++) {
        	char cardType = sc.next().charAt(0);
        	int cardNum = sc.nextInt();

        	switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	}
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
        	char cardType = sc.next().charAt(0);
        	int cardNum = sc.nextInt();

        	switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	}
        } {
        	char cardType = sc.next().charAt(0);
        	int cardNum = sc.nextInt();

        	switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	}
        } char cardType = sc.next().charAt(0); cardType sc.next().charAt(0) sc.next().charAt sc.next() sc.next sc 0 int cardNum = sc.nextInt(); cardNum sc.nextInt() sc.nextInt sc switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	} cardType case 'S': 'S' case 'S': l[0][cardNum-1] = true l[0][cardNum-1] l[0] l 0 cardNum-1 cardNum 1 true break; case 'H': 'H' case 'H': l[1][cardNum-1] = true l[1][cardNum-1] l[1] l 1 cardNum-1 cardNum 1 true break; case 'C': 'C' case 'C': l[2][cardNum-1] = true l[2][cardNum-1] l[2] l 2 cardNum-1 cardNum 1 true break; case 'D': 'D' case 'D': l[3][cardNum-1] = true l[3][cardNum-1] l[3] l 3 cardNum-1 cardNum 1 true break; for(int i = 0; i < 4; i++) {

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

        		if(!l[i][j]) {
        			System.out.println(card[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(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	}
        } {

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

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	}
        } for(int j = 0; j < 13; j++) {

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	} {

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	} if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		} !l[i][j] l[i][j] l[i] l i j {
        			System.out.println(card[i] + " " + (j+1));
        		} System.out.println(card[i] + " " + (j+1)) System.out.println System.out System System.out card[i] + " " + (j+1) card[i] + " " + (j+1) card[i] card i " " (j+1) j 1 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        boolean[][] l = new boolean[4][13];
        char[] card = new char[] {'S', 'H', 'C', 'D'};

        for(int i = 0; i < a; i++) {
        	char cardType = sc.next().charAt(0);
        	int cardNum = sc.nextInt();

        	switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	}
        }

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

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

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	}
        }
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        boolean[][] l = new boolean[4][13];
        char[] card = new char[] {'S', 'H', 'C', 'D'};

        for(int i = 0; i < a; i++) {
        	char cardType = sc.next().charAt(0);
        	int cardNum = sc.nextInt();

        	switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	}
        }

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

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

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	}
        }
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        boolean[][] l = new boolean[4][13];
        char[] card = new char[] {'S', 'H', 'C', 'D'};

        for(int i = 0; i < a; i++) {
        	char cardType = sc.next().charAt(0);
        	int cardNum = sc.nextInt();

        	switch(cardType) {
        	case 'S':
        		l[0][cardNum-1] = true;
        		break;
        	case 'H':
        		l[1][cardNum-1] = true;
        		break;
        	case 'C':
        		l[2][cardNum-1] = true;
        		break;
        	case 'D':
        		l[3][cardNum-1] = true;
        		break;
        	}
        }

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

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

        		if(!l[i][j]) {
        			System.out.println(card[i] + " " + (j+1));
        		}
        	}
        }
	}
}

