import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        if(n==52) return;
        boolean a[] = new boolean[52];
        String str[] = new String[2];
        for(int i=n;i>0;i--){
            str = br.readLine().split(" ");
            switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i=0;i<52;i++){
            if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            }
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        if(n==52) return;
        boolean a[] = new boolean[52];
        String str[] = new String[2];
        for(int i=n;i>0;i--){
            str = br.readLine().split(" ");
            switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i=0;i<52;i++){
            if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            }
        }
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        if(n==52) return;
        boolean a[] = new boolean[52];
        String str[] = new String[2];
        for(int i=n;i>0;i--){
            str = br.readLine().split(" ");
            switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i=0;i<52;i++){
            if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            }
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        if(n==52) return;
        boolean a[] = new boolean[52];
        String str[] = new String[2];
        for(int i=n;i>0;i--){
            str = br.readLine().split(" ");
            switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i=0;i<52;i++){
            if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            }
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(n==52) return; n==52 n 52 return; boolean a[] = new boolean[52]; a new boolean[52] 52 String str[] = new String[2]; str new String[2] 2 for(int i=n;i>0;i--){
            str = br.readLine().split(" ");
            switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            }
        } int i=n; int i=n; i n i>0 i 0 i-- i-- i {
            str = br.readLine().split(" ");
            switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            }
        } {
            str = br.readLine().split(" ");
            switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            }
        } str = br.readLine().split(" ") str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            } str[0] str 0 case "S": "S" case "S": a[Integer.parseInt(str[1])-1] = true a[Integer.parseInt(str[1])-1] a Integer.parseInt(str[1])-1 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 1 true break; case "H": "H" case "H": a[Integer.parseInt(str[1])-1+13] = true a[Integer.parseInt(str[1])-1+13] a Integer.parseInt(str[1])-1+13 Integer.parseInt(str[1])-1 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 1 13 true break; case "C": "C" case "C": a[Integer.parseInt(str[1])-1+26] = true a[Integer.parseInt(str[1])-1+26] a Integer.parseInt(str[1])-1+26 Integer.parseInt(str[1])-1 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 1 26 true break; case "D": "D" case "D": a[Integer.parseInt(str[1])-1+39] = true a[Integer.parseInt(str[1])-1+39] a Integer.parseInt(str[1])-1+39 Integer.parseInt(str[1])-1 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 1 39 true break; default: default: break; for(int i=0;i<52;i++){
            if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            }
        } int i=0; int i=0; i 0 i<52 i 52 i++ i++ i {
            if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            }
        } {
            if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            }
        } if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            } a[i]==false a[i] a i false {
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            } if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39)); i<13 i 13 System.out.println("S "+(i+1)) System.out.println System.out System System.out "S "+(i+1) "S " (i+1) i 1 if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39)); i<26 i 26 System.out.println("H "+(i+1-13)) System.out.println System.out System System.out "H "+(i+1-13) "H " (i+1-13) i+1 i 1 13 if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39)); i<39 i 39 System.out.println("C "+(i+1-26)) System.out.println System.out System System.out "C "+(i+1-26) "C " (i+1-26) i+1 i 1 26 System.out.println("D "+(i+1-39)) System.out.println System.out System System.out "D "+(i+1-39) "D " (i+1-39) i+1 i 1 39 String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        if(n==52) return;
        boolean a[] = new boolean[52];
        String str[] = new String[2];
        for(int i=n;i>0;i--){
            str = br.readLine().split(" ");
            switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i=0;i<52;i++){
            if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        if(n==52) return;
        boolean a[] = new boolean[52];
        String str[] = new String[2];
        for(int i=n;i>0;i--){
            str = br.readLine().split(" ");
            switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i=0;i<52;i++){
            if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            }
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        if(n==52) return;
        boolean a[] = new boolean[52];
        String str[] = new String[2];
        for(int i=n;i>0;i--){
            str = br.readLine().split(" ");
            switch(str[0]){
                case "S":
                    a[Integer.parseInt(str[1])-1] = true;
                    break;
                case "H":
                    a[Integer.parseInt(str[1])-1+13] = true;
                    break;
                case "C":
                    a[Integer.parseInt(str[1])-1+26] = true;
                    break;
                case "D":
                    a[Integer.parseInt(str[1])-1+39] = true;
                    break;
                default:
                    break;
            }
        }
        for(int i=0;i<52;i++){
            if(a[i]==false){
                if(i<13) System.out.println("S "+(i+1));
                else if(i<26) System.out.println("H "+(i+1-13));
                else if(i<39) System.out.println("C "+(i+1-26));
                else  System.out.println("D "+(i+1-39));
            }
        }
    }
}