import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        boolean cards[][];
        cards=new boolean[4][13];
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            }
        }

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        while(n-->0){
            int tmp;
            String str=sc.next();
            int rank=sc.nextInt();
            if(str.equals("S"))tmp=0;
            else if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break;
            if(rank<1&&13<rank)break;
            rank--;
            cards[tmp][rank]=true;
        }
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            }
        }
    }
}
 import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        boolean cards[][];
        cards=new boolean[4][13];
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            }
        }

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        while(n-->0){
            int tmp;
            String str=sc.next();
            int rank=sc.nextInt();
            if(str.equals("S"))tmp=0;
            else if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break;
            if(rank<1&&13<rank)break;
            rank--;
            cards[tmp][rank]=true;
        }
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            }
        }
    }
} Main public static void main(String[] args){
        boolean cards[][];
        cards=new boolean[4][13];
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            }
        }

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        while(n-->0){
            int tmp;
            String str=sc.next();
            int rank=sc.nextInt();
            if(str.equals("S"))tmp=0;
            else if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break;
            if(rank<1&&13<rank)break;
            rank--;
            cards[tmp][rank]=true;
        }
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            }
        }
    } main {
        boolean cards[][];
        cards=new boolean[4][13];
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            }
        }

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        while(n-->0){
            int tmp;
            String str=sc.next();
            int rank=sc.nextInt();
            if(str.equals("S"))tmp=0;
            else if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break;
            if(rank<1&&13<rank)break;
            rank--;
            cards[tmp][rank]=true;
        }
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            }
        }
    } boolean cards[][]; cards cards=new boolean[4][13] cards new boolean[4][13] 4 13 for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            }
        } int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
            for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            }
        } {
            for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            }
        } for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            } int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
                cards[i][j]=false;
            } {
                cards[i][j]=false;
            } cards[i][j]=false cards[i][j] cards[i] cards i j false Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc while(n-->0){
            int tmp;
            String str=sc.next();
            int rank=sc.nextInt();
            if(str.equals("S"))tmp=0;
            else if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break;
            if(rank<1&&13<rank)break;
            rank--;
            cards[tmp][rank]=true;
        } n-->0 n-- n 0 {
            int tmp;
            String str=sc.next();
            int rank=sc.nextInt();
            if(str.equals("S"))tmp=0;
            else if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break;
            if(rank<1&&13<rank)break;
            rank--;
            cards[tmp][rank]=true;
        } int tmp; tmp String str=sc.next(); str sc.next() sc.next sc int rank=sc.nextInt(); rank sc.nextInt() sc.nextInt sc if(str.equals("S"))tmp=0;
            else if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break; str.equals("S") str.equals str "S" tmp=0 tmp 0 if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break; str.equals("H") str.equals str "H" tmp=1 tmp 1 if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break; str.equals("C") str.equals str "C" tmp=2 tmp 2 if(str.equals("D"))tmp=3;
            else break; str.equals("D") str.equals str "D" tmp=3 tmp 3 break; if(rank<1&&13<rank)break; rank<1&&13<rank rank<1 rank 1 13<rank 13 rank break; rank-- rank cards[tmp][rank]=true cards[tmp][rank] cards[tmp] cards tmp rank true for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            }
        } int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
            for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            }
        } {
            for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            }
        } for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            } int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            } {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            } if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                } !cards[i][j] cards[i][j] cards[i] cards i j {
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                } if(i==0)System.out.print("S "); i==0 i 0 System.out.print("S ") System.out.print System.out System System.out "S " if(i==1)System.out.print("H "); i==1 i 1 System.out.print("H ") System.out.print System.out System System.out "H " if(i==2)System.out.print("C "); i==2 i 2 System.out.print("C ") System.out.print System.out System System.out "C " if(i==3)System.out.print("D "); i==3 i 3 System.out.print("D ") System.out.print System.out System System.out "D " System.out.println(j+1) System.out.println System.out System System.out j+1 j 1 String[] args args public class Main {
    public static void main(String[] args){
        boolean cards[][];
        cards=new boolean[4][13];
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            }
        }

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        while(n-->0){
            int tmp;
            String str=sc.next();
            int rank=sc.nextInt();
            if(str.equals("S"))tmp=0;
            else if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break;
            if(rank<1&&13<rank)break;
            rank--;
            cards[tmp][rank]=true;
        }
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            }
        }
    }
} public class Main {
    public static void main(String[] args){
        boolean cards[][];
        cards=new boolean[4][13];
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            }
        }

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        while(n-->0){
            int tmp;
            String str=sc.next();
            int rank=sc.nextInt();
            if(str.equals("S"))tmp=0;
            else if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break;
            if(rank<1&&13<rank)break;
            rank--;
            cards[tmp][rank]=true;
        }
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            }
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        boolean cards[][];
        cards=new boolean[4][13];
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                cards[i][j]=false;
            }
        }

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        while(n-->0){
            int tmp;
            String str=sc.next();
            int rank=sc.nextInt();
            if(str.equals("S"))tmp=0;
            else if(str.equals("H"))tmp=1;
            else if(str.equals("C"))tmp=2;
            else if(str.equals("D"))tmp=3;
            else break;
            if(rank<1&&13<rank)break;
            rank--;
            cards[tmp][rank]=true;
        }
        for(int i=0;i<4;i++) {
            for (int j = 0; j < 13; j++) {
                if(!cards[i][j]){
                    if(i==0)System.out.print("S ");
                    if(i==1)System.out.print("H ");
                    if(i==2)System.out.print("C ");
                    if(i==3)System.out.print("D ");
                    System.out.println(j+1);
                }
            }
        }
    }
}

