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

public class Main {
	public static void main(String[] age)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();
		String input = br.readLine();
		int M = Integer.parseInt(input);
		int i = 0;
		int j = 0;
		String card = new String();
		int[] spade = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] heart = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] clab = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] dia = {1,2,3,4,5,6,7,8,9,10,11,12,13};


		for( i=0 ; i<M ; i++ ){
			card = br.readLine();
			String[] cardvo = card.split(" ");

			if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			}
		}

		for( i=0 ; i<13 ; i++ ){
			if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n");
		}

		System.out.print(sb);
	}
} 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[] age)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();
		String input = br.readLine();
		int M = Integer.parseInt(input);
		int i = 0;
		int j = 0;
		String card = new String();
		int[] spade = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] heart = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] clab = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] dia = {1,2,3,4,5,6,7,8,9,10,11,12,13};


		for( i=0 ; i<M ; i++ ){
			card = br.readLine();
			String[] cardvo = card.split(" ");

			if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			}
		}

		for( i=0 ; i<13 ; i++ ){
			if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n");
		}

		System.out.print(sb);
	}
} Main public static void main(String[] age)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();
		String input = br.readLine();
		int M = Integer.parseInt(input);
		int i = 0;
		int j = 0;
		String card = new String();
		int[] spade = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] heart = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] clab = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] dia = {1,2,3,4,5,6,7,8,9,10,11,12,13};


		for( i=0 ; i<M ; i++ ){
			card = br.readLine();
			String[] cardvo = card.split(" ");

			if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			}
		}

		for( i=0 ; i<13 ; i++ ){
			if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n");
		}

		System.out.print(sb);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();
		String input = br.readLine();
		int M = Integer.parseInt(input);
		int i = 0;
		int j = 0;
		String card = new String();
		int[] spade = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] heart = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] clab = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] dia = {1,2,3,4,5,6,7,8,9,10,11,12,13};


		for( i=0 ; i<M ; i++ ){
			card = br.readLine();
			String[] cardvo = card.split(" ");

			if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			}
		}

		for( i=0 ; i<13 ; i++ ){
			if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n");
		}

		System.out.print(sb);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuffer sb = new StringBuffer(); sb new StringBuffer() String input = br.readLine(); input br.readLine() br.readLine br int M = Integer.parseInt(input); M Integer.parseInt(input) Integer.parseInt Integer input int i = 0; i 0 int j = 0; j 0 String card = new String(); card new String() int[] spade = {1,2,3,4,5,6,7,8,9,10,11,12,13}; spade {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[] heart = {1,2,3,4,5,6,7,8,9,10,11,12,13}; heart {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[] clab = {1,2,3,4,5,6,7,8,9,10,11,12,13}; clab {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[] dia = {1,2,3,4,5,6,7,8,9,10,11,12,13}; dia {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 for( i=0 ; i<M ; i++ ){
			card = br.readLine();
			String[] cardvo = card.split(" ");

			if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			}
		} i=0 ; i=0 i 0 i<M i M i++ i++ i {
			card = br.readLine();
			String[] cardvo = card.split(" ");

			if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			}
		} {
			card = br.readLine();
			String[] cardvo = card.split(" ");

			if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			}
		} card = br.readLine() card br.readLine() br.readLine br String[] cardvo = card.split(" "); cardvo card.split(" ") card.split card " " if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			} cardvo[0].equals("S") cardvo[0].equals cardvo[0] cardvo 0 "S" {
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			} for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				} j=0 ; j=0 j 0 j<13 j 13 j++ j++ j {
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				} {
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				} if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100; spade[j]==Integer.parseInt(cardvo[1]) spade[j] spade j Integer.parseInt(cardvo[1]) Integer.parseInt Integer cardvo[1] cardvo 1 spade[j]=100 spade[j] spade j 100 if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			} cardvo[0].equals("H") cardvo[0].equals cardvo[0] cardvo 0 "H" {
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			} for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				} j=0 ; j=0 j 0 j<13 j 13 j++ j++ j {
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				} {
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				} if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100; heart[j]==Integer.parseInt(cardvo[1]) heart[j] heart j Integer.parseInt(cardvo[1]) Integer.parseInt Integer cardvo[1] cardvo 1 heart[j]=100 heart[j] heart j 100 if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			} cardvo[0].equals("C") cardvo[0].equals cardvo[0] cardvo 0 "C" {
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			} for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				} j=0; j=0 j 0 j<13 j 13 j++ j++ j {
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				} {
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				} if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100; clab[j]==Integer.parseInt(cardvo[1]) clab[j] clab j Integer.parseInt(cardvo[1]) Integer.parseInt Integer cardvo[1] cardvo 1 clab[j]=100 clab[j] clab j 100 {
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			} for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				} j=0 ; j=0 j 0 j<13 j 13 j++ j++ j {
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				} {
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				} if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100; dia[j]==Integer.parseInt(cardvo[1]) dia[j] dia j Integer.parseInt(cardvo[1]) Integer.parseInt Integer cardvo[1] cardvo 1 dia[j]=100 dia[j] dia j 100 for( i=0 ; i<13 ; i++ ){
			if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n");
		} i=0 ; i=0 i 0 i<13 i 13 i++ i++ i {
			if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n");
		} {
			if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n");
		} if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n"); spade[i]!=100 spade[i] spade i 100 sb.append("S ").append(spade[i]).append("\n") sb.append("S ").append(spade[i]).append sb.append("S ").append(spade[i]) sb.append("S ").append sb.append("S ") sb.append sb "S " spade[i] spade i "\n" for( i=0 ; i<13 ; i++ ){
			if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n");
		} i=0 ; i=0 i 0 i<13 i 13 i++ i++ i {
			if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n");
		} {
			if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n");
		} if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n"); heart[i]!=100 heart[i] heart i 100 sb.append("H ").append(heart[i]).append("\n") sb.append("H ").append(heart[i]).append sb.append("H ").append(heart[i]) sb.append("H ").append sb.append("H ") sb.append sb "H " heart[i] heart i "\n" for( i=0 ; i<13 ; i++ ){
			if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n");
		} i=0 ; i=0 i 0 i<13 i 13 i++ i++ i {
			if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n");
		} {
			if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n");
		} if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n"); clab[i]!=100 clab[i] clab i 100 sb.append("C ").append(clab[i]).append("\n") sb.append("C ").append(clab[i]).append sb.append("C ").append(clab[i]) sb.append("C ").append sb.append("C ") sb.append sb "C " clab[i] clab i "\n" for( i=0 ; i<13 ; i++ ){
			if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n");
		} i=0 ; i=0 i 0 i<13 i 13 i++ i++ i {
			if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n");
		} {
			if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n");
		} if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n"); dia[i]!=100 dia[i] dia i 100 sb.append("D ").append(dia[i]).append("\n") sb.append("D ").append(dia[i]).append sb.append("D ").append(dia[i]) sb.append("D ").append sb.append("D ") sb.append sb "D " dia[i] dia i "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] age age public class Main {
	public static void main(String[] age)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();
		String input = br.readLine();
		int M = Integer.parseInt(input);
		int i = 0;
		int j = 0;
		String card = new String();
		int[] spade = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] heart = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] clab = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] dia = {1,2,3,4,5,6,7,8,9,10,11,12,13};


		for( i=0 ; i<M ; i++ ){
			card = br.readLine();
			String[] cardvo = card.split(" ");

			if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			}
		}

		for( i=0 ; i<13 ; i++ ){
			if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n");
		}

		System.out.print(sb);
	}
} public class Main {
	public static void main(String[] age)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();
		String input = br.readLine();
		int M = Integer.parseInt(input);
		int i = 0;
		int j = 0;
		String card = new String();
		int[] spade = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] heart = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] clab = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] dia = {1,2,3,4,5,6,7,8,9,10,11,12,13};


		for( i=0 ; i<M ; i++ ){
			card = br.readLine();
			String[] cardvo = card.split(" ");

			if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			}
		}

		for( i=0 ; i<13 ; i++ ){
			if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n");
		}

		System.out.print(sb);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] age)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb = new StringBuffer();
		String input = br.readLine();
		int M = Integer.parseInt(input);
		int i = 0;
		int j = 0;
		String card = new String();
		int[] spade = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] heart = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] clab = {1,2,3,4,5,6,7,8,9,10,11,12,13};
		int[] dia = {1,2,3,4,5,6,7,8,9,10,11,12,13};


		for( i=0 ; i<M ; i++ ){
			card = br.readLine();
			String[] cardvo = card.split(" ");

			if( cardvo[0].equals("S")){
				for( j=0 ; j<13 ;j++ ){
					if( spade[j]==Integer.parseInt(cardvo[1]) ) spade[j]=100;
				}
			}else if( cardvo[0].equals("H")){
				for( j=0 ;j<13 ;j++ ){
					if( heart[j]==Integer.parseInt(cardvo[1]) ) heart[j]=100;
				}
			}else if( cardvo[0].equals("C")){
				for( j=0; j<13 ; j++ ){
					if( clab[j]==Integer.parseInt(cardvo[1]) ) clab[j]=100;
				}
			}else{
				for( j=0 ; j<13 ; j++ ){
					if( dia[j]==Integer.parseInt(cardvo[1]) ) dia[j]=100;
				}
			}
		}

		for( i=0 ; i<13 ; i++ ){
			if( spade[i]!=100 ) sb.append("S ").append(spade[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( heart[i]!=100 ) sb.append("H ").append(heart[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( clab[i]!=100 ) sb.append("C ").append(clab[i]).append("\n");
		}
		for( i=0 ; i<13 ; i++ ){
			if( dia[i]!=100 ) sb.append("D ").append(dia[i]).append("\n");
		}

		System.out.print(sb);
	}
}