import java.util.*;
class Main{
	Scanner sc=new Scanner(System.in);
	boolean[][] card=new boolean[4][13];
	void aa(){
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			String m=sc.next();
			int s=sc.nextInt();
			card[bb(m)][s-1]=true;
		}
		for(int i=0;i<4;i++){
			for(int j=1;j<14;j++){
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			}
		}
	}
	int bb(String m){
		if(m.equals("S"))return 0;
		else if	(m.equals("H"))return 1;
		else if	(m.equals("C"))return 2;
		else return 3;
	}
	String cc(int n){
		String m="";
		switch (n){
			case 0:
			m="S";
			break;
			case 1:
			m="H";
			break;
			case 2:
			m="C";
			break;
			case 3:
			m="D";
			break;
		}
		return m;
	}
	public static void main(String[]arg){
		new Main().aa();
	}
} import java.util.*; util.* java class Main{
	Scanner sc=new Scanner(System.in);
	boolean[][] card=new boolean[4][13];
	void aa(){
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			String m=sc.next();
			int s=sc.nextInt();
			card[bb(m)][s-1]=true;
		}
		for(int i=0;i<4;i++){
			for(int j=1;j<14;j++){
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			}
		}
	}
	int bb(String m){
		if(m.equals("S"))return 0;
		else if	(m.equals("H"))return 1;
		else if	(m.equals("C"))return 2;
		else return 3;
	}
	String cc(int n){
		String m="";
		switch (n){
			case 0:
			m="S";
			break;
			case 1:
			m="H";
			break;
			case 2:
			m="C";
			break;
			case 3:
			m="D";
			break;
		}
		return m;
	}
	public static void main(String[]arg){
		new Main().aa();
	}
} Main Scanner sc=new Scanner(System.in); sc new Scanner(System.in) boolean[][] card=new boolean[4][13]; card new boolean[4][13] 4 13 void aa(){
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			String m=sc.next();
			int s=sc.nextInt();
			card[bb(m)][s-1]=true;
		}
		for(int i=0;i<4;i++){
			for(int j=1;j<14;j++){
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			}
		}
	} aa {
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			String m=sc.next();
			int s=sc.nextInt();
			card[bb(m)][s-1]=true;
		}
		for(int i=0;i<4;i++){
			for(int j=1;j<14;j++){
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			}
		}
	} int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int i=0;i<n;i++){
			String m=sc.next();
			int s=sc.nextInt();
			card[bb(m)][s-1]=true;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			String m=sc.next();
			int s=sc.nextInt();
			card[bb(m)][s-1]=true;
		} {
			String m=sc.next();
			int s=sc.nextInt();
			card[bb(m)][s-1]=true;
		} String m=sc.next(); m sc.next() sc.next sc int s=sc.nextInt(); s sc.nextInt() sc.nextInt sc card[bb(m)][s-1]=true card[bb(m)][s-1] card[bb(m)] card bb(m) bb m s-1 s 1 true for(int i=0;i<4;i++){
			for(int j=1;j<14;j++){
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			}
		} int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
			for(int j=1;j<14;j++){
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			}
		} {
			for(int j=1;j<14;j++){
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			}
		} for(int j=1;j<14;j++){
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			} int j=1; int j=1; j 1 j<14 j 14 j++ j++ j {
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			} {
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			} if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				} !card[i][j-1] card[i][j-1] card[i] card i j-1 j 1 {
					String m=cc(i);
					System.out.println(m+" "+j);
				} String m=cc(i); m cc(i) cc i System.out.println(m+" "+j) System.out.println System.out System System.out m+" "+j m+" "+j m " " j int bb(String m){
		if(m.equals("S"))return 0;
		else if	(m.equals("H"))return 1;
		else if	(m.equals("C"))return 2;
		else return 3;
	} bb {
		if(m.equals("S"))return 0;
		else if	(m.equals("H"))return 1;
		else if	(m.equals("C"))return 2;
		else return 3;
	} if(m.equals("S"))return 0;
		else if	(m.equals("H"))return 1;
		else if	(m.equals("C"))return 2;
		else return 3; m.equals("S") m.equals m "S" return 0; 0 if	(m.equals("H"))return 1;
		else if	(m.equals("C"))return 2;
		else return 3; m.equals("H") m.equals m "H" return 1; 1 if	(m.equals("C"))return 2;
		else return 3; m.equals("C") m.equals m "C" return 2; 2 return 3; 3 String m m String cc(int n){
		String m="";
		switch (n){
			case 0:
			m="S";
			break;
			case 1:
			m="H";
			break;
			case 2:
			m="C";
			break;
			case 3:
			m="D";
			break;
		}
		return m;
	} cc {
		String m="";
		switch (n){
			case 0:
			m="S";
			break;
			case 1:
			m="H";
			break;
			case 2:
			m="C";
			break;
			case 3:
			m="D";
			break;
		}
		return m;
	} String m=""; m "" switch (n){
			case 0:
			m="S";
			break;
			case 1:
			m="H";
			break;
			case 2:
			m="C";
			break;
			case 3:
			m="D";
			break;
		} n case 0: 0 case 0: m="S" m "S" break; case 1: 1 case 1: m="H" m "H" break; case 2: 2 case 2: m="C" m "C" break; case 3: 3 case 3: m="D" m "D" break; return m; m int n n public static void main(String[]arg){
		new Main().aa();
	} main {
		new Main().aa();
	} new Main().aa() new Main().aa new Main() String[]arg arg
import java.util.*;
class Main{
	Scanner sc=new Scanner(System.in);
	boolean[][] card=new boolean[4][13];
	void aa(){
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			String m=sc.next();
			int s=sc.nextInt();
			card[bb(m)][s-1]=true;
		}
		for(int i=0;i<4;i++){
			for(int j=1;j<14;j++){
				if(!card[i][j-1]){
					String m=cc(i);
					System.out.println(m+" "+j);
				}
			}
		}
	}
	int bb(String m){
		if(m.equals("S"))return 0;
		else if	(m.equals("H"))return 1;
		else if	(m.equals("C"))return 2;
		else return 3;
	}
	String cc(int n){
		String m="";
		switch (n){
			case 0:
			m="S";
			break;
			case 1:
			m="H";
			break;
			case 2:
			m="C";
			break;
			case 3:
			m="D";
			break;
		}
		return m;
	}
	public static void main(String[]arg){
		new Main().aa();
	}
}