import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String lineN = br.readLine();
    int n = Integer.parseInt(lineN);
		int[][] c = new int[4][13];
    for(int i = 0; i < n; i++){
      String[] lineA = br.readLine().split(" ");
      int num = Integer.parseInt(lineA[1]);
      if( lineA[0].equals("S") ) c[0][--num] =1;
      if( lineA[0].equals("H") ) c[1][--num] =1;
      if( lineA[0].equals("C") ) c[2][--num] =1;
      if( lineA[0].equals("D") ) c[3][--num] =1;
    }
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			}
		}
    System.out.print(sb);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String lineN = br.readLine();
    int n = Integer.parseInt(lineN);
		int[][] c = new int[4][13];
    for(int i = 0; i < n; i++){
      String[] lineA = br.readLine().split(" ");
      int num = Integer.parseInt(lineA[1]);
      if( lineA[0].equals("S") ) c[0][--num] =1;
      if( lineA[0].equals("H") ) c[1][--num] =1;
      if( lineA[0].equals("C") ) c[2][--num] =1;
      if( lineA[0].equals("D") ) c[3][--num] =1;
    }
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			}
		}
    System.out.print(sb);
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String lineN = br.readLine();
    int n = Integer.parseInt(lineN);
		int[][] c = new int[4][13];
    for(int i = 0; i < n; i++){
      String[] lineA = br.readLine().split(" ");
      int num = Integer.parseInt(lineA[1]);
      if( lineA[0].equals("S") ) c[0][--num] =1;
      if( lineA[0].equals("H") ) c[1][--num] =1;
      if( lineA[0].equals("C") ) c[2][--num] =1;
      if( lineA[0].equals("D") ) c[3][--num] =1;
    }
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			}
		}
    System.out.print(sb);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String lineN = br.readLine();
    int n = Integer.parseInt(lineN);
		int[][] c = new int[4][13];
    for(int i = 0; i < n; i++){
      String[] lineA = br.readLine().split(" ");
      int num = Integer.parseInt(lineA[1]);
      if( lineA[0].equals("S") ) c[0][--num] =1;
      if( lineA[0].equals("H") ) c[1][--num] =1;
      if( lineA[0].equals("C") ) c[2][--num] =1;
      if( lineA[0].equals("D") ) c[3][--num] =1;
    }
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			}
		}
    System.out.print(sb);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String lineN = br.readLine(); lineN br.readLine() br.readLine br int n = Integer.parseInt(lineN); n Integer.parseInt(lineN) Integer.parseInt Integer lineN int[][] c = new int[4][13]; c new int[4][13] 4 13 for(int i = 0; i < n; i++){
      String[] lineA = br.readLine().split(" ");
      int num = Integer.parseInt(lineA[1]);
      if( lineA[0].equals("S") ) c[0][--num] =1;
      if( lineA[0].equals("H") ) c[1][--num] =1;
      if( lineA[0].equals("C") ) c[2][--num] =1;
      if( lineA[0].equals("D") ) c[3][--num] =1;
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      String[] lineA = br.readLine().split(" ");
      int num = Integer.parseInt(lineA[1]);
      if( lineA[0].equals("S") ) c[0][--num] =1;
      if( lineA[0].equals("H") ) c[1][--num] =1;
      if( lineA[0].equals("C") ) c[2][--num] =1;
      if( lineA[0].equals("D") ) c[3][--num] =1;
    } {
      String[] lineA = br.readLine().split(" ");
      int num = Integer.parseInt(lineA[1]);
      if( lineA[0].equals("S") ) c[0][--num] =1;
      if( lineA[0].equals("H") ) c[1][--num] =1;
      if( lineA[0].equals("C") ) c[2][--num] =1;
      if( lineA[0].equals("D") ) c[3][--num] =1;
    } String[] lineA = br.readLine().split(" "); lineA br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int num = Integer.parseInt(lineA[1]); num Integer.parseInt(lineA[1]) Integer.parseInt Integer lineA[1] lineA 1 if( lineA[0].equals("S") ) c[0][--num] =1; lineA[0].equals("S") lineA[0].equals lineA[0] lineA 0 "S" c[0][--num] =1 c[0][--num] c[0] c 0 --num num 1 if( lineA[0].equals("H") ) c[1][--num] =1; lineA[0].equals("H") lineA[0].equals lineA[0] lineA 0 "H" c[1][--num] =1 c[1][--num] c[1] c 1 --num num 1 if( lineA[0].equals("C") ) c[2][--num] =1; lineA[0].equals("C") lineA[0].equals lineA[0] lineA 0 "C" c[2][--num] =1 c[2][--num] c[2] c 2 --num num 1 if( lineA[0].equals("D") ) c[3][--num] =1; lineA[0].equals("D") lineA[0].equals lineA[0] lineA 0 "D" c[3][--num] =1 c[3][--num] c[3] c 3 --num num 1 for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			}
		} {
			for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			}
		} for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			} {
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			} if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				} c[i][j] == 0 c[i][j] c[i] c i j 0 {
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				} switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					} i case 0: 0 case 0: sb.append("S ") sb.append sb "S " break; case 1: 1 case 1: sb.append("H ") sb.append sb "H " break; case 2: 2 case 2: sb.append("C ") sb.append sb "C " break; case 3: 3 case 3: sb.append("D ") sb.append sb "D " break; sb.append(j+1).append("\n") sb.append(j+1).append sb.append(j+1) sb.append sb j+1 j 1 "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String lineN = br.readLine();
    int n = Integer.parseInt(lineN);
		int[][] c = new int[4][13];
    for(int i = 0; i < n; i++){
      String[] lineA = br.readLine().split(" ");
      int num = Integer.parseInt(lineA[1]);
      if( lineA[0].equals("S") ) c[0][--num] =1;
      if( lineA[0].equals("H") ) c[1][--num] =1;
      if( lineA[0].equals("C") ) c[2][--num] =1;
      if( lineA[0].equals("D") ) c[3][--num] =1;
    }
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			}
		}
    System.out.print(sb);
	}
} public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String lineN = br.readLine();
    int n = Integer.parseInt(lineN);
		int[][] c = new int[4][13];
    for(int i = 0; i < n; i++){
      String[] lineA = br.readLine().split(" ");
      int num = Integer.parseInt(lineA[1]);
      if( lineA[0].equals("S") ) c[0][--num] =1;
      if( lineA[0].equals("H") ) c[1][--num] =1;
      if( lineA[0].equals("C") ) c[2][--num] =1;
      if( lineA[0].equals("D") ) c[3][--num] =1;
    }
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			}
		}
    System.out.print(sb);
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String lineN = br.readLine();
    int n = Integer.parseInt(lineN);
		int[][] c = new int[4][13];
    for(int i = 0; i < n; i++){
      String[] lineA = br.readLine().split(" ");
      int num = Integer.parseInt(lineA[1]);
      if( lineA[0].equals("S") ) c[0][--num] =1;
      if( lineA[0].equals("H") ) c[1][--num] =1;
      if( lineA[0].equals("C") ) c[2][--num] =1;
      if( lineA[0].equals("D") ) c[3][--num] =1;
    }
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 13; j++){
				if( c[i][j] == 0 ){
					switch(i){
						case 0:
							sb.append("S ");
							break;
						case 1:
							sb.append("H ");
							break;
						case 2:
							sb.append("C ");
							break;
						case 3:
							sb.append("D ");
							break;
					}
					sb.append(j+1).append("\n");
				}
			}
		}
    System.out.print(sb);
	}
}