import java.util.Scanner;

public class Main {
	private static Scanner sc=new Scanner(System.in);
	private static boolean[][] cards=new boolean[4][13];
	private static int n;
	public static void main (String[] args){
		n=sc.nextInt();
		setAllCardsExist();
		printMissingCards();
	}
	private static void setAllCardsExist(){
		for(int i=0;i<n;i++){
			setCardExist();
		}
	}
	private static void setCardExist(){
		char shape=sc.next().charAt(0);
		int num=sc.nextInt();
		switch(shape){
		case 'S':
			cards[0][num-1]=true;
			break;
		case 'H':
			cards[1][num-1]=true;
			break;
		case 'C':
			cards[2][num-1]=true;
			break;
		case 'D':
			cards[3][num-1]=true;
			break;
		}
	}
	private static void printMissingCards(){
		for(int i=0;i<4;i++){
			for(int j=0;j<13;j++){
				printMissingCard(i,j);
			}
		}
	}
	private static void printMissingCard(int i,int j){
		if(cards[i][j]==false) System.out.println(getShape(i)+" "+(j+1));
	}
	private static char getShape(int i){
		switch(i){
		case 0:
			return 'S';
		case 1:
			return 'H';
		case 2:
			return 'C';
		case 3:
			return 'D';
		default:
			return ' ';
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner sc=new Scanner(System.in);
	private static boolean[][] cards=new boolean[4][13];
	private static int n;
	public static void main (String[] args){
		n=sc.nextInt();
		setAllCardsExist();
		printMissingCards();
	}
	private static void setAllCardsExist(){
		for(int i=0;i<n;i++){
			setCardExist();
		}
	}
	private static void setCardExist(){
		char shape=sc.next().charAt(0);
		int num=sc.nextInt();
		switch(shape){
		case 'S':
			cards[0][num-1]=true;
			break;
		case 'H':
			cards[1][num-1]=true;
			break;
		case 'C':
			cards[2][num-1]=true;
			break;
		case 'D':
			cards[3][num-1]=true;
			break;
		}
	}
	private static void printMissingCards(){
		for(int i=0;i<4;i++){
			for(int j=0;j<13;j++){
				printMissingCard(i,j);
			}
		}
	}
	private static void printMissingCard(int i,int j){
		if(cards[i][j]==false) System.out.println(getShape(i)+" "+(j+1));
	}
	private static char getShape(int i){
		switch(i){
		case 0:
			return 'S';
		case 1:
			return 'H';
		case 2:
			return 'C';
		case 3:
			return 'D';
		default:
			return ' ';
		}
	}
} Main private static Scanner sc=new Scanner(System.in); sc new Scanner(System.in) private static boolean[][] cards=new boolean[4][13]; cards new boolean[4][13] 4 13 private static int n; n public static void main (String[] args){
		n=sc.nextInt();
		setAllCardsExist();
		printMissingCards();
	} main {
		n=sc.nextInt();
		setAllCardsExist();
		printMissingCards();
	} n=sc.nextInt() n sc.nextInt() sc.nextInt sc setAllCardsExist() setAllCardsExist printMissingCards() printMissingCards String[] args args private static void setAllCardsExist(){
		for(int i=0;i<n;i++){
			setCardExist();
		}
	} setAllCardsExist {
		for(int i=0;i<n;i++){
			setCardExist();
		}
	} for(int i=0;i<n;i++){
			setCardExist();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			setCardExist();
		} {
			setCardExist();
		} setCardExist() setCardExist private static void setCardExist(){
		char shape=sc.next().charAt(0);
		int num=sc.nextInt();
		switch(shape){
		case 'S':
			cards[0][num-1]=true;
			break;
		case 'H':
			cards[1][num-1]=true;
			break;
		case 'C':
			cards[2][num-1]=true;
			break;
		case 'D':
			cards[3][num-1]=true;
			break;
		}
	} setCardExist {
		char shape=sc.next().charAt(0);
		int num=sc.nextInt();
		switch(shape){
		case 'S':
			cards[0][num-1]=true;
			break;
		case 'H':
			cards[1][num-1]=true;
			break;
		case 'C':
			cards[2][num-1]=true;
			break;
		case 'D':
			cards[3][num-1]=true;
			break;
		}
	} char shape=sc.next().charAt(0); shape sc.next().charAt(0) sc.next().charAt sc.next() sc.next sc 0 int num=sc.nextInt(); num sc.nextInt() sc.nextInt sc switch(shape){
		case 'S':
			cards[0][num-1]=true;
			break;
		case 'H':
			cards[1][num-1]=true;
			break;
		case 'C':
			cards[2][num-1]=true;
			break;
		case 'D':
			cards[3][num-1]=true;
			break;
		} shape case 'S': 'S' case 'S': cards[0][num-1]=true cards[0][num-1] cards[0] cards 0 num-1 num 1 true break; case 'H': 'H' case 'H': cards[1][num-1]=true cards[1][num-1] cards[1] cards 1 num-1 num 1 true break; case 'C': 'C' case 'C': cards[2][num-1]=true cards[2][num-1] cards[2] cards 2 num-1 num 1 true break; case 'D': 'D' case 'D': cards[3][num-1]=true cards[3][num-1] cards[3] cards 3 num-1 num 1 true break; private static void printMissingCards(){
		for(int i=0;i<4;i++){
			for(int j=0;j<13;j++){
				printMissingCard(i,j);
			}
		}
	} printMissingCards {
		for(int i=0;i<4;i++){
			for(int j=0;j<13;j++){
				printMissingCard(i,j);
			}
		}
	} for(int i=0;i<4;i++){
			for(int j=0;j<13;j++){
				printMissingCard(i,j);
			}
		} int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
			for(int j=0;j<13;j++){
				printMissingCard(i,j);
			}
		} {
			for(int j=0;j<13;j++){
				printMissingCard(i,j);
			}
		} for(int j=0;j<13;j++){
				printMissingCard(i,j);
			} int j=0; int j=0; j 0 j<13 j 13 j++ j++ j {
				printMissingCard(i,j);
			} {
				printMissingCard(i,j);
			} printMissingCard(i,j) printMissingCard i j private static void printMissingCard(int i,int j){
		if(cards[i][j]==false) System.out.println(getShape(i)+" "+(j+1));
	} printMissingCard {
		if(cards[i][j]==false) System.out.println(getShape(i)+" "+(j+1));
	} if(cards[i][j]==false) System.out.println(getShape(i)+" "+(j+1)); cards[i][j]==false cards[i][j] cards[i] cards i j false System.out.println(getShape(i)+" "+(j+1)) System.out.println System.out System System.out getShape(i)+" "+(j+1) getShape(i)+" "+(j+1) getShape(i) getShape i " " (j+1) j 1 int i i int j j private static char getShape(int i){
		switch(i){
		case 0:
			return 'S';
		case 1:
			return 'H';
		case 2:
			return 'C';
		case 3:
			return 'D';
		default:
			return ' ';
		}
	} getShape {
		switch(i){
		case 0:
			return 'S';
		case 1:
			return 'H';
		case 2:
			return 'C';
		case 3:
			return 'D';
		default:
			return ' ';
		}
	} switch(i){
		case 0:
			return 'S';
		case 1:
			return 'H';
		case 2:
			return 'C';
		case 3:
			return 'D';
		default:
			return ' ';
		} i case 0: 0 case 0: return 'S'; 'S' case 1: 1 case 1: return 'H'; 'H' case 2: 2 case 2: return 'C'; 'C' case 3: 3 case 3: return 'D'; 'D' default: default: return ' '; ' ' int i i public class Main {
	private static Scanner sc=new Scanner(System.in);
	private static boolean[][] cards=new boolean[4][13];
	private static int n;
	public static void main (String[] args){
		n=sc.nextInt();
		setAllCardsExist();
		printMissingCards();
	}
	private static void setAllCardsExist(){
		for(int i=0;i<n;i++){
			setCardExist();
		}
	}
	private static void setCardExist(){
		char shape=sc.next().charAt(0);
		int num=sc.nextInt();
		switch(shape){
		case 'S':
			cards[0][num-1]=true;
			break;
		case 'H':
			cards[1][num-1]=true;
			break;
		case 'C':
			cards[2][num-1]=true;
			break;
		case 'D':
			cards[3][num-1]=true;
			break;
		}
	}
	private static void printMissingCards(){
		for(int i=0;i<4;i++){
			for(int j=0;j<13;j++){
				printMissingCard(i,j);
			}
		}
	}
	private static void printMissingCard(int i,int j){
		if(cards[i][j]==false) System.out.println(getShape(i)+" "+(j+1));
	}
	private static char getShape(int i){
		switch(i){
		case 0:
			return 'S';
		case 1:
			return 'H';
		case 2:
			return 'C';
		case 3:
			return 'D';
		default:
			return ' ';
		}
	}
} public class Main {
	private static Scanner sc=new Scanner(System.in);
	private static boolean[][] cards=new boolean[4][13];
	private static int n;
	public static void main (String[] args){
		n=sc.nextInt();
		setAllCardsExist();
		printMissingCards();
	}
	private static void setAllCardsExist(){
		for(int i=0;i<n;i++){
			setCardExist();
		}
	}
	private static void setCardExist(){
		char shape=sc.next().charAt(0);
		int num=sc.nextInt();
		switch(shape){
		case 'S':
			cards[0][num-1]=true;
			break;
		case 'H':
			cards[1][num-1]=true;
			break;
		case 'C':
			cards[2][num-1]=true;
			break;
		case 'D':
			cards[3][num-1]=true;
			break;
		}
	}
	private static void printMissingCards(){
		for(int i=0;i<4;i++){
			for(int j=0;j<13;j++){
				printMissingCard(i,j);
			}
		}
	}
	private static void printMissingCard(int i,int j){
		if(cards[i][j]==false) System.out.println(getShape(i)+" "+(j+1));
	}
	private static char getShape(int i){
		switch(i){
		case 0:
			return 'S';
		case 1:
			return 'H';
		case 2:
			return 'C';
		case 3:
			return 'D';
		default:
			return ' ';
		}
	}
} Main
import java.util.Scanner;

public class Main {
	private static Scanner sc=new Scanner(System.in);
	private static boolean[][] cards=new boolean[4][13];
	private static int n;
	public static void main (String[] args){
		n=sc.nextInt();
		setAllCardsExist();
		printMissingCards();
	}
	private static void setAllCardsExist(){
		for(int i=0;i<n;i++){
			setCardExist();
		}
	}
	private static void setCardExist(){
		char shape=sc.next().charAt(0);
		int num=sc.nextInt();
		switch(shape){
		case 'S':
			cards[0][num-1]=true;
			break;
		case 'H':
			cards[1][num-1]=true;
			break;
		case 'C':
			cards[2][num-1]=true;
			break;
		case 'D':
			cards[3][num-1]=true;
			break;
		}
	}
	private static void printMissingCards(){
		for(int i=0;i<4;i++){
			for(int j=0;j<13;j++){
				printMissingCard(i,j);
			}
		}
	}
	private static void printMissingCard(int i,int j){
		if(cards[i][j]==false) System.out.println(getShape(i)+" "+(j+1));
	}
	private static char getShape(int i){
		switch(i){
		case 0:
			return 'S';
		case 1:
			return 'H';
		case 2:
			return 'C';
		case 3:
			return 'D';
		default:
			return ' ';
		}
	}
}