import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        boolean[][] cards = new boolean[4][13]; //false
        //[0]:S, [1]:H, [2]:C, [3]:D
        for (int i=0; i<n; i++){
            String[] ln = br.readLine().split(" ");
            String pic = ln[0];
            int num = Integer.parseInt(ln[1]) - 1;
            if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            }
        }
        for (int j=0; j<4; j++){
            for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            }
        }
    }
} import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        boolean[][] cards = new boolean[4][13]; //false
        //[0]:S, [1]:H, [2]:C, [3]:D
        for (int i=0; i<n; i++){
            String[] ln = br.readLine().split(" ");
            String pic = ln[0];
            int num = Integer.parseInt(ln[1]) - 1;
            if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            }
        }
        for (int j=0; j<4; j++){
            for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            }
        }
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        boolean[][] cards = new boolean[4][13]; //false
        //[0]:S, [1]:H, [2]:C, [3]:D
        for (int i=0; i<n; i++){
            String[] ln = br.readLine().split(" ");
            String pic = ln[0];
            int num = Integer.parseInt(ln[1]) - 1;
            if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            }
        }
        for (int j=0; j<4; j++){
            for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            }
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        boolean[][] cards = new boolean[4][13]; //false
        //[0]:S, [1]:H, [2]:C, [3]:D
        for (int i=0; i<n; i++){
            String[] ln = br.readLine().split(" ");
            String pic = ln[0];
            int num = Integer.parseInt(ln[1]) - 1;
            if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            }
        }
        for (int j=0; j<4; j++){
            for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            }
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br boolean[][] cards = new boolean[4][13]; cards new boolean[4][13] 4 13 for (int i=0; i<n; i++){
            String[] ln = br.readLine().split(" ");
            String pic = ln[0];
            int num = Integer.parseInt(ln[1]) - 1;
            if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            String[] ln = br.readLine().split(" ");
            String pic = ln[0];
            int num = Integer.parseInt(ln[1]) - 1;
            if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            }
        } {
            String[] ln = br.readLine().split(" ");
            String pic = ln[0];
            int num = Integer.parseInt(ln[1]) - 1;
            if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            }
        } String[] ln = br.readLine().split(" "); ln br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " String pic = ln[0]; pic ln[0] ln 0 int num = Integer.parseInt(ln[1]) - 1; num Integer.parseInt(ln[1]) - 1 Integer.parseInt(ln[1]) Integer.parseInt Integer ln[1] ln 1 1 if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            } "S".equals(pic) "S".equals "S" pic {
                cards[0][num] = true;
            } cards[0][num] = true cards[0][num] cards[0] cards 0 num true if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            } "H".equals(pic) "H".equals "H" pic {
                cards[1][num] = true;
            } cards[1][num] = true cards[1][num] cards[1] cards 1 num true if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            } "C".equals(pic) "C".equals "C" pic {
                cards[2][num] = true;
            } cards[2][num] = true cards[2][num] cards[2] cards 2 num true {
                cards[3][num] = true;
            } cards[3][num] = true cards[3][num] cards[3] cards 3 num true for (int j=0; j<4; j++){
            for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            }
        } int j=0; int j=0; j 0 j<4 j 4 j++ j++ j {
            for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            }
        } {
            for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            }
        } for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            } int k=0; int k=0; k 0 k<13 k 13 k++ k++ k {
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            } {
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            } if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                } !cards[j][k] cards[j][k] cards[j] cards j k {
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                } switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    } j case 0: 0 case 0: System.out.print("S ") System.out.print System.out System System.out "S " System.out.println(k+1) System.out.println System.out System System.out k+1 k 1 continue; case 1: 1 case 1: System.out.print("H ") System.out.print System.out System System.out "H " System.out.println(k+1) System.out.println System.out System System.out k+1 k 1 continue; case 2: 2 case 2: System.out.print("C ") System.out.print System.out System System.out "C " System.out.println(k+1) System.out.println System.out System System.out k+1 k 1 continue; case 3: 3 case 3: System.out.print("D ") System.out.print System.out System System.out "D " System.out.println(k+1) System.out.println System.out System System.out k+1 k 1 continue; String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        boolean[][] cards = new boolean[4][13]; //false
        //[0]:S, [1]:H, [2]:C, [3]:D
        for (int i=0; i<n; i++){
            String[] ln = br.readLine().split(" ");
            String pic = ln[0];
            int num = Integer.parseInt(ln[1]) - 1;
            if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            }
        }
        for (int j=0; j<4; j++){
            for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        boolean[][] cards = new boolean[4][13]; //false
        //[0]:S, [1]:H, [2]:C, [3]:D
        for (int i=0; i<n; i++){
            String[] ln = br.readLine().split(" ");
            String pic = ln[0];
            int num = Integer.parseInt(ln[1]) - 1;
            if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            }
        }
        for (int j=0; j<4; j++){
            for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            }
        }
    }
} Main
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        boolean[][] cards = new boolean[4][13]; //false
        //[0]:S, [1]:H, [2]:C, [3]:D
        for (int i=0; i<n; i++){
            String[] ln = br.readLine().split(" ");
            String pic = ln[0];
            int num = Integer.parseInt(ln[1]) - 1;
            if ("S".equals(pic)){
                cards[0][num] = true;
            }else if ("H".equals(pic)){
                cards[1][num] = true;
            }else if ("C".equals(pic)){
                cards[2][num] = true;
            }else{
                cards[3][num] = true;
            }
        }
        for (int j=0; j<4; j++){
            for (int k=0; k<13; k++){
                if (!cards[j][k]){
                    switch (j){
                    case 0:
                        System.out.print("S ");
                        System.out.println(k+1);
                        continue;
                    case 1:
                        System.out.print("H ");
                        System.out.println(k+1);
                        continue;
                    case 2:
                        System.out.print("C ");
                        System.out.println(k+1);
                        continue;
                    case 3:
                        System.out.print("D ");
                        System.out.println(k+1);
                        continue;
                    }
                }
            }
        }
    }
}