import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		List<String> list = new ArrayList<String>();
		String[] mark ={"S","H","C","D"};

		for(int i=0;i<=3;i++){
			for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			}
		}
		for(int i=0;i<=n-1;i++){
			list.remove(sc.nextLine());
		}
		for(String ans:list){
			System.out.println(ans);
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		List<String> list = new ArrayList<String>();
		String[] mark ={"S","H","C","D"};

		for(int i=0;i<=3;i++){
			for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			}
		}
		for(int i=0;i<=n-1;i++){
			list.remove(sc.nextLine());
		}
		for(String ans:list){
			System.out.println(ans);
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		List<String> list = new ArrayList<String>();
		String[] mark ={"S","H","C","D"};

		for(int i=0;i<=3;i++){
			for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			}
		}
		for(int i=0;i<=n-1;i++){
			list.remove(sc.nextLine());
		}
		for(String ans:list){
			System.out.println(ans);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		List<String> list = new ArrayList<String>();
		String[] mark ={"S","H","C","D"};

		for(int i=0;i<=3;i++){
			for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			}
		}
		for(int i=0;i<=n-1;i++){
			list.remove(sc.nextLine());
		}
		for(String ans:list){
			System.out.println(ans);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc List<String> list = new ArrayList<String>(); list new ArrayList<String>() String[] mark ={"S","H","C","D"}; mark {"S","H","C","D"} "S" "H" "C" "D" for(int i=0;i<=3;i++){
			for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			}
		} int i=0; int i=0; i 0 i<=3 i 3 i++ i++ i {
			for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			}
		} {
			for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			}
		} for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			} int j=0; int j=0; j 0 j<=12 j 12 j++ j++ j {
				list.add(mark[i]+" "+(j+1));
			} {
				list.add(mark[i]+" "+(j+1));
			} list.add(mark[i]+" "+(j+1)) list.add list mark[i]+" "+(j+1) mark[i]+" "+(j+1) mark[i] mark i " " (j+1) j 1 for(int i=0;i<=n-1;i++){
			list.remove(sc.nextLine());
		} int i=0; int i=0; i 0 i<=n-1 i n-1 n 1 i++ i++ i {
			list.remove(sc.nextLine());
		} {
			list.remove(sc.nextLine());
		} list.remove(sc.nextLine()) list.remove list sc.nextLine() sc.nextLine sc for(String ans:list){
			System.out.println(ans);
		} String ans list {
			System.out.println(ans);
		} {
			System.out.println(ans);
		} System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		List<String> list = new ArrayList<String>();
		String[] mark ={"S","H","C","D"};

		for(int i=0;i<=3;i++){
			for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			}
		}
		for(int i=0;i<=n-1;i++){
			list.remove(sc.nextLine());
		}
		for(String ans:list){
			System.out.println(ans);
		}
	}
} public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		List<String> list = new ArrayList<String>();
		String[] mark ={"S","H","C","D"};

		for(int i=0;i<=3;i++){
			for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			}
		}
		for(int i=0;i<=n-1;i++){
			list.remove(sc.nextLine());
		}
		for(String ans:list){
			System.out.println(ans);
		}
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		List<String> list = new ArrayList<String>();
		String[] mark ={"S","H","C","D"};

		for(int i=0;i<=3;i++){
			for(int j=0;j<=12;j++){
				list.add(mark[i]+" "+(j+1));
			}
		}
		for(int i=0;i<=n-1;i++){
			list.remove(sc.nextLine());
		}
		for(String ans:list){
			System.out.println(ans);
		}
	}
}