import java.util.Scanner;

public class Main{
	public static void main(String args[]){

		Scanner sc = new Scanner (System.in);

		boolean inhand[][]= new boolean[4][13];
		for (int i=0; i<4;++i){
			for (int j=0;j<13;++j){
				inhand[i][j] = false;
			}
		}
		int n= sc.nextInt();
		String suit;
		int s=0;
		int rank;

		String suitnum[]={"S","H","C","D"};

		for(int i=0; i<n;++i){
			suit = sc.next();
			if (suit.equals("S")) s = 0;
			if (suit.equals( "H")) s = 1;
			if (suit.equals("C")) s =2;
			if (suit.equals( "D")) s =3;
			rank = sc.nextInt();
			inhand[s][rank-1] = true;
		}
		for (int i=0;i<4;++i){
			for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String args[]){

		Scanner sc = new Scanner (System.in);

		boolean inhand[][]= new boolean[4][13];
		for (int i=0; i<4;++i){
			for (int j=0;j<13;++j){
				inhand[i][j] = false;
			}
		}
		int n= sc.nextInt();
		String suit;
		int s=0;
		int rank;

		String suitnum[]={"S","H","C","D"};

		for(int i=0; i<n;++i){
			suit = sc.next();
			if (suit.equals("S")) s = 0;
			if (suit.equals( "H")) s = 1;
			if (suit.equals("C")) s =2;
			if (suit.equals( "D")) s =3;
			rank = sc.nextInt();
			inhand[s][rank-1] = true;
		}
		for (int i=0;i<4;++i){
			for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			}
		}
	}
} Main public static void main(String args[]){

		Scanner sc = new Scanner (System.in);

		boolean inhand[][]= new boolean[4][13];
		for (int i=0; i<4;++i){
			for (int j=0;j<13;++j){
				inhand[i][j] = false;
			}
		}
		int n= sc.nextInt();
		String suit;
		int s=0;
		int rank;

		String suitnum[]={"S","H","C","D"};

		for(int i=0; i<n;++i){
			suit = sc.next();
			if (suit.equals("S")) s = 0;
			if (suit.equals( "H")) s = 1;
			if (suit.equals("C")) s =2;
			if (suit.equals( "D")) s =3;
			rank = sc.nextInt();
			inhand[s][rank-1] = true;
		}
		for (int i=0;i<4;++i){
			for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			}
		}
	} main {

		Scanner sc = new Scanner (System.in);

		boolean inhand[][]= new boolean[4][13];
		for (int i=0; i<4;++i){
			for (int j=0;j<13;++j){
				inhand[i][j] = false;
			}
		}
		int n= sc.nextInt();
		String suit;
		int s=0;
		int rank;

		String suitnum[]={"S","H","C","D"};

		for(int i=0; i<n;++i){
			suit = sc.next();
			if (suit.equals("S")) s = 0;
			if (suit.equals( "H")) s = 1;
			if (suit.equals("C")) s =2;
			if (suit.equals( "D")) s =3;
			rank = sc.nextInt();
			inhand[s][rank-1] = true;
		}
		for (int i=0;i<4;++i){
			for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			}
		}
	} Scanner sc = new Scanner (System.in); sc new Scanner (System.in) boolean inhand[][]= new boolean[4][13]; inhand new boolean[4][13] 4 13 for (int i=0; i<4;++i){
			for (int j=0;j<13;++j){
				inhand[i][j] = false;
			}
		} int i=0; int i=0; i 0 i<4 i 4 ++i ++i i {
			for (int j=0;j<13;++j){
				inhand[i][j] = false;
			}
		} {
			for (int j=0;j<13;++j){
				inhand[i][j] = false;
			}
		} for (int j=0;j<13;++j){
				inhand[i][j] = false;
			} int j=0; int j=0; j 0 j<13 j 13 ++j ++j j {
				inhand[i][j] = false;
			} {
				inhand[i][j] = false;
			} inhand[i][j] = false inhand[i][j] inhand[i] inhand i j false int n= sc.nextInt(); n sc.nextInt() sc.nextInt sc String suit; suit int s=0; s 0 int rank; rank String suitnum[]={"S","H","C","D"}; suitnum {"S","H","C","D"} "S" "H" "C" "D" for(int i=0; i<n;++i){
			suit = sc.next();
			if (suit.equals("S")) s = 0;
			if (suit.equals( "H")) s = 1;
			if (suit.equals("C")) s =2;
			if (suit.equals( "D")) s =3;
			rank = sc.nextInt();
			inhand[s][rank-1] = true;
		} int i=0; int i=0; i 0 i<n i n ++i ++i i {
			suit = sc.next();
			if (suit.equals("S")) s = 0;
			if (suit.equals( "H")) s = 1;
			if (suit.equals("C")) s =2;
			if (suit.equals( "D")) s =3;
			rank = sc.nextInt();
			inhand[s][rank-1] = true;
		} {
			suit = sc.next();
			if (suit.equals("S")) s = 0;
			if (suit.equals( "H")) s = 1;
			if (suit.equals("C")) s =2;
			if (suit.equals( "D")) s =3;
			rank = sc.nextInt();
			inhand[s][rank-1] = true;
		} suit = sc.next() suit sc.next() sc.next sc if (suit.equals("S")) s = 0; suit.equals("S") suit.equals suit "S" s = 0 s 0 if (suit.equals( "H")) s = 1; suit.equals( "H") suit.equals suit "H" s = 1 s 1 if (suit.equals("C")) s =2; suit.equals("C") suit.equals suit "C" s =2 s 2 if (suit.equals( "D")) s =3; suit.equals( "D") suit.equals suit "D" s =3 s 3 rank = sc.nextInt() rank sc.nextInt() sc.nextInt sc inhand[s][rank-1] = true inhand[s][rank-1] inhand[s] inhand s rank-1 rank 1 true for (int i=0;i<4;++i){
			for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			}
		} int i=0; int i=0; i 0 i<4 i 4 ++i ++i i {
			for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			}
		} {
			for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			}
		} for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			} int j=0; int j=0; j 0 j<13 j 13 ++j ++j j {
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			} {
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			} if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				} inhand[i][j] == false inhand[i][j] inhand[i] inhand i j false {
					System.out.println(suitnum[i]+" "+(j+1));
				} System.out.println(suitnum[i]+" "+(j+1)) System.out.println System.out System System.out suitnum[i]+" "+(j+1) suitnum[i]+" "+(j+1) suitnum[i] suitnum i " " (j+1) j 1 String args[] args public class Main{
	public static void main(String args[]){

		Scanner sc = new Scanner (System.in);

		boolean inhand[][]= new boolean[4][13];
		for (int i=0; i<4;++i){
			for (int j=0;j<13;++j){
				inhand[i][j] = false;
			}
		}
		int n= sc.nextInt();
		String suit;
		int s=0;
		int rank;

		String suitnum[]={"S","H","C","D"};

		for(int i=0; i<n;++i){
			suit = sc.next();
			if (suit.equals("S")) s = 0;
			if (suit.equals( "H")) s = 1;
			if (suit.equals("C")) s =2;
			if (suit.equals( "D")) s =3;
			rank = sc.nextInt();
			inhand[s][rank-1] = true;
		}
		for (int i=0;i<4;++i){
			for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			}
		}
	}
} public class Main{
	public static void main(String args[]){

		Scanner sc = new Scanner (System.in);

		boolean inhand[][]= new boolean[4][13];
		for (int i=0; i<4;++i){
			for (int j=0;j<13;++j){
				inhand[i][j] = false;
			}
		}
		int n= sc.nextInt();
		String suit;
		int s=0;
		int rank;

		String suitnum[]={"S","H","C","D"};

		for(int i=0; i<n;++i){
			suit = sc.next();
			if (suit.equals("S")) s = 0;
			if (suit.equals( "H")) s = 1;
			if (suit.equals("C")) s =2;
			if (suit.equals( "D")) s =3;
			rank = sc.nextInt();
			inhand[s][rank-1] = true;
		}
		for (int i=0;i<4;++i){
			for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			}
		}
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String args[]){

		Scanner sc = new Scanner (System.in);

		boolean inhand[][]= new boolean[4][13];
		for (int i=0; i<4;++i){
			for (int j=0;j<13;++j){
				inhand[i][j] = false;
			}
		}
		int n= sc.nextInt();
		String suit;
		int s=0;
		int rank;

		String suitnum[]={"S","H","C","D"};

		for(int i=0; i<n;++i){
			suit = sc.next();
			if (suit.equals("S")) s = 0;
			if (suit.equals( "H")) s = 1;
			if (suit.equals("C")) s =2;
			if (suit.equals( "D")) s =3;
			rank = sc.nextInt();
			inhand[s][rank-1] = true;
		}
		for (int i=0;i<4;++i){
			for (int j=0;j<13;++j){
				if (inhand[i][j] == false){
					System.out.println(suitnum[i]+" "+(j+1));
				}
			}
		}
	}
}
