import java.io.*;
import java.util.*;

class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] suits=new char[]{'S','H','C','D'};
        Card[] cards=new Card[52];
        boolean[] flag=new boolean[52];
        Arrays.fill(flag, false);
        int cards_count=0;
        for(char c:suits){
            for(int i=1;i<=13;i++){
                cards[cards_count]=new Card(c,i);
                cards_count++;
            }
        }
        int n=Integer.parseInt(br.readLine());
        for(int i=0;i<n;i++){
            StringTokenizer st=new StringTokenizer(br.readLine());
            char suit=st.nextToken().charAt(0);
            int number=Integer.parseInt(st.nextToken());
            for(int j=0;j<52;j++){
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            }
        }
        for(int i=0;i<52;i++){
            if(!flag[i]){
                System.out.println(cards[i].suit+" "+cards[i].number);
            }
        }
    }
    
}

class Card{
    char suit;
    int number;
    Card(char s,int n){
        this.suit=s;
        this.number=n;
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] suits=new char[]{'S','H','C','D'};
        Card[] cards=new Card[52];
        boolean[] flag=new boolean[52];
        Arrays.fill(flag, false);
        int cards_count=0;
        for(char c:suits){
            for(int i=1;i<=13;i++){
                cards[cards_count]=new Card(c,i);
                cards_count++;
            }
        }
        int n=Integer.parseInt(br.readLine());
        for(int i=0;i<n;i++){
            StringTokenizer st=new StringTokenizer(br.readLine());
            char suit=st.nextToken().charAt(0);
            int number=Integer.parseInt(st.nextToken());
            for(int j=0;j<52;j++){
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            }
        }
        for(int i=0;i<52;i++){
            if(!flag[i]){
                System.out.println(cards[i].suit+" "+cards[i].number);
            }
        }
    }
    
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] suits=new char[]{'S','H','C','D'};
        Card[] cards=new Card[52];
        boolean[] flag=new boolean[52];
        Arrays.fill(flag, false);
        int cards_count=0;
        for(char c:suits){
            for(int i=1;i<=13;i++){
                cards[cards_count]=new Card(c,i);
                cards_count++;
            }
        }
        int n=Integer.parseInt(br.readLine());
        for(int i=0;i<n;i++){
            StringTokenizer st=new StringTokenizer(br.readLine());
            char suit=st.nextToken().charAt(0);
            int number=Integer.parseInt(st.nextToken());
            for(int j=0;j<52;j++){
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            }
        }
        for(int i=0;i<52;i++){
            if(!flag[i]){
                System.out.println(cards[i].suit+" "+cards[i].number);
            }
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] suits=new char[]{'S','H','C','D'};
        Card[] cards=new Card[52];
        boolean[] flag=new boolean[52];
        Arrays.fill(flag, false);
        int cards_count=0;
        for(char c:suits){
            for(int i=1;i<=13;i++){
                cards[cards_count]=new Card(c,i);
                cards_count++;
            }
        }
        int n=Integer.parseInt(br.readLine());
        for(int i=0;i<n;i++){
            StringTokenizer st=new StringTokenizer(br.readLine());
            char suit=st.nextToken().charAt(0);
            int number=Integer.parseInt(st.nextToken());
            for(int j=0;j<52;j++){
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            }
        }
        for(int i=0;i<52;i++){
            if(!flag[i]){
                System.out.println(cards[i].suit+" "+cards[i].number);
            }
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char[] suits=new char[]{'S','H','C','D'}; suits new char[]{'S','H','C','D'} Card[] cards=new Card[52]; cards new Card[52] 52 boolean[] flag=new boolean[52]; flag new boolean[52] 52 Arrays.fill(flag, false) Arrays.fill Arrays flag false int cards_count=0; cards_count 0 for(char c:suits){
            for(int i=1;i<=13;i++){
                cards[cards_count]=new Card(c,i);
                cards_count++;
            }
        } char c suits {
            for(int i=1;i<=13;i++){
                cards[cards_count]=new Card(c,i);
                cards_count++;
            }
        } {
            for(int i=1;i<=13;i++){
                cards[cards_count]=new Card(c,i);
                cards_count++;
            }
        } for(int i=1;i<=13;i++){
                cards[cards_count]=new Card(c,i);
                cards_count++;
            } int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
                cards[cards_count]=new Card(c,i);
                cards_count++;
            } {
                cards[cards_count]=new Card(c,i);
                cards_count++;
            } cards[cards_count]=new Card(c,i) cards[cards_count] cards cards_count new Card(c,i) cards_count++ cards_count int n=Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i=0;i<n;i++){
            StringTokenizer st=new StringTokenizer(br.readLine());
            char suit=st.nextToken().charAt(0);
            int number=Integer.parseInt(st.nextToken());
            for(int j=0;j<52;j++){
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            StringTokenizer st=new StringTokenizer(br.readLine());
            char suit=st.nextToken().charAt(0);
            int number=Integer.parseInt(st.nextToken());
            for(int j=0;j<52;j++){
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            }
        } {
            StringTokenizer st=new StringTokenizer(br.readLine());
            char suit=st.nextToken().charAt(0);
            int number=Integer.parseInt(st.nextToken());
            for(int j=0;j<52;j++){
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            }
        } StringTokenizer st=new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) char suit=st.nextToken().charAt(0); suit st.nextToken().charAt(0) st.nextToken().charAt st.nextToken() st.nextToken st 0 int number=Integer.parseInt(st.nextToken()); number Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st for(int j=0;j<52;j++){
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            } int j=0; int j=0; j 0 j<52 j 52 j++ j++ j {
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            } {
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            } if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                } cards[j].number==number&&cards[j].suit==suit cards[j].number==number cards[j].number cards[j] cards j cards[j].number number cards[j].suit==suit cards[j].suit cards[j] cards j cards[j].suit suit {
                    flag[j]=true;
                } flag[j]=true flag[j] flag j true for(int i=0;i<52;i++){
            if(!flag[i]){
                System.out.println(cards[i].suit+" "+cards[i].number);
            }
        } int i=0; int i=0; i 0 i<52 i 52 i++ i++ i {
            if(!flag[i]){
                System.out.println(cards[i].suit+" "+cards[i].number);
            }
        } {
            if(!flag[i]){
                System.out.println(cards[i].suit+" "+cards[i].number);
            }
        } if(!flag[i]){
                System.out.println(cards[i].suit+" "+cards[i].number);
            } !flag[i] flag[i] flag i {
                System.out.println(cards[i].suit+" "+cards[i].number);
            } System.out.println(cards[i].suit+" "+cards[i].number) System.out.println System.out System System.out cards[i].suit+" "+cards[i].number cards[i].suit+" "+cards[i].number cards[i].suit cards[i] cards i cards[i].suit " " cards[i].number cards[i] cards i cards[i].number String[] args args class Card{
    char suit;
    int number;
    Card(char s,int n){
        this.suit=s;
        this.number=n;
    }
} Card char suit; suit int number; number Card(char s,int n){
        this.suit=s;
        this.number=n;
    } Card {
        this.suit=s;
        this.number=n;
    } this.suit=s this.suit this this.suit s this.number=n this.number this this.number n char s s int n n
import java.io.*;
import java.util.*;

class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] suits=new char[]{'S','H','C','D'};
        Card[] cards=new Card[52];
        boolean[] flag=new boolean[52];
        Arrays.fill(flag, false);
        int cards_count=0;
        for(char c:suits){
            for(int i=1;i<=13;i++){
                cards[cards_count]=new Card(c,i);
                cards_count++;
            }
        }
        int n=Integer.parseInt(br.readLine());
        for(int i=0;i<n;i++){
            StringTokenizer st=new StringTokenizer(br.readLine());
            char suit=st.nextToken().charAt(0);
            int number=Integer.parseInt(st.nextToken());
            for(int j=0;j<52;j++){
                if(cards[j].number==number&&cards[j].suit==suit){
                    flag[j]=true;
                }
            }
        }
        for(int i=0;i<52;i++){
            if(!flag[i]){
                System.out.println(cards[i].suit+" "+cards[i].number);
            }
        }
    }
    
}

class Card{
    char suit;
    int number;
    Card(char s,int n){
        this.suit=s;
        this.number=n;
    }
}