import java.util.Scanner;

class Main{
	public static void main(String[] args){
		boolean[] numH= new boolean[13];
		boolean[] numS= new boolean[13];
		boolean[] numC= new boolean[13];
		boolean[] numD= new boolean[13];
		for(int i=0;i<13;i++){
			numH[i]=true;
			numS[i]=true;
			numC[i]=true;
			numD[i]=true;
		}
		Scanner sc = new Scanner(System.in);
		int n=Integer.parseInt(sc.nextLine());

		for(int j=0;j<n;j++){
			String[] input = sc.nextLine().split(" ");
			int i=Integer.parseInt(input[1])-1;
			if(input[0].equals("H")){
				numH[i]=false;
			}else if(input[0].equals("S")){
				numS[i]=false;
			}else if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			}
		}
		for(int i=0;i<13;i++){
			if(numS[i]){
				System.out.println("S "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numH[i]){
				System.out.println("H "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numC[i]){
				System.out.println("C "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numD[i]){
				System.out.println("D "+(i+1));
			}
		}
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args){
		boolean[] numH= new boolean[13];
		boolean[] numS= new boolean[13];
		boolean[] numC= new boolean[13];
		boolean[] numD= new boolean[13];
		for(int i=0;i<13;i++){
			numH[i]=true;
			numS[i]=true;
			numC[i]=true;
			numD[i]=true;
		}
		Scanner sc = new Scanner(System.in);
		int n=Integer.parseInt(sc.nextLine());

		for(int j=0;j<n;j++){
			String[] input = sc.nextLine().split(" ");
			int i=Integer.parseInt(input[1])-1;
			if(input[0].equals("H")){
				numH[i]=false;
			}else if(input[0].equals("S")){
				numS[i]=false;
			}else if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			}
		}
		for(int i=0;i<13;i++){
			if(numS[i]){
				System.out.println("S "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numH[i]){
				System.out.println("H "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numC[i]){
				System.out.println("C "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numD[i]){
				System.out.println("D "+(i+1));
			}
		}
	}
} Main public static void main(String[] args){
		boolean[] numH= new boolean[13];
		boolean[] numS= new boolean[13];
		boolean[] numC= new boolean[13];
		boolean[] numD= new boolean[13];
		for(int i=0;i<13;i++){
			numH[i]=true;
			numS[i]=true;
			numC[i]=true;
			numD[i]=true;
		}
		Scanner sc = new Scanner(System.in);
		int n=Integer.parseInt(sc.nextLine());

		for(int j=0;j<n;j++){
			String[] input = sc.nextLine().split(" ");
			int i=Integer.parseInt(input[1])-1;
			if(input[0].equals("H")){
				numH[i]=false;
			}else if(input[0].equals("S")){
				numS[i]=false;
			}else if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			}
		}
		for(int i=0;i<13;i++){
			if(numS[i]){
				System.out.println("S "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numH[i]){
				System.out.println("H "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numC[i]){
				System.out.println("C "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numD[i]){
				System.out.println("D "+(i+1));
			}
		}
	} main {
		boolean[] numH= new boolean[13];
		boolean[] numS= new boolean[13];
		boolean[] numC= new boolean[13];
		boolean[] numD= new boolean[13];
		for(int i=0;i<13;i++){
			numH[i]=true;
			numS[i]=true;
			numC[i]=true;
			numD[i]=true;
		}
		Scanner sc = new Scanner(System.in);
		int n=Integer.parseInt(sc.nextLine());

		for(int j=0;j<n;j++){
			String[] input = sc.nextLine().split(" ");
			int i=Integer.parseInt(input[1])-1;
			if(input[0].equals("H")){
				numH[i]=false;
			}else if(input[0].equals("S")){
				numS[i]=false;
			}else if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			}
		}
		for(int i=0;i<13;i++){
			if(numS[i]){
				System.out.println("S "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numH[i]){
				System.out.println("H "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numC[i]){
				System.out.println("C "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numD[i]){
				System.out.println("D "+(i+1));
			}
		}
	} boolean[] numH= new boolean[13]; numH new boolean[13] 13 boolean[] numS= new boolean[13]; numS new boolean[13] 13 boolean[] numC= new boolean[13]; numC new boolean[13] 13 boolean[] numD= new boolean[13]; numD new boolean[13] 13 for(int i=0;i<13;i++){
			numH[i]=true;
			numS[i]=true;
			numC[i]=true;
			numD[i]=true;
		} int i=0; int i=0; i 0 i<13 i 13 i++ i++ i {
			numH[i]=true;
			numS[i]=true;
			numC[i]=true;
			numD[i]=true;
		} {
			numH[i]=true;
			numS[i]=true;
			numC[i]=true;
			numD[i]=true;
		} numH[i]=true numH[i] numH i true numS[i]=true numS[i] numS i true numC[i]=true numC[i] numC i true numD[i]=true numD[i] numD i true Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc for(int j=0;j<n;j++){
			String[] input = sc.nextLine().split(" ");
			int i=Integer.parseInt(input[1])-1;
			if(input[0].equals("H")){
				numH[i]=false;
			}else if(input[0].equals("S")){
				numS[i]=false;
			}else if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			}
		} int j=0; int j=0; j 0 j<n j n j++ j++ j {
			String[] input = sc.nextLine().split(" ");
			int i=Integer.parseInt(input[1])-1;
			if(input[0].equals("H")){
				numH[i]=false;
			}else if(input[0].equals("S")){
				numS[i]=false;
			}else if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			}
		} {
			String[] input = sc.nextLine().split(" ");
			int i=Integer.parseInt(input[1])-1;
			if(input[0].equals("H")){
				numH[i]=false;
			}else if(input[0].equals("S")){
				numS[i]=false;
			}else if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			}
		} String[] input = sc.nextLine().split(" "); input sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int i=Integer.parseInt(input[1])-1; i Integer.parseInt(input[1])-1 Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 1 if(input[0].equals("H")){
				numH[i]=false;
			}else if(input[0].equals("S")){
				numS[i]=false;
			}else if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			} input[0].equals("H") input[0].equals input[0] input 0 "H" {
				numH[i]=false;
			} numH[i]=false numH[i] numH i false if(input[0].equals("S")){
				numS[i]=false;
			}else if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			} input[0].equals("S") input[0].equals input[0] input 0 "S" {
				numS[i]=false;
			} numS[i]=false numS[i] numS i false if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			} input[0].equals("C") input[0].equals input[0] input 0 "C" {
				numC[i]=false;
			} numC[i]=false numC[i] numC i false if(input[0].equals("D")){
				numD[i]=false;
			} input[0].equals("D") input[0].equals input[0] input 0 "D" {
				numD[i]=false;
			} numD[i]=false numD[i] numD i false for(int i=0;i<13;i++){
			if(numS[i]){
				System.out.println("S "+(i+1));
			}
		} int i=0; int i=0; i 0 i<13 i 13 i++ i++ i {
			if(numS[i]){
				System.out.println("S "+(i+1));
			}
		} {
			if(numS[i]){
				System.out.println("S "+(i+1));
			}
		} if(numS[i]){
				System.out.println("S "+(i+1));
			} numS[i] numS i {
				System.out.println("S "+(i+1));
			} System.out.println("S "+(i+1)) System.out.println System.out System System.out "S "+(i+1) "S " (i+1) i 1 for(int i=0;i<13;i++){
			if(numH[i]){
				System.out.println("H "+(i+1));
			}
		} int i=0; int i=0; i 0 i<13 i 13 i++ i++ i {
			if(numH[i]){
				System.out.println("H "+(i+1));
			}
		} {
			if(numH[i]){
				System.out.println("H "+(i+1));
			}
		} if(numH[i]){
				System.out.println("H "+(i+1));
			} numH[i] numH i {
				System.out.println("H "+(i+1));
			} System.out.println("H "+(i+1)) System.out.println System.out System System.out "H "+(i+1) "H " (i+1) i 1 for(int i=0;i<13;i++){
			if(numC[i]){
				System.out.println("C "+(i+1));
			}
		} int i=0; int i=0; i 0 i<13 i 13 i++ i++ i {
			if(numC[i]){
				System.out.println("C "+(i+1));
			}
		} {
			if(numC[i]){
				System.out.println("C "+(i+1));
			}
		} if(numC[i]){
				System.out.println("C "+(i+1));
			} numC[i] numC i {
				System.out.println("C "+(i+1));
			} System.out.println("C "+(i+1)) System.out.println System.out System System.out "C "+(i+1) "C " (i+1) i 1 for(int i=0;i<13;i++){
			if(numD[i]){
				System.out.println("D "+(i+1));
			}
		} int i=0; int i=0; i 0 i<13 i 13 i++ i++ i {
			if(numD[i]){
				System.out.println("D "+(i+1));
			}
		} {
			if(numD[i]){
				System.out.println("D "+(i+1));
			}
		} if(numD[i]){
				System.out.println("D "+(i+1));
			} numD[i] numD i {
				System.out.println("D "+(i+1));
			} System.out.println("D "+(i+1)) System.out.println System.out System System.out "D "+(i+1) "D " (i+1) i 1 String[] args args
import java.util.Scanner;

class Main{
	public static void main(String[] args){
		boolean[] numH= new boolean[13];
		boolean[] numS= new boolean[13];
		boolean[] numC= new boolean[13];
		boolean[] numD= new boolean[13];
		for(int i=0;i<13;i++){
			numH[i]=true;
			numS[i]=true;
			numC[i]=true;
			numD[i]=true;
		}
		Scanner sc = new Scanner(System.in);
		int n=Integer.parseInt(sc.nextLine());

		for(int j=0;j<n;j++){
			String[] input = sc.nextLine().split(" ");
			int i=Integer.parseInt(input[1])-1;
			if(input[0].equals("H")){
				numH[i]=false;
			}else if(input[0].equals("S")){
				numS[i]=false;
			}else if(input[0].equals("C")){
				numC[i]=false;
			}else if(input[0].equals("D")){
				numD[i]=false;
			}
		}
		for(int i=0;i<13;i++){
			if(numS[i]){
				System.out.println("S "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numH[i]){
				System.out.println("H "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numC[i]){
				System.out.println("C "+(i+1));
			}
		}
		for(int i=0;i<13;i++){
			if(numD[i]){
				System.out.println("D "+(i+1));
			}
		}
	}
}