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

class Main{
    public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        final String egara ="4";
        final String number = "13";
        int[][] num = new int[Integer.parseInt(egara)][Integer.parseInt(number)];
        String[] tp = {"S","H","C","D"};
        int n = Integer.parseInt(br.readLine());
        String s;
        int count = 0;
        while((s=br.readLine())!=null || count!=n){
            count++;
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[1]);
            /*
            switch(str[0]){
                case "S": num[0][x-1] = x; break;
                case "H": num[1][x-1] = x; break;
                case "C": num[2][x-1] = x; break;
                case "D": num[3][x-1] = x; break;
            }
            */
            if("S".equals(str[0])){
                num[0][x-1] = x;
            }else if("H".equals(str[0])){
                num[1][x-1] = x;
            }else if("C".equals(str[0])){
                num[2][x-1] = x;
            }else if("D".equals(str[0])){
                num[3][x-1] = x;
            }
        }
        for (int i=0;i<Integer.parseInt(egara);i++){
            for (int j=0;j<Integer.parseInt(number);j++){
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            }
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java class Main{
    public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        final String egara ="4";
        final String number = "13";
        int[][] num = new int[Integer.parseInt(egara)][Integer.parseInt(number)];
        String[] tp = {"S","H","C","D"};
        int n = Integer.parseInt(br.readLine());
        String s;
        int count = 0;
        while((s=br.readLine())!=null || count!=n){
            count++;
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[1]);
            /*
            switch(str[0]){
                case "S": num[0][x-1] = x; break;
                case "H": num[1][x-1] = x; break;
                case "C": num[2][x-1] = x; break;
                case "D": num[3][x-1] = x; break;
            }
            */
            if("S".equals(str[0])){
                num[0][x-1] = x;
            }else if("H".equals(str[0])){
                num[1][x-1] = x;
            }else if("C".equals(str[0])){
                num[2][x-1] = x;
            }else if("D".equals(str[0])){
                num[3][x-1] = x;
            }
        }
        for (int i=0;i<Integer.parseInt(egara);i++){
            for (int j=0;j<Integer.parseInt(number);j++){
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            }
        }
    }
} Main public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        final String egara ="4";
        final String number = "13";
        int[][] num = new int[Integer.parseInt(egara)][Integer.parseInt(number)];
        String[] tp = {"S","H","C","D"};
        int n = Integer.parseInt(br.readLine());
        String s;
        int count = 0;
        while((s=br.readLine())!=null || count!=n){
            count++;
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[1]);
            /*
            switch(str[0]){
                case "S": num[0][x-1] = x; break;
                case "H": num[1][x-1] = x; break;
                case "C": num[2][x-1] = x; break;
                case "D": num[3][x-1] = x; break;
            }
            */
            if("S".equals(str[0])){
                num[0][x-1] = x;
            }else if("H".equals(str[0])){
                num[1][x-1] = x;
            }else if("C".equals(str[0])){
                num[2][x-1] = x;
            }else if("D".equals(str[0])){
                num[3][x-1] = x;
            }
        }
        for (int i=0;i<Integer.parseInt(egara);i++){
            for (int j=0;j<Integer.parseInt(number);j++){
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            }
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        final String egara ="4";
        final String number = "13";
        int[][] num = new int[Integer.parseInt(egara)][Integer.parseInt(number)];
        String[] tp = {"S","H","C","D"};
        int n = Integer.parseInt(br.readLine());
        String s;
        int count = 0;
        while((s=br.readLine())!=null || count!=n){
            count++;
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[1]);
            /*
            switch(str[0]){
                case "S": num[0][x-1] = x; break;
                case "H": num[1][x-1] = x; break;
                case "C": num[2][x-1] = x; break;
                case "D": num[3][x-1] = x; break;
            }
            */
            if("S".equals(str[0])){
                num[0][x-1] = x;
            }else if("H".equals(str[0])){
                num[1][x-1] = x;
            }else if("C".equals(str[0])){
                num[2][x-1] = x;
            }else if("D".equals(str[0])){
                num[3][x-1] = x;
            }
        }
        for (int i=0;i<Integer.parseInt(egara);i++){
            for (int j=0;j<Integer.parseInt(number);j++){
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            }
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) final String egara ="4"; egara "4" final String number = "13"; number "13" int[][] num = new int[Integer.parseInt(egara)][Integer.parseInt(number)]; num new int[Integer.parseInt(egara)][Integer.parseInt(number)] Integer.parseInt(egara) Integer.parseInt Integer egara Integer.parseInt(number) Integer.parseInt Integer number String[] tp = {"S","H","C","D"}; tp {"S","H","C","D"} "S" "H" "C" "D" int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String s; s int count = 0; count 0 while((s=br.readLine())!=null || count!=n){
            count++;
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[1]);
            /*
            switch(str[0]){
                case "S": num[0][x-1] = x; break;
                case "H": num[1][x-1] = x; break;
                case "C": num[2][x-1] = x; break;
                case "D": num[3][x-1] = x; break;
            }
            */
            if("S".equals(str[0])){
                num[0][x-1] = x;
            }else if("H".equals(str[0])){
                num[1][x-1] = x;
            }else if("C".equals(str[0])){
                num[2][x-1] = x;
            }else if("D".equals(str[0])){
                num[3][x-1] = x;
            }
        } (s=br.readLine())!=null || count!=n (s=br.readLine())!=null (s=br.readLine()) s br.readLine() br.readLine br null count!=n count n {
            count++;
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[1]);
            /*
            switch(str[0]){
                case "S": num[0][x-1] = x; break;
                case "H": num[1][x-1] = x; break;
                case "C": num[2][x-1] = x; break;
                case "D": num[3][x-1] = x; break;
            }
            */
            if("S".equals(str[0])){
                num[0][x-1] = x;
            }else if("H".equals(str[0])){
                num[1][x-1] = x;
            }else if("C".equals(str[0])){
                num[2][x-1] = x;
            }else if("D".equals(str[0])){
                num[3][x-1] = x;
            }
        } count++ count String[] str = s.split(" "); str s.split(" ") s.split s " " int x = Integer.parseInt(str[1]); x Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 if("S".equals(str[0])){
                num[0][x-1] = x;
            }else if("H".equals(str[0])){
                num[1][x-1] = x;
            }else if("C".equals(str[0])){
                num[2][x-1] = x;
            }else if("D".equals(str[0])){
                num[3][x-1] = x;
            } "S".equals(str[0]) "S".equals "S" str[0] str 0 {
                num[0][x-1] = x;
            } num[0][x-1] = x num[0][x-1] num[0] num 0 x-1 x 1 x if("H".equals(str[0])){
                num[1][x-1] = x;
            }else if("C".equals(str[0])){
                num[2][x-1] = x;
            }else if("D".equals(str[0])){
                num[3][x-1] = x;
            } "H".equals(str[0]) "H".equals "H" str[0] str 0 {
                num[1][x-1] = x;
            } num[1][x-1] = x num[1][x-1] num[1] num 1 x-1 x 1 x if("C".equals(str[0])){
                num[2][x-1] = x;
            }else if("D".equals(str[0])){
                num[3][x-1] = x;
            } "C".equals(str[0]) "C".equals "C" str[0] str 0 {
                num[2][x-1] = x;
            } num[2][x-1] = x num[2][x-1] num[2] num 2 x-1 x 1 x if("D".equals(str[0])){
                num[3][x-1] = x;
            } "D".equals(str[0]) "D".equals "D" str[0] str 0 {
                num[3][x-1] = x;
            } num[3][x-1] = x num[3][x-1] num[3] num 3 x-1 x 1 x for (int i=0;i<Integer.parseInt(egara);i++){
            for (int j=0;j<Integer.parseInt(number);j++){
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            }
        } int i=0; int i=0; i 0 i<Integer.parseInt(egara) i Integer.parseInt(egara) Integer.parseInt Integer egara i++ i++ i {
            for (int j=0;j<Integer.parseInt(number);j++){
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            }
        } {
            for (int j=0;j<Integer.parseInt(number);j++){
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            }
        } for (int j=0;j<Integer.parseInt(number);j++){
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            } int j=0; int j=0; j 0 j<Integer.parseInt(number) j Integer.parseInt(number) Integer.parseInt Integer number j++ j++ j {
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            } {
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            } if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                } num[i][j]==0 num[i][j] num[i] num i j 0 {
                    System.out.println(tp[i] +" "+ (j+1));
                } System.out.println(tp[i] +" "+ (j+1)) System.out.println System.out System System.out tp[i] +" "+ (j+1) tp[i] +" "+ (j+1) tp[i] tp i " " (j+1) j 1 String args[] args
import java.util.*;
import java.io.*;

class Main{
    public static void main(String args[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        final String egara ="4";
        final String number = "13";
        int[][] num = new int[Integer.parseInt(egara)][Integer.parseInt(number)];
        String[] tp = {"S","H","C","D"};
        int n = Integer.parseInt(br.readLine());
        String s;
        int count = 0;
        while((s=br.readLine())!=null || count!=n){
            count++;
            String[] str = s.split(" ");
            int x = Integer.parseInt(str[1]);
            /*
            switch(str[0]){
                case "S": num[0][x-1] = x; break;
                case "H": num[1][x-1] = x; break;
                case "C": num[2][x-1] = x; break;
                case "D": num[3][x-1] = x; break;
            }
            */
            if("S".equals(str[0])){
                num[0][x-1] = x;
            }else if("H".equals(str[0])){
                num[1][x-1] = x;
            }else if("C".equals(str[0])){
                num[2][x-1] = x;
            }else if("D".equals(str[0])){
                num[3][x-1] = x;
            }
        }
        for (int i=0;i<Integer.parseInt(egara);i++){
            for (int j=0;j<Integer.parseInt(number);j++){
                if(num[i][j]==0) {
                    System.out.println(tp[i] +" "+ (j+1));
                }
            }
        }
    }
}