import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        boolean[] s = new boolean[13],h = new boolean[13],c = new boolean[13],d = new boolean[13];
        int n = sc.nextInt();
        for(int i = 0;i < n;++i){
            switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i = 0;i < 13;++i){
            if(!s[i]) System.out.printf("S %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!h[i]) System.out.printf("H %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!c[i]) System.out.printf("C %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!d[i]) System.out.printf("D %d\n",i + 1);
        }
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        boolean[] s = new boolean[13],h = new boolean[13],c = new boolean[13],d = new boolean[13];
        int n = sc.nextInt();
        for(int i = 0;i < n;++i){
            switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i = 0;i < 13;++i){
            if(!s[i]) System.out.printf("S %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!h[i]) System.out.printf("H %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!c[i]) System.out.printf("C %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!d[i]) System.out.printf("D %d\n",i + 1);
        }
    }

} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        boolean[] s = new boolean[13],h = new boolean[13],c = new boolean[13],d = new boolean[13];
        int n = sc.nextInt();
        for(int i = 0;i < n;++i){
            switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i = 0;i < 13;++i){
            if(!s[i]) System.out.printf("S %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!h[i]) System.out.printf("H %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!c[i]) System.out.printf("C %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!d[i]) System.out.printf("D %d\n",i + 1);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        boolean[] s = new boolean[13],h = new boolean[13],c = new boolean[13],d = new boolean[13];
        int n = sc.nextInt();
        for(int i = 0;i < n;++i){
            switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i = 0;i < 13;++i){
            if(!s[i]) System.out.printf("S %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!h[i]) System.out.printf("H %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!c[i]) System.out.printf("C %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!d[i]) System.out.printf("D %d\n",i + 1);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) boolean[] s = new boolean[13] s new boolean[13] 13 h = new boolean[13] h new boolean[13] 13 c = new boolean[13] c new boolean[13] 13 d = new boolean[13]; d new boolean[13] 13 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int i = 0;i < n;++i){
            switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            }
        } int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
            switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            }
        } {
            switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            }
        } switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            } sc.next() sc.next sc case "S": "S" case "S": s[sc.nextInt() - 1] = true s[sc.nextInt() - 1] s sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 true break; case "H": "H" case "H": h[sc.nextInt() - 1] = true h[sc.nextInt() - 1] h sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 true break; case "C": "C" case "C": c[sc.nextInt() - 1] = true c[sc.nextInt() - 1] c sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 true break; case "D": "D" case "D": d[sc.nextInt() - 1] = true d[sc.nextInt() - 1] d sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 true break; default: default: break; for(int i = 0;i < 13;++i){
            if(!s[i]) System.out.printf("S %d\n",i + 1);
        } int i = 0; int i = 0; i 0 i < 13 i 13 ++i ++i i {
            if(!s[i]) System.out.printf("S %d\n",i + 1);
        } {
            if(!s[i]) System.out.printf("S %d\n",i + 1);
        } if(!s[i]) System.out.printf("S %d\n",i + 1); !s[i] s[i] s i System.out.printf("S %d\n",i + 1) System.out.printf System.out System System.out "S %d\n" i + 1 i 1 for(int i = 0;i < 13;++i){
            if(!h[i]) System.out.printf("H %d\n",i + 1);
        } int i = 0; int i = 0; i 0 i < 13 i 13 ++i ++i i {
            if(!h[i]) System.out.printf("H %d\n",i + 1);
        } {
            if(!h[i]) System.out.printf("H %d\n",i + 1);
        } if(!h[i]) System.out.printf("H %d\n",i + 1); !h[i] h[i] h i System.out.printf("H %d\n",i + 1) System.out.printf System.out System System.out "H %d\n" i + 1 i 1 for(int i = 0;i < 13;++i){
            if(!c[i]) System.out.printf("C %d\n",i + 1);
        } int i = 0; int i = 0; i 0 i < 13 i 13 ++i ++i i {
            if(!c[i]) System.out.printf("C %d\n",i + 1);
        } {
            if(!c[i]) System.out.printf("C %d\n",i + 1);
        } if(!c[i]) System.out.printf("C %d\n",i + 1); !c[i] c[i] c i System.out.printf("C %d\n",i + 1) System.out.printf System.out System System.out "C %d\n" i + 1 i 1 for(int i = 0;i < 13;++i){
            if(!d[i]) System.out.printf("D %d\n",i + 1);
        } int i = 0; int i = 0; i 0 i < 13 i 13 ++i ++i i {
            if(!d[i]) System.out.printf("D %d\n",i + 1);
        } {
            if(!d[i]) System.out.printf("D %d\n",i + 1);
        } if(!d[i]) System.out.printf("D %d\n",i + 1); !d[i] d[i] d i System.out.printf("D %d\n",i + 1) System.out.printf System.out System System.out "D %d\n" i + 1 i 1 String[] args args public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        boolean[] s = new boolean[13],h = new boolean[13],c = new boolean[13],d = new boolean[13];
        int n = sc.nextInt();
        for(int i = 0;i < n;++i){
            switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i = 0;i < 13;++i){
            if(!s[i]) System.out.printf("S %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!h[i]) System.out.printf("H %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!c[i]) System.out.printf("C %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!d[i]) System.out.printf("D %d\n",i + 1);
        }
    }

} public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        boolean[] s = new boolean[13],h = new boolean[13],c = new boolean[13],d = new boolean[13];
        int n = sc.nextInt();
        for(int i = 0;i < n;++i){
            switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i = 0;i < 13;++i){
            if(!s[i]) System.out.printf("S %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!h[i]) System.out.printf("H %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!c[i]) System.out.printf("C %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!d[i]) System.out.printf("D %d\n",i + 1);
        }
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        boolean[] s = new boolean[13],h = new boolean[13],c = new boolean[13],d = new boolean[13];
        int n = sc.nextInt();
        for(int i = 0;i < n;++i){
            switch(sc.next()){
                case "S":
                    s[sc.nextInt() - 1] = true;
                    break;
                case "H":
                    h[sc.nextInt() - 1] = true;
                    break;
                case "C":
                    c[sc.nextInt() - 1] = true;
                    break;
                case "D":
                    d[sc.nextInt() - 1] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i = 0;i < 13;++i){
            if(!s[i]) System.out.printf("S %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!h[i]) System.out.printf("H %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!c[i]) System.out.printf("C %d\n",i + 1);
        }
        for(int i = 0;i < 13;++i){
            if(!d[i]) System.out.printf("D %d\n",i + 1);
        }
    }

}