import java.util.*;
import java.text.*;

class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean [][] has = new boolean[4][13];
        HashMap<String, Integer> map = new HashMap<String, Integer>();
        String [] ss = new String [] {"S", "H", "C", "D"};
        for(int i = 0; i < ss.length; i++) {
            map.put(ss[i], i);
        }
        for(int i = 0; i < n; i++) {
            String s = sc.next();
            int k = sc.nextInt();
            has[map.get(s)][k-1] = true;
        }
        for(int i = 0; i < 4; i++) {
            for(int k = 0; k < 13; k++) {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            }
        }
    }
} import java.util.*; util.* java import java.text.*; text.* java class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean [][] has = new boolean[4][13];
        HashMap<String, Integer> map = new HashMap<String, Integer>();
        String [] ss = new String [] {"S", "H", "C", "D"};
        for(int i = 0; i < ss.length; i++) {
            map.put(ss[i], i);
        }
        for(int i = 0; i < n; i++) {
            String s = sc.next();
            int k = sc.nextInt();
            has[map.get(s)][k-1] = true;
        }
        for(int i = 0; i < 4; i++) {
            for(int k = 0; k < 13; k++) {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            }
        }
    }
} Main public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean [][] has = new boolean[4][13];
        HashMap<String, Integer> map = new HashMap<String, Integer>();
        String [] ss = new String [] {"S", "H", "C", "D"};
        for(int i = 0; i < ss.length; i++) {
            map.put(ss[i], i);
        }
        for(int i = 0; i < n; i++) {
            String s = sc.next();
            int k = sc.nextInt();
            has[map.get(s)][k-1] = true;
        }
        for(int i = 0; i < 4; i++) {
            for(int k = 0; k < 13; k++) {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean [][] has = new boolean[4][13];
        HashMap<String, Integer> map = new HashMap<String, Integer>();
        String [] ss = new String [] {"S", "H", "C", "D"};
        for(int i = 0; i < ss.length; i++) {
            map.put(ss[i], i);
        }
        for(int i = 0; i < n; i++) {
            String s = sc.next();
            int k = sc.nextInt();
            has[map.get(s)][k-1] = true;
        }
        for(int i = 0; i < 4; i++) {
            for(int k = 0; k < 13; k++) {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean [][] has = new boolean[4][13]; has new boolean[4][13] 4 13 HashMap<String, Integer> map = new HashMap<String, Integer>(); map new HashMap<String, Integer>() String [] ss = new String [] {"S", "H", "C", "D"}; ss new String [] {"S", "H", "C", "D"} for(int i = 0; i < ss.length; i++) {
            map.put(ss[i], i);
        } int i = 0; int i = 0; i 0 i < ss.length i ss.length ss ss.length i++ i++ i {
            map.put(ss[i], i);
        } {
            map.put(ss[i], i);
        } map.put(ss[i], i) map.put map ss[i] ss i i for(int i = 0; i < n; i++) {
            String s = sc.next();
            int k = sc.nextInt();
            has[map.get(s)][k-1] = true;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String s = sc.next();
            int k = sc.nextInt();
            has[map.get(s)][k-1] = true;
        } {
            String s = sc.next();
            int k = sc.nextInt();
            has[map.get(s)][k-1] = true;
        } String s = sc.next(); s sc.next() sc.next sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc has[map.get(s)][k-1] = true has[map.get(s)][k-1] has[map.get(s)] has map.get(s) map.get map s k-1 k 1 true for(int i = 0; i < 4; i++) {
            for(int k = 0; k < 13; k++) {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            }
        } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
            for(int k = 0; k < 13; k++) {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            }
        } {
            for(int k = 0; k < 13; k++) {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            }
        } for(int k = 0; k < 13; k++) {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            } int k = 0; int k = 0; k 0 k < 13 k 13 k++ k++ k {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            } {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            } if(!has[i][k]) System.out.println(ss[i] + " " + (k+1)); !has[i][k] has[i][k] has[i] has i k System.out.println(ss[i] + " " + (k+1)) System.out.println System.out System System.out ss[i] + " " + (k+1) ss[i] + " " + (k+1) ss[i] ss i " " (k+1) k 1 String[]args args
import java.util.*;
import java.text.*;

class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean [][] has = new boolean[4][13];
        HashMap<String, Integer> map = new HashMap<String, Integer>();
        String [] ss = new String [] {"S", "H", "C", "D"};
        for(int i = 0; i < ss.length; i++) {
            map.put(ss[i], i);
        }
        for(int i = 0; i < n; i++) {
            String s = sc.next();
            int k = sc.nextInt();
            has[map.get(s)][k-1] = true;
        }
        for(int i = 0; i < 4; i++) {
            for(int k = 0; k < 13; k++) {
                if(!has[i][k]) System.out.println(ss[i] + " " + (k+1));
            }
        }
    }
}