import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] Spade = new String[13];
        String[] Heart = new String[13];
        String[] Club = new String[13];
        String[] Daiya = new String[13];
        for (int i = 0; i < 13; i++) {
            Spade[i]="S "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Heart[i]="H "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Club[i]="C "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Daiya[i]="D "+(i+1);
        }
        int maisu=scanner.nextInt();
        for(int i=0; i<maisu; i++){
            String shurui=scanner.next();
            int kazu=scanner.nextInt();
            if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            }   
        }
        for(int i=0; i<13; i++){
            if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        }
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] Spade = new String[13];
        String[] Heart = new String[13];
        String[] Club = new String[13];
        String[] Daiya = new String[13];
        for (int i = 0; i < 13; i++) {
            Spade[i]="S "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Heart[i]="H "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Club[i]="C "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Daiya[i]="D "+(i+1);
        }
        int maisu=scanner.nextInt();
        for(int i=0; i<maisu; i++){
            String shurui=scanner.next();
            int kazu=scanner.nextInt();
            if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            }   
        }
        for(int i=0; i<13; i++){
            if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        }
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] Spade = new String[13];
        String[] Heart = new String[13];
        String[] Club = new String[13];
        String[] Daiya = new String[13];
        for (int i = 0; i < 13; i++) {
            Spade[i]="S "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Heart[i]="H "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Club[i]="C "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Daiya[i]="D "+(i+1);
        }
        int maisu=scanner.nextInt();
        for(int i=0; i<maisu; i++){
            String shurui=scanner.next();
            int kazu=scanner.nextInt();
            if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            }   
        }
        for(int i=0; i<13; i++){
            if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        }
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        String[] Spade = new String[13];
        String[] Heart = new String[13];
        String[] Club = new String[13];
        String[] Daiya = new String[13];
        for (int i = 0; i < 13; i++) {
            Spade[i]="S "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Heart[i]="H "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Club[i]="C "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Daiya[i]="D "+(i+1);
        }
        int maisu=scanner.nextInt();
        for(int i=0; i<maisu; i++){
            String shurui=scanner.next();
            int kazu=scanner.nextInt();
            if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            }   
        }
        for(int i=0; i<13; i++){
            if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        }
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] Spade = new String[13]; Spade new String[13] 13 String[] Heart = new String[13]; Heart new String[13] 13 String[] Club = new String[13]; Club new String[13] 13 String[] Daiya = new String[13]; Daiya new String[13] 13 for (int i = 0; i < 13; i++) {
            Spade[i]="S "+(i+1);
        } int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
            Spade[i]="S "+(i+1);
        } {
            Spade[i]="S "+(i+1);
        } Spade[i]="S "+(i+1) Spade[i] Spade i "S "+(i+1) "S " (i+1) i 1 for (int i = 0; i < 13; i++) {
            Heart[i]="H "+(i+1);
        } int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
            Heart[i]="H "+(i+1);
        } {
            Heart[i]="H "+(i+1);
        } Heart[i]="H "+(i+1) Heart[i] Heart i "H "+(i+1) "H " (i+1) i 1 for (int i = 0; i < 13; i++) {
            Club[i]="C "+(i+1);
        } int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
            Club[i]="C "+(i+1);
        } {
            Club[i]="C "+(i+1);
        } Club[i]="C "+(i+1) Club[i] Club i "C "+(i+1) "C " (i+1) i 1 for (int i = 0; i < 13; i++) {
            Daiya[i]="D "+(i+1);
        } int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
            Daiya[i]="D "+(i+1);
        } {
            Daiya[i]="D "+(i+1);
        } Daiya[i]="D "+(i+1) Daiya[i] Daiya i "D "+(i+1) "D " (i+1) i 1 int maisu=scanner.nextInt(); maisu scanner.nextInt() scanner.nextInt scanner for(int i=0; i<maisu; i++){
            String shurui=scanner.next();
            int kazu=scanner.nextInt();
            if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            }   
        } int i=0; int i=0; i 0 i<maisu i maisu i++ i++ i {
            String shurui=scanner.next();
            int kazu=scanner.nextInt();
            if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            }   
        } {
            String shurui=scanner.next();
            int kazu=scanner.nextInt();
            if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            }   
        } String shurui=scanner.next(); shurui scanner.next() scanner.next scanner int kazu=scanner.nextInt(); kazu scanner.nextInt() scanner.nextInt scanner if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            } shurui.equals("S") shurui.equals shurui "S" {
                Spade[(kazu-1)]="0";
            } Spade[(kazu-1)]="0" Spade[(kazu-1)] Spade (kazu-1) kazu 1 "0" if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            } shurui.equals("H") shurui.equals shurui "H" {
                Heart[(kazu-1)]="0";
            } Heart[(kazu-1)]="0" Heart[(kazu-1)] Heart (kazu-1) kazu 1 "0" if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            } shurui.equals("C") shurui.equals shurui "C" {
                Club[(kazu-1)]="0";
            } Club[(kazu-1)]="0" Club[(kazu-1)] Club (kazu-1) kazu 1 "0" {
                Daiya[(kazu-1)]="0";
            } Daiya[(kazu-1)]="0" Daiya[(kazu-1)] Daiya (kazu-1) kazu 1 "0" for(int i=0; i<13; i++){
            if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        }
        } int i=0; int i=0; i 0 i<13 i 13 i++ i++ i {
            if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        }
        } {
            if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        }
        } if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        } !Spade[i].equals("0") Spade[i].equals("0") Spade[i].equals Spade[i] Spade i "0" {
            System.out.println(Spade[i]);
        } System.out.println(Spade[i]) System.out.println System.out System System.out Spade[i] Spade i for(int i=0; i<13; i++){
            if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        }
        } int i=0; int i=0; i 0 i<13 i 13 i++ i++ i {
            if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        }
        } {
            if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        }
        } if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        } !Heart[i].equals("0") Heart[i].equals("0") Heart[i].equals Heart[i] Heart i "0" {
            System.out.println(Heart[i]);
        } System.out.println(Heart[i]) System.out.println System.out System System.out Heart[i] Heart i for(int i=0; i<13; i++){
            if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        }
        } int i=0; int i=0; i 0 i<13 i 13 i++ i++ i {
            if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        }
        } {
            if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        }
        } if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        } !Club[i].equals("0") Club[i].equals("0") Club[i].equals Club[i] Club i "0" {
            System.out.println(Club[i]);
        } System.out.println(Club[i]) System.out.println System.out System System.out Club[i] Club i for(int i=0; i<13; i++){
            if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        }
        } int i=0; int i=0; i 0 i<13 i 13 i++ i++ i {
            if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        }
        } {
            if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        }
        } if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        } !Daiya[i].equals("0") Daiya[i].equals("0") Daiya[i].equals Daiya[i] Daiya i "0" {
            System.out.println(Daiya[i]);
        } System.out.println(Daiya[i]) System.out.println System.out System System.out Daiya[i] Daiya i String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] Spade = new String[13];
        String[] Heart = new String[13];
        String[] Club = new String[13];
        String[] Daiya = new String[13];
        for (int i = 0; i < 13; i++) {
            Spade[i]="S "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Heart[i]="H "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Club[i]="C "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Daiya[i]="D "+(i+1);
        }
        int maisu=scanner.nextInt();
        for(int i=0; i<maisu; i++){
            String shurui=scanner.next();
            int kazu=scanner.nextInt();
            if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            }   
        }
        for(int i=0; i<13; i++){
            if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        }
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] Spade = new String[13];
        String[] Heart = new String[13];
        String[] Club = new String[13];
        String[] Daiya = new String[13];
        for (int i = 0; i < 13; i++) {
            Spade[i]="S "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Heart[i]="H "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Club[i]="C "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Daiya[i]="D "+(i+1);
        }
        int maisu=scanner.nextInt();
        for(int i=0; i<maisu; i++){
            String shurui=scanner.next();
            int kazu=scanner.nextInt();
            if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            }   
        }
        for(int i=0; i<13; i++){
            if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        }
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] Spade = new String[13];
        String[] Heart = new String[13];
        String[] Club = new String[13];
        String[] Daiya = new String[13];
        for (int i = 0; i < 13; i++) {
            Spade[i]="S "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Heart[i]="H "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Club[i]="C "+(i+1);
        }
        for (int i = 0; i < 13; i++) {
            Daiya[i]="D "+(i+1);
        }
        int maisu=scanner.nextInt();
        for(int i=0; i<maisu; i++){
            String shurui=scanner.next();
            int kazu=scanner.nextInt();
            if(shurui.equals("S")){
                Spade[(kazu-1)]="0";
            }
            else if(shurui.equals("H")){
                Heart[(kazu-1)]="0";
            }
            else if(shurui.equals("C")){
                Club[(kazu-1)]="0";
            }
            else {
                Daiya[(kazu-1)]="0";
            }   
        }
        for(int i=0; i<13; i++){
            if(!Spade[i].equals("0")){
            System.out.println(Spade[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Heart[i].equals("0")){
            System.out.println(Heart[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Club[i].equals("0")){
            System.out.println(Club[i]);
        }
        }
        for(int i=0; i<13; i++){
            if(!Daiya[i].equals("0")){
            System.out.println(Daiya[i]);
        }
        }
    }
}