import java.text.*;
import java.math.*;
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		Card card = new Card();
		int kazu = scan.nextInt();
		String type ;
		int num;
		
		for(int i = 0; i < kazu; i++) {
			type = scan.next();
			num = scan.nextInt();
			card.setCard(type, num);
		}
		card.getNai();
	}
}

class Card {
	private boolean[][] tcard = new boolean[4][13];
	
	public void setCard (String c, int n) {
		int num = n - 1;
		int card = passType(c);
		tcard[card][num] = true;
	}
	public void getNai () {
		for(int i1 = 0;i1 < 4;i1++) {
			for(int i2 = 0;i2 < 13;i2++) {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			}
		}
	}
	private int passType (String type) {
		if(type.equals("S")) {
			return 0;
		}else if(type.equals("H")) {
			return 1;
		}else if(type.equals("C")) {
			return 2;
		}else { // if(type.equals("D")) {
			return 3;
		}
	}
} import java.text.*; text.* java import java.math.*; math.* java import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		Card card = new Card();
		int kazu = scan.nextInt();
		String type ;
		int num;
		
		for(int i = 0; i < kazu; i++) {
			type = scan.next();
			num = scan.nextInt();
			card.setCard(type, num);
		}
		card.getNai();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		Card card = new Card();
		int kazu = scan.nextInt();
		String type ;
		int num;
		
		for(int i = 0; i < kazu; i++) {
			type = scan.next();
			num = scan.nextInt();
			card.setCard(type, num);
		}
		card.getNai();
	} main {
		Scanner scan = new Scanner(System.in);
		Card card = new Card();
		int kazu = scan.nextInt();
		String type ;
		int num;
		
		for(int i = 0; i < kazu; i++) {
			type = scan.next();
			num = scan.nextInt();
			card.setCard(type, num);
		}
		card.getNai();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) Card card = new Card(); card new Card() int kazu = scan.nextInt(); kazu scan.nextInt() scan.nextInt scan String type ; type int num; num for(int i = 0; i < kazu; i++) {
			type = scan.next();
			num = scan.nextInt();
			card.setCard(type, num);
		} int i = 0; int i = 0; i 0 i < kazu i kazu i++ i++ i {
			type = scan.next();
			num = scan.nextInt();
			card.setCard(type, num);
		} {
			type = scan.next();
			num = scan.nextInt();
			card.setCard(type, num);
		} type = scan.next() type scan.next() scan.next scan num = scan.nextInt() num scan.nextInt() scan.nextInt scan card.setCard(type, num) card.setCard card type num card.getNai() card.getNai card String[] args args class Card {
	private boolean[][] tcard = new boolean[4][13];
	
	public void setCard (String c, int n) {
		int num = n - 1;
		int card = passType(c);
		tcard[card][num] = true;
	}
	public void getNai () {
		for(int i1 = 0;i1 < 4;i1++) {
			for(int i2 = 0;i2 < 13;i2++) {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			}
		}
	}
	private int passType (String type) {
		if(type.equals("S")) {
			return 0;
		}else if(type.equals("H")) {
			return 1;
		}else if(type.equals("C")) {
			return 2;
		}else { // if(type.equals("D")) {
			return 3;
		}
	}
} Card private boolean[][] tcard = new boolean[4][13]; tcard new boolean[4][13] 4 13 public void setCard (String c, int n) {
		int num = n - 1;
		int card = passType(c);
		tcard[card][num] = true;
	} setCard {
		int num = n - 1;
		int card = passType(c);
		tcard[card][num] = true;
	} int num = n - 1; num n - 1 n 1 int card = passType(c); card passType(c) passType c tcard[card][num] = true tcard[card][num] tcard[card] tcard card num true String c c int n n public void getNai () {
		for(int i1 = 0;i1 < 4;i1++) {
			for(int i2 = 0;i2 < 13;i2++) {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			}
		}
	} getNai {
		for(int i1 = 0;i1 < 4;i1++) {
			for(int i2 = 0;i2 < 13;i2++) {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			}
		}
	} for(int i1 = 0;i1 < 4;i1++) {
			for(int i2 = 0;i2 < 13;i2++) {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			}
		} int i1 = 0; int i1 = 0; i1 0 i1 < 4 i1 4 i1++ i1++ i1 {
			for(int i2 = 0;i2 < 13;i2++) {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			}
		} {
			for(int i2 = 0;i2 < 13;i2++) {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			}
		} for(int i2 = 0;i2 < 13;i2++) {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			} int i2 = 0; int i2 = 0; i2 0 i2 < 13 i2 13 i2++ i2++ i2 {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			} {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			} boolean t = tcard[i1][i2]; t tcard[i1][i2] tcard[i1] tcard i1 i2 if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				} t == false t false {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				} if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					} i1 == 0 i1 0 {
						System.out.print('S');
					} System.out.print('S') System.out.print System.out System System.out 'S' if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					} i1 == 1 i1 1 {
						System.out.print('H');
					} System.out.print('H') System.out.print System.out System System.out 'H' if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					} i1 == 2 i1 2 {
						System.out.print('C');
					} System.out.print('C') System.out.print System.out System System.out 'C' if(i1 == 3) {
						System.out.print('D');
					} i1 == 3 i1 3 {
						System.out.print('D');
					} System.out.print('D') System.out.print System.out System System.out 'D' int num = i2 + 1; num i2 + 1 i2 1 System.out.println(" " +num) System.out.println System.out System System.out " " +num " " num private int passType (String type) {
		if(type.equals("S")) {
			return 0;
		}else if(type.equals("H")) {
			return 1;
		}else if(type.equals("C")) {
			return 2;
		}else { // if(type.equals("D")) {
			return 3;
		}
	} passType {
		if(type.equals("S")) {
			return 0;
		}else if(type.equals("H")) {
			return 1;
		}else if(type.equals("C")) {
			return 2;
		}else { // if(type.equals("D")) {
			return 3;
		}
	} if(type.equals("S")) {
			return 0;
		}else if(type.equals("H")) {
			return 1;
		}else if(type.equals("C")) {
			return 2;
		}else { // if(type.equals("D")) {
			return 3;
		} type.equals("S") type.equals type "S" {
			return 0;
		} return 0; 0 if(type.equals("H")) {
			return 1;
		}else if(type.equals("C")) {
			return 2;
		}else { // if(type.equals("D")) {
			return 3;
		} type.equals("H") type.equals type "H" {
			return 1;
		} return 1; 1 if(type.equals("C")) {
			return 2;
		}else { // if(type.equals("D")) {
			return 3;
		} type.equals("C") type.equals type "C" {
			return 2;
		} return 2; 2 { // if(type.equals("D")) {
			return 3;
		} return 3; 3 String type type public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		Card card = new Card();
		int kazu = scan.nextInt();
		String type ;
		int num;
		
		for(int i = 0; i < kazu; i++) {
			type = scan.next();
			num = scan.nextInt();
			card.setCard(type, num);
		}
		card.getNai();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		Card card = new Card();
		int kazu = scan.nextInt();
		String type ;
		int num;
		
		for(int i = 0; i < kazu; i++) {
			type = scan.next();
			num = scan.nextInt();
			card.setCard(type, num);
		}
		card.getNai();
	}
} Main
import java.text.*;
import java.math.*;
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		Card card = new Card();
		int kazu = scan.nextInt();
		String type ;
		int num;
		
		for(int i = 0; i < kazu; i++) {
			type = scan.next();
			num = scan.nextInt();
			card.setCard(type, num);
		}
		card.getNai();
	}
}

class Card {
	private boolean[][] tcard = new boolean[4][13];
	
	public void setCard (String c, int n) {
		int num = n - 1;
		int card = passType(c);
		tcard[card][num] = true;
	}
	public void getNai () {
		for(int i1 = 0;i1 < 4;i1++) {
			for(int i2 = 0;i2 < 13;i2++) {
				boolean t = tcard[i1][i2];
				if(t == false) {
					if(i1 == 0) {
						System.out.print('S');
					}else if(i1 == 1) {
						System.out.print('H');
					}else if(i1 == 2) {
						System.out.print('C');
					}else if(i1 == 3) {
						System.out.print('D');
					}
					int num = i2 + 1;
					System.out.println(" " +num); 
				}
			}
		}
	}
	private int passType (String type) {
		if(type.equals("S")) {
			return 0;
		}else if(type.equals("H")) {
			return 1;
		}else if(type.equals("C")) {
			return 2;
		}else { // if(type.equals("D")) {
			return 3;
		}
	}
}