import java.util.Scanner;
class Main{
    int n,x,y;
    public void solve(){
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\\s");
        n = sc.nextInt();
        int a[][] = new int [14][4];
        for(x = 0; x < 13; x++){
            for(y = 0; y < 4; y++){
                a[x][y] = 0;
            }
        }
        for(x = 0; x < n; x++){
            String b = sc.next();
            int c = sc.nextInt();
            if(b.equals("S")){
                a[c][0] = c;
            }else if(b.equals("H")){
                a[c][1] = c;
            }else if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            }
        }
        for(y = 0; y < 4; y++){
            for(x = 1; x < 14; x++){
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            }
         }
    }
    public static void main(String[] args){
        new Main().solve();
    }
} import java.util.Scanner; Scanner java.util class Main{
    int n,x,y;
    public void solve(){
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\\s");
        n = sc.nextInt();
        int a[][] = new int [14][4];
        for(x = 0; x < 13; x++){
            for(y = 0; y < 4; y++){
                a[x][y] = 0;
            }
        }
        for(x = 0; x < n; x++){
            String b = sc.next();
            int c = sc.nextInt();
            if(b.equals("S")){
                a[c][0] = c;
            }else if(b.equals("H")){
                a[c][1] = c;
            }else if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            }
        }
        for(y = 0; y < 4; y++){
            for(x = 1; x < 14; x++){
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            }
         }
    }
    public static void main(String[] args){
        new Main().solve();
    }
} Main int n n x x y; y public void solve(){
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\\s");
        n = sc.nextInt();
        int a[][] = new int [14][4];
        for(x = 0; x < 13; x++){
            for(y = 0; y < 4; y++){
                a[x][y] = 0;
            }
        }
        for(x = 0; x < n; x++){
            String b = sc.next();
            int c = sc.nextInt();
            if(b.equals("S")){
                a[c][0] = c;
            }else if(b.equals("H")){
                a[c][1] = c;
            }else if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            }
        }
        for(y = 0; y < 4; y++){
            for(x = 1; x < 14; x++){
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            }
         }
    } solve {
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\\s");
        n = sc.nextInt();
        int a[][] = new int [14][4];
        for(x = 0; x < 13; x++){
            for(y = 0; y < 4; y++){
                a[x][y] = 0;
            }
        }
        for(x = 0; x < n; x++){
            String b = sc.next();
            int c = sc.nextInt();
            if(b.equals("S")){
                a[c][0] = c;
            }else if(b.equals("H")){
                a[c][1] = c;
            }else if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            }
        }
        for(y = 0; y < 4; y++){
            for(x = 1; x < 14; x++){
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            }
         }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) sc.useDelimiter("\\s") sc.useDelimiter sc "\\s" n = sc.nextInt() n sc.nextInt() sc.nextInt sc int a[][] = new int [14][4]; a new int [14][4] 14 4 for(x = 0; x < 13; x++){
            for(y = 0; y < 4; y++){
                a[x][y] = 0;
            }
        } x = 0; x = 0 x 0 x < 13 x 13 x++ x++ x {
            for(y = 0; y < 4; y++){
                a[x][y] = 0;
            }
        } {
            for(y = 0; y < 4; y++){
                a[x][y] = 0;
            }
        } for(y = 0; y < 4; y++){
                a[x][y] = 0;
            } y = 0; y = 0 y 0 y < 4 y 4 y++ y++ y {
                a[x][y] = 0;
            } {
                a[x][y] = 0;
            } a[x][y] = 0 a[x][y] a[x] a x y 0 for(x = 0; x < n; x++){
            String b = sc.next();
            int c = sc.nextInt();
            if(b.equals("S")){
                a[c][0] = c;
            }else if(b.equals("H")){
                a[c][1] = c;
            }else if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            }
        } x = 0; x = 0 x 0 x < n x n x++ x++ x {
            String b = sc.next();
            int c = sc.nextInt();
            if(b.equals("S")){
                a[c][0] = c;
            }else if(b.equals("H")){
                a[c][1] = c;
            }else if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            }
        } {
            String b = sc.next();
            int c = sc.nextInt();
            if(b.equals("S")){
                a[c][0] = c;
            }else if(b.equals("H")){
                a[c][1] = c;
            }else if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            }
        } String b = sc.next(); b sc.next() sc.next sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc if(b.equals("S")){
                a[c][0] = c;
            }else if(b.equals("H")){
                a[c][1] = c;
            }else if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            } b.equals("S") b.equals b "S" {
                a[c][0] = c;
            } a[c][0] = c a[c][0] a[c] a c 0 c if(b.equals("H")){
                a[c][1] = c;
            }else if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            } b.equals("H") b.equals b "H" {
                a[c][1] = c;
            } a[c][1] = c a[c][1] a[c] a c 1 c if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            } b.equals("C") b.equals b "C" {
                a[c][2] = c;
            } a[c][2] = c a[c][2] a[c] a c 2 c if(b.equals("D")){
                a[c][3] = c;
            } b.equals("D") b.equals b "D" {
                a[c][3] = c;
            } a[c][3] = c a[c][3] a[c] a c 3 c for(y = 0; y < 4; y++){
            for(x = 1; x < 14; x++){
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            }
         } y = 0; y = 0 y 0 y < 4 y 4 y++ y++ y {
            for(x = 1; x < 14; x++){
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            }
         } {
            for(x = 1; x < 14; x++){
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            }
         } for(x = 1; x < 14; x++){
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            } x = 1; x = 1 x 1 x < 14 x 14 x++ x++ x {
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            } {
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            } if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                } a[x][y] == 0 && y == 0 a[x][y] == 0 a[x][y] a[x] a x y 0 y == 0 y 0 {
                    System.out.println("S " + x);
                } System.out.println("S " + x) System.out.println System.out System System.out "S " + x "S " x if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                } a[x][y] == 0 && y == 1 a[x][y] == 0 a[x][y] a[x] a x y 0 y == 1 y 1 {
                    System.out.println("H " + x);
                } System.out.println("H " + x) System.out.println System.out System System.out "H " + x "H " x if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                } a[x][y] == 0 && y == 2 a[x][y] == 0 a[x][y] a[x] a x y 0 y == 2 y 2 {
                    System.out.println("C " + x);
                } System.out.println("C " + x) System.out.println System.out System System.out "C " + x "C " x if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                } a[x][y] == 0 && y == 3 a[x][y] == 0 a[x][y] a[x] a x y 0 y == 3 y 3 {
                    System.out.println("D " + x);
                } System.out.println("D " + x) System.out.println System.out System System.out "D " + x "D " x {
                    continue;
                } continue; public static void main(String[] args){
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args
import java.util.Scanner;
class Main{
    int n,x,y;
    public void solve(){
        Scanner sc = new Scanner(System.in);
        sc.useDelimiter("\\s");
        n = sc.nextInt();
        int a[][] = new int [14][4];
        for(x = 0; x < 13; x++){
            for(y = 0; y < 4; y++){
                a[x][y] = 0;
            }
        }
        for(x = 0; x < n; x++){
            String b = sc.next();
            int c = sc.nextInt();
            if(b.equals("S")){
                a[c][0] = c;
            }else if(b.equals("H")){
                a[c][1] = c;
            }else if(b.equals("C")){
                a[c][2] = c;
            }else if(b.equals("D")){
                a[c][3] = c;
            }
        }
        for(y = 0; y < 4; y++){
            for(x = 1; x < 14; x++){
                if(a[x][y] == 0 && y == 0){
                    System.out.println("S " + x);
                }else if(a[x][y] == 0 && y == 1){
                    System.out.println("H " + x);
                }else if(a[x][y] == 0 && y == 2){
                    System.out.println("C " + x);
                }else if(a[x][y] == 0 && y == 3){
                    System.out.println("D " + x);
                }else{
                    continue;
                }
            }
         }
    }
    public static void main(String[] args){
        new Main().solve();
    }
}