import java.util.*;

public class Main {
//????????????????????蔵?????????????????????????????属???????????則??????
	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[][] cards = new int[4][13];
		for(int i=0; i<n; i++){
			String m = scan.next();
			int k=-1;
			if(m.equals("S")) k=0;
			if(m.equals("H")) k=1;
			if(m.equals("C")) k=2;
			if(m.equals("D")) k=3;
			cards[k][scan.nextInt()-1]++;
		}
		for(int i=0; i<4; i++){
			for(int j=0; j<13; j++){
				if(cards[i][j]==0){
					switch(i){
					case 0: System.out.print("S "); break;
					case 1: System.out.print("H "); break;
					case 2: System.out.print("C "); break;
					case 3: System.out.print("D "); break;
					}
					System.out.println(j+1);
				}
			}
		}
		
		

	}

}