import java.io.*;
import java.util.Scanner;
import java.util.ArrayList;


public class Main {
    public static void main(String[] args)throws Exception{
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        ArrayList<String> cards = new ArrayList<String>();
        trumpAdd(cards, "S");
        trumpAdd(cards, "H");
        trumpAdd(cards, "C");
        trumpAdd(cards, "D");
        for(int I = 0;I <= n - 1;I++){
            trumpRemove(cards, scan.next(),scan.nextInt());
        }
        for(int j = 0;j <= 51 - n;j++){
            System.out.println(cards.get(j));
        }
    }
    
    public static void trumpAdd(ArrayList<String> sample, String mark){
        for(int i = 0;i <= 12;i++){
            sample.add(mark + " " + (i + 1));
        }
    }
    
    public static void trumpRemove(ArrayList<String> sample, String marks, int number){
        sample.remove(marks + " " + number);
    }
} import java.io.*; io.* java import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args)throws Exception{
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        ArrayList<String> cards = new ArrayList<String>();
        trumpAdd(cards, "S");
        trumpAdd(cards, "H");
        trumpAdd(cards, "C");
        trumpAdd(cards, "D");
        for(int I = 0;I <= n - 1;I++){
            trumpRemove(cards, scan.next(),scan.nextInt());
        }
        for(int j = 0;j <= 51 - n;j++){
            System.out.println(cards.get(j));
        }
    }
    
    public static void trumpAdd(ArrayList<String> sample, String mark){
        for(int i = 0;i <= 12;i++){
            sample.add(mark + " " + (i + 1));
        }
    }
    
    public static void trumpRemove(ArrayList<String> sample, String marks, int number){
        sample.remove(marks + " " + number);
    }
} Main public static void main(String[] args)throws Exception{
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        ArrayList<String> cards = new ArrayList<String>();
        trumpAdd(cards, "S");
        trumpAdd(cards, "H");
        trumpAdd(cards, "C");
        trumpAdd(cards, "D");
        for(int I = 0;I <= n - 1;I++){
            trumpRemove(cards, scan.next(),scan.nextInt());
        }
        for(int j = 0;j <= 51 - n;j++){
            System.out.println(cards.get(j));
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        ArrayList<String> cards = new ArrayList<String>();
        trumpAdd(cards, "S");
        trumpAdd(cards, "H");
        trumpAdd(cards, "C");
        trumpAdd(cards, "D");
        for(int I = 0;I <= n - 1;I++){
            trumpRemove(cards, scan.next(),scan.nextInt());
        }
        for(int j = 0;j <= 51 - n;j++){
            System.out.println(cards.get(j));
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan ArrayList<String> cards = new ArrayList<String>(); cards new ArrayList<String>() trumpAdd(cards, "S") trumpAdd cards "S" trumpAdd(cards, "H") trumpAdd cards "H" trumpAdd(cards, "C") trumpAdd cards "C" trumpAdd(cards, "D") trumpAdd cards "D" for(int I = 0;I <= n - 1;I++){
            trumpRemove(cards, scan.next(),scan.nextInt());
        } int I = 0; int I = 0; I 0 I <= n - 1 I n - 1 n 1 I++ I++ I {
            trumpRemove(cards, scan.next(),scan.nextInt());
        } {
            trumpRemove(cards, scan.next(),scan.nextInt());
        } trumpRemove(cards, scan.next(),scan.nextInt()) trumpRemove cards scan.next() scan.next scan scan.nextInt() scan.nextInt scan for(int j = 0;j <= 51 - n;j++){
            System.out.println(cards.get(j));
        } int j = 0; int j = 0; j 0 j <= 51 - n j 51 - n 51 n j++ j++ j {
            System.out.println(cards.get(j));
        } {
            System.out.println(cards.get(j));
        } System.out.println(cards.get(j)) System.out.println System.out System System.out cards.get(j) cards.get cards j String[] args args public static void trumpAdd(ArrayList<String> sample, String mark){
        for(int i = 0;i <= 12;i++){
            sample.add(mark + " " + (i + 1));
        }
    } trumpAdd {
        for(int i = 0;i <= 12;i++){
            sample.add(mark + " " + (i + 1));
        }
    } for(int i = 0;i <= 12;i++){
            sample.add(mark + " " + (i + 1));
        } int i = 0; int i = 0; i 0 i <= 12 i 12 i++ i++ i {
            sample.add(mark + " " + (i + 1));
        } {
            sample.add(mark + " " + (i + 1));
        } sample.add(mark + " " + (i + 1)) sample.add sample mark + " " + (i + 1) mark + " " + (i + 1) mark " " (i + 1) i 1 ArrayList<String> sample sample String mark mark public static void trumpRemove(ArrayList<String> sample, String marks, int number){
        sample.remove(marks + " " + number);
    } trumpRemove {
        sample.remove(marks + " " + number);
    } sample.remove(marks + " " + number) sample.remove sample marks + " " + number marks + " " + number marks " " number ArrayList<String> sample sample String marks marks int number number public class Main {
    public static void main(String[] args)throws Exception{
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        ArrayList<String> cards = new ArrayList<String>();
        trumpAdd(cards, "S");
        trumpAdd(cards, "H");
        trumpAdd(cards, "C");
        trumpAdd(cards, "D");
        for(int I = 0;I <= n - 1;I++){
            trumpRemove(cards, scan.next(),scan.nextInt());
        }
        for(int j = 0;j <= 51 - n;j++){
            System.out.println(cards.get(j));
        }
    }
    
    public static void trumpAdd(ArrayList<String> sample, String mark){
        for(int i = 0;i <= 12;i++){
            sample.add(mark + " " + (i + 1));
        }
    }
    
    public static void trumpRemove(ArrayList<String> sample, String marks, int number){
        sample.remove(marks + " " + number);
    }
} public class Main {
    public static void main(String[] args)throws Exception{
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        ArrayList<String> cards = new ArrayList<String>();
        trumpAdd(cards, "S");
        trumpAdd(cards, "H");
        trumpAdd(cards, "C");
        trumpAdd(cards, "D");
        for(int I = 0;I <= n - 1;I++){
            trumpRemove(cards, scan.next(),scan.nextInt());
        }
        for(int j = 0;j <= 51 - n;j++){
            System.out.println(cards.get(j));
        }
    }
    
    public static void trumpAdd(ArrayList<String> sample, String mark){
        for(int i = 0;i <= 12;i++){
            sample.add(mark + " " + (i + 1));
        }
    }
    
    public static void trumpRemove(ArrayList<String> sample, String marks, int number){
        sample.remove(marks + " " + number);
    }
} Main
import java.io.*;
import java.util.Scanner;
import java.util.ArrayList;


public class Main {
    public static void main(String[] args)throws Exception{
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        ArrayList<String> cards = new ArrayList<String>();
        trumpAdd(cards, "S");
        trumpAdd(cards, "H");
        trumpAdd(cards, "C");
        trumpAdd(cards, "D");
        for(int I = 0;I <= n - 1;I++){
            trumpRemove(cards, scan.next(),scan.nextInt());
        }
        for(int j = 0;j <= 51 - n;j++){
            System.out.println(cards.get(j));
        }
    }
    
    public static void trumpAdd(ArrayList<String> sample, String mark){
        for(int i = 0;i <= 12;i++){
            sample.add(mark + " " + (i + 1));
        }
    }
    
    public static void trumpRemove(ArrayList<String> sample, String marks, int number){
        sample.remove(marks + " " + number);
    }
}
