import java.util.Scanner;
public class Main {


//参照する山札


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int d = 0;
	int a = sc.nextInt();//行
	int card[][]= {{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13}};
	int j=0;
while(d<a){
	String m = sc.next();//マーク
	int b = sc.nextInt();//数字

	//行分
			if(m.equals("S")){
				card[0][b-1]=0;
			}

			if(m.equals("H")){
				card[1][b-1]=0;
			}

			if(m.equals("C")){
				card[2][b-1]=0;
			}

			if(m.equals("D")){
				card[3][b-1]=0;
			}
			d++;
	}
	while(j<3){
		for(int k =0;k<13;k++){
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		}
	
		
	  }
	}

}
 import java.util.Scanner; Scanner java.util public class Main {


//参照する山札


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int d = 0;
	int a = sc.nextInt();//行
	int card[][]= {{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13}};
	int j=0;
while(d<a){
	String m = sc.next();//マーク
	int b = sc.nextInt();//数字

	//行分
			if(m.equals("S")){
				card[0][b-1]=0;
			}

			if(m.equals("H")){
				card[1][b-1]=0;
			}

			if(m.equals("C")){
				card[2][b-1]=0;
			}

			if(m.equals("D")){
				card[3][b-1]=0;
			}
			d++;
	}
	while(j<3){
		for(int k =0;k<13;k++){
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		}
	
		
	  }
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int d = 0;
	int a = sc.nextInt();//行
	int card[][]= {{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13}};
	int j=0;
while(d<a){
	String m = sc.next();//マーク
	int b = sc.nextInt();//数字

	//行分
			if(m.equals("S")){
				card[0][b-1]=0;
			}

			if(m.equals("H")){
				card[1][b-1]=0;
			}

			if(m.equals("C")){
				card[2][b-1]=0;
			}

			if(m.equals("D")){
				card[3][b-1]=0;
			}
			d++;
	}
	while(j<3){
		for(int k =0;k<13;k++){
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		}
	
		
	  }
	} main {
		Scanner sc = new Scanner(System.in);
		int d = 0;
	int a = sc.nextInt();//行
	int card[][]= {{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13}};
	int j=0;
while(d<a){
	String m = sc.next();//マーク
	int b = sc.nextInt();//数字

	//行分
			if(m.equals("S")){
				card[0][b-1]=0;
			}

			if(m.equals("H")){
				card[1][b-1]=0;
			}

			if(m.equals("C")){
				card[2][b-1]=0;
			}

			if(m.equals("D")){
				card[3][b-1]=0;
			}
			d++;
	}
	while(j<3){
		for(int k =0;k<13;k++){
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		}
	
		
	  }
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int d = 0; d 0 int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int card[][]= {{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13}}; card {{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13}} {1,2,3,4,5,6,7,8,9,10,11,12,13} 1 2 3 4 5 6 7 8 9 10 11 12 13 {1,2,3,4,5,6,7,8,9,10,11,12,13} 1 2 3 4 5 6 7 8 9 10 11 12 13 {1,2,3,4,5,6,7,8,9,10,11,12,13} 1 2 3 4 5 6 7 8 9 10 11 12 13 {1,2,3,4,5,6,7,8,9,10,11,12,13} 1 2 3 4 5 6 7 8 9 10 11 12 13 int j=0; j 0 while(d<a){
	String m = sc.next();//マーク
	int b = sc.nextInt();//数字

	//行分
			if(m.equals("S")){
				card[0][b-1]=0;
			}

			if(m.equals("H")){
				card[1][b-1]=0;
			}

			if(m.equals("C")){
				card[2][b-1]=0;
			}

			if(m.equals("D")){
				card[3][b-1]=0;
			}
			d++;
	} d<a d a {
	String m = sc.next();//マーク
	int b = sc.nextInt();//数字

	//行分
			if(m.equals("S")){
				card[0][b-1]=0;
			}

			if(m.equals("H")){
				card[1][b-1]=0;
			}

			if(m.equals("C")){
				card[2][b-1]=0;
			}

			if(m.equals("D")){
				card[3][b-1]=0;
			}
			d++;
	} String m = sc.next(); m sc.next() sc.next sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc if(m.equals("S")){
				card[0][b-1]=0;
			} m.equals("S") m.equals m "S" {
				card[0][b-1]=0;
			} card[0][b-1]=0 card[0][b-1] card[0] card 0 b-1 b 1 0 if(m.equals("H")){
				card[1][b-1]=0;
			} m.equals("H") m.equals m "H" {
				card[1][b-1]=0;
			} card[1][b-1]=0 card[1][b-1] card[1] card 1 b-1 b 1 0 if(m.equals("C")){
				card[2][b-1]=0;
			} m.equals("C") m.equals m "C" {
				card[2][b-1]=0;
			} card[2][b-1]=0 card[2][b-1] card[2] card 2 b-1 b 1 0 if(m.equals("D")){
				card[3][b-1]=0;
			} m.equals("D") m.equals m "D" {
				card[3][b-1]=0;
			} card[3][b-1]=0 card[3][b-1] card[3] card 3 b-1 b 1 0 d++ d while(j<3){
		for(int k =0;k<13;k++){
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		}
	
		
	  } j<3 j 3 {
		for(int k =0;k<13;k++){
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		}
	
		
	  } for(int k =0;k<13;k++){
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		} int k =0; int k =0; k 0 k<13 k 13 k++ k++ k {
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		} {
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		} if(card[0][k]!=0)
			System.out.println("S "+card[j][k]); card[0][k]!=0 card[0][k] card[0] card 0 k 0 System.out.println("S "+card[j][k]) System.out.println System.out System System.out "S "+card[j][k] "S " card[j][k] card[j] card j k j=j+1 j j+1 j 1 for(int k =0;k<13;k++){
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		} int k =0; int k =0; k 0 k<13 k 13 k++ k++ k {
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		} {
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		} if(card[1][k]!=0)
			System.out.println("H "+card[j][k]); card[1][k]!=0 card[1][k] card[1] card 1 k 0 System.out.println("H "+card[j][k]) System.out.println System.out System System.out "H "+card[j][k] "H " card[j][k] card[j] card j k j=j+1 j j+1 j 1 for(int k =0;k<13;k++){
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		} int k =0; int k =0; k 0 k<13 k 13 k++ k++ k {
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		} {
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		} if(card[2][k]!=0)
			System.out.println("C "+card[j][k]); card[2][k]!=0 card[2][k] card[2] card 2 k 0 System.out.println("C "+card[j][k]) System.out.println System.out System System.out "C "+card[j][k] "C " card[j][k] card[j] card j k j=j+1 j j+1 j 1 for(int k =0;k<13;k++){
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		} int k =0; int k =0; k 0 k<13 k 13 k++ k++ k {
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		} {
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		} if(card[3][k]!=0)
			System.out.println("D "+card[j][k]); card[3][k]!=0 card[3][k] card[3] card 3 k 0 System.out.println("D "+card[j][k]) System.out.println System.out System System.out "D "+card[j][k] "D " card[j][k] card[j] card j k String[] args args public class Main {


//参照する山札


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int d = 0;
	int a = sc.nextInt();//行
	int card[][]= {{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13}};
	int j=0;
while(d<a){
	String m = sc.next();//マーク
	int b = sc.nextInt();//数字

	//行分
			if(m.equals("S")){
				card[0][b-1]=0;
			}

			if(m.equals("H")){
				card[1][b-1]=0;
			}

			if(m.equals("C")){
				card[2][b-1]=0;
			}

			if(m.equals("D")){
				card[3][b-1]=0;
			}
			d++;
	}
	while(j<3){
		for(int k =0;k<13;k++){
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		}
	
		
	  }
	}

} public class Main {


//参照する山札


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int d = 0;
	int a = sc.nextInt();//行
	int card[][]= {{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13}};
	int j=0;
while(d<a){
	String m = sc.next();//マーク
	int b = sc.nextInt();//数字

	//行分
			if(m.equals("S")){
				card[0][b-1]=0;
			}

			if(m.equals("H")){
				card[1][b-1]=0;
			}

			if(m.equals("C")){
				card[2][b-1]=0;
			}

			if(m.equals("D")){
				card[3][b-1]=0;
			}
			d++;
	}
	while(j<3){
		for(int k =0;k<13;k++){
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		}
	
		
	  }
	}

} Main
import java.util.Scanner;
public class Main {


//参照する山札


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int d = 0;
	int a = sc.nextInt();//行
	int card[][]= {{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13},
					{1,2,3,4,5,6,7,8,9,10,11,12,13}};
	int j=0;
while(d<a){
	String m = sc.next();//マーク
	int b = sc.nextInt();//数字

	//行分
			if(m.equals("S")){
				card[0][b-1]=0;
			}

			if(m.equals("H")){
				card[1][b-1]=0;
			}

			if(m.equals("C")){
				card[2][b-1]=0;
			}

			if(m.equals("D")){
				card[3][b-1]=0;
			}
			d++;
	}
	while(j<3){
		for(int k =0;k<13;k++){
		if(card[0][k]!=0)
			System.out.println("S "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[1][k]!=0)
			System.out.println("H "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[2][k]!=0)
			System.out.println("C "+card[j][k]);
		}
		j=j+1;
		for(int k =0;k<13;k++){
		if(card[3][k]!=0)
			System.out.println("D "+card[j][k]);
		}
	
		
	  }
	}

}

