import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		int cards[][] = new int[4][13];
		String m[] = {"S", "H", "C", "D"};
		
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();

		for(int z=1; true; z++){

			if (z > x) break;
			
			String i = scan.next();
			int j = scan.nextInt();
			int I = 0;
			int J = j-1;
			
			if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3;
			cards[I][J] = j;
		}
		
		//?????????
		for (int I=0; true; I++){
			for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			}
			if (I==3) break;
		}
		
		
	}

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

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		int cards[][] = new int[4][13];
		String m[] = {"S", "H", "C", "D"};
		
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();

		for(int z=1; true; z++){

			if (z > x) break;
			
			String i = scan.next();
			int j = scan.nextInt();
			int I = 0;
			int J = j-1;
			
			if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3;
			cards[I][J] = j;
		}
		
		//?????????
		for (int I=0; true; I++){
			for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			}
			if (I==3) break;
		}
		
		
	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		int cards[][] = new int[4][13];
		String m[] = {"S", "H", "C", "D"};
		
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();

		for(int z=1; true; z++){

			if (z > x) break;
			
			String i = scan.next();
			int j = scan.nextInt();
			int I = 0;
			int J = j-1;
			
			if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3;
			cards[I][J] = j;
		}
		
		//?????????
		for (int I=0; true; I++){
			for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			}
			if (I==3) break;
		}
		
		
	} main {
		// TODO ?????????????????????????????????????????????

		int cards[][] = new int[4][13];
		String m[] = {"S", "H", "C", "D"};
		
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();

		for(int z=1; true; z++){

			if (z > x) break;
			
			String i = scan.next();
			int j = scan.nextInt();
			int I = 0;
			int J = j-1;
			
			if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3;
			cards[I][J] = j;
		}
		
		//?????????
		for (int I=0; true; I++){
			for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			}
			if (I==3) break;
		}
		
		
	} int cards[][] = new int[4][13]; cards new int[4][13] 4 13 String m[] = {"S", "H", "C", "D"}; m {"S", "H", "C", "D"} "S" "H" "C" "D" Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan for(int z=1; true; z++){

			if (z > x) break;
			
			String i = scan.next();
			int j = scan.nextInt();
			int I = 0;
			int J = j-1;
			
			if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3;
			cards[I][J] = j;
		} int z=1; int z=1; z 1 true z++ z++ z {

			if (z > x) break;
			
			String i = scan.next();
			int j = scan.nextInt();
			int I = 0;
			int J = j-1;
			
			if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3;
			cards[I][J] = j;
		} {

			if (z > x) break;
			
			String i = scan.next();
			int j = scan.nextInt();
			int I = 0;
			int J = j-1;
			
			if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3;
			cards[I][J] = j;
		} if (z > x) break; z > x z x break; String i = scan.next(); i scan.next() scan.next scan int j = scan.nextInt(); j scan.nextInt() scan.nextInt scan int I = 0; I 0 int J = j-1; J j-1 j 1 if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3; i.equals ("S") i.equals i "S" I = 0 I 0 if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3; i.equals ("H") i.equals i "H" I = 1 I 1 if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3; i.equals ("C") i.equals i "C" I = 2 I 2 if(i.equals ("D")) I = 3; i.equals ("D") i.equals i "D" I = 3 I 3 cards[I][J] = j cards[I][J] cards[I] cards I J j for (int I=0; true; I++){
			for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			}
			if (I==3) break;
		} int I=0; int I=0; I 0 true I++ I++ I {
			for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			}
			if (I==3) break;
		} {
			for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			}
			if (I==3) break;
		} for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			} int J=0; int J=0; J 0 true J++ J++ J {
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			} {
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			} if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				} (cards[I][J]) == 0 (cards[I][J]) cards[I] cards I J 0 {
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				} System.out.print(m[I] + " ") System.out.print System.out System System.out m[I] + " " m[I] m I " " System.out.println(J+1) System.out.println System.out System System.out J+1 J 1 if(J==12) break; J==12 J 12 break; if (I==3) break; I==3 I 3 break; String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		int cards[][] = new int[4][13];
		String m[] = {"S", "H", "C", "D"};
		
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();

		for(int z=1; true; z++){

			if (z > x) break;
			
			String i = scan.next();
			int j = scan.nextInt();
			int I = 0;
			int J = j-1;
			
			if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3;
			cards[I][J] = j;
		}
		
		//?????????
		for (int I=0; true; I++){
			for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			}
			if (I==3) break;
		}
		
		
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		int cards[][] = new int[4][13];
		String m[] = {"S", "H", "C", "D"};
		
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();

		for(int z=1; true; z++){

			if (z > x) break;
			
			String i = scan.next();
			int j = scan.nextInt();
			int I = 0;
			int J = j-1;
			
			if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3;
			cards[I][J] = j;
		}
		
		//?????????
		for (int I=0; true; I++){
			for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			}
			if (I==3) break;
		}
		
		
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		int cards[][] = new int[4][13];
		String m[] = {"S", "H", "C", "D"};
		
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();

		for(int z=1; true; z++){

			if (z > x) break;
			
			String i = scan.next();
			int j = scan.nextInt();
			int I = 0;
			int J = j-1;
			
			if(i.equals ("S")) I = 0;
			else if(i.equals ("H")) I = 1;
			else if(i.equals ("C")) I = 2;
			else if(i.equals ("D")) I = 3;
			cards[I][J] = j;
		}
		
		//?????????
		for (int I=0; true; I++){
			for(int J=0; true; J++){
				if((cards[I][J]) == 0){
					System.out.print(m[I] + " ");
					System.out.println(J+1);
				}
				if(J==12) break;
			}
			if (I==3) break;
		}
		
		
	}

}