import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
    public static void main (String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        StringBuffer sb = new StringBuffer();
        int a = Integer.parseInt(sc.nextLine());
        //String x =sc.nextLine();
        ArrayList<String> array = new ArrayList<String>();
        String[] str ={"S","H","C","D"};

        for(int i=0;i<str.length;i++){
        	for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	}
        }
        for(int i=0;i<a;i++){
        	String x =sc.nextLine();
            array.remove(x);
        }

        for(int i=0;i<array.size();i++){
            System.out.println(array.get(i));
        }
        }


    } import java.io.IOException; IOException java.io import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main (String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        StringBuffer sb = new StringBuffer();
        int a = Integer.parseInt(sc.nextLine());
        //String x =sc.nextLine();
        ArrayList<String> array = new ArrayList<String>();
        String[] str ={"S","H","C","D"};

        for(int i=0;i<str.length;i++){
        	for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	}
        }
        for(int i=0;i<a;i++){
        	String x =sc.nextLine();
            array.remove(x);
        }

        for(int i=0;i<array.size();i++){
            System.out.println(array.get(i));
        }
        }


    } Main public static void main (String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        StringBuffer sb = new StringBuffer();
        int a = Integer.parseInt(sc.nextLine());
        //String x =sc.nextLine();
        ArrayList<String> array = new ArrayList<String>();
        String[] str ={"S","H","C","D"};

        for(int i=0;i<str.length;i++){
        	for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	}
        }
        for(int i=0;i<a;i++){
        	String x =sc.nextLine();
            array.remove(x);
        }

        for(int i=0;i<array.size();i++){
            System.out.println(array.get(i));
        }
        } main {
        Scanner sc = new Scanner(System.in);
        StringBuffer sb = new StringBuffer();
        int a = Integer.parseInt(sc.nextLine());
        //String x =sc.nextLine();
        ArrayList<String> array = new ArrayList<String>();
        String[] str ={"S","H","C","D"};

        for(int i=0;i<str.length;i++){
        	for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	}
        }
        for(int i=0;i<a;i++){
        	String x =sc.nextLine();
            array.remove(x);
        }

        for(int i=0;i<array.size();i++){
            System.out.println(array.get(i));
        }
        } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringBuffer sb = new StringBuffer(); sb new StringBuffer() int a = Integer.parseInt(sc.nextLine()); a Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc ArrayList<String> array = new ArrayList<String>(); array new ArrayList<String>() String[] str ={"S","H","C","D"}; str {"S","H","C","D"} "S" "H" "C" "D" for(int i=0;i<str.length;i++){
        	for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	}
        } int i=0; int i=0; i 0 i<str.length i str.length str str.length i++ i++ i {
        	for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	}
        } {
        	for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	}
        } for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	} int b=1; int b=1; b 1 b<=13 b 13 b++ b++ b {
        	array.add(str[i]+" "+ b);
        	} {
        	array.add(str[i]+" "+ b);
        	} array.add(str[i]+" "+ b) array.add array str[i]+" "+ b str[i]+" "+ b str[i] str i " " b for(int i=0;i<a;i++){
        	String x =sc.nextLine();
            array.remove(x);
        } int i=0; int i=0; i 0 i<a i a i++ i++ i {
        	String x =sc.nextLine();
            array.remove(x);
        } {
        	String x =sc.nextLine();
            array.remove(x);
        } String x =sc.nextLine(); x sc.nextLine() sc.nextLine sc array.remove(x) array.remove array x for(int i=0;i<array.size();i++){
            System.out.println(array.get(i));
        } int i=0; int i=0; i 0 i<array.size() i array.size() array.size array i++ i++ i {
            System.out.println(array.get(i));
        } {
            System.out.println(array.get(i));
        } System.out.println(array.get(i)) System.out.println System.out System System.out array.get(i) array.get array i String args[] args public class Main {
    public static void main (String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        StringBuffer sb = new StringBuffer();
        int a = Integer.parseInt(sc.nextLine());
        //String x =sc.nextLine();
        ArrayList<String> array = new ArrayList<String>();
        String[] str ={"S","H","C","D"};

        for(int i=0;i<str.length;i++){
        	for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	}
        }
        for(int i=0;i<a;i++){
        	String x =sc.nextLine();
            array.remove(x);
        }

        for(int i=0;i<array.size();i++){
            System.out.println(array.get(i));
        }
        }


    } public class Main {
    public static void main (String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        StringBuffer sb = new StringBuffer();
        int a = Integer.parseInt(sc.nextLine());
        //String x =sc.nextLine();
        ArrayList<String> array = new ArrayList<String>();
        String[] str ={"S","H","C","D"};

        for(int i=0;i<str.length;i++){
        	for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	}
        }
        for(int i=0;i<a;i++){
        	String x =sc.nextLine();
            array.remove(x);
        }

        for(int i=0;i<array.size();i++){
            System.out.println(array.get(i));
        }
        }


    } Main
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
    public static void main (String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        StringBuffer sb = new StringBuffer();
        int a = Integer.parseInt(sc.nextLine());
        //String x =sc.nextLine();
        ArrayList<String> array = new ArrayList<String>();
        String[] str ={"S","H","C","D"};

        for(int i=0;i<str.length;i++){
        	for(int b=1;b<=13;b++){
        	array.add(str[i]+" "+ b);
        	}
        }
        for(int i=0;i<a;i++){
        	String x =sc.nextLine();
            array.remove(x);
        }

        for(int i=0;i<array.size();i++){
            System.out.println(array.get(i));
        }
        }


    }