import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

public class Main{

    static StringBuilder sb;

    public static void main(String[] args) {
	try {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    List<String> lines = new ArrayList<String>();

	    for (String line = br.readLine(); line != null; line = br.readLine()) {
		lines.add(line);
	    }

	    // lines.add("47");
	    // lines.add("S 10");
	    // lines.add("S 11");
	    // lines.add("S 12");
	    // lines.add("S 13");
	    // lines.add("H 1");

	    br.close();

	    List<Integer> S = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> H = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> C = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> D = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));

	    for (int i = 1; i < lines.size(); i++) {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    }

	    for (Integer s : S) { System.out.println("S " + s); }
	    for (Integer s : H) { System.out.println("H " + s); }
	    for (Integer s : C) { System.out.println("C " + s); }
	    for (Integer s : D) { System.out.println("D " + s); }

	    System.exit(0);

	} catch (Exception e) {
	    System.out.println(e.getMessage());
	    System.out.println(Arrays.toString(e.getStackTrace()));
	    System.exit(0);
	}
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Comparator; Comparator java.util public class Main{

    static StringBuilder sb;

    public static void main(String[] args) {
	try {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    List<String> lines = new ArrayList<String>();

	    for (String line = br.readLine(); line != null; line = br.readLine()) {
		lines.add(line);
	    }

	    // lines.add("47");
	    // lines.add("S 10");
	    // lines.add("S 11");
	    // lines.add("S 12");
	    // lines.add("S 13");
	    // lines.add("H 1");

	    br.close();

	    List<Integer> S = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> H = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> C = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> D = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));

	    for (int i = 1; i < lines.size(); i++) {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    }

	    for (Integer s : S) { System.out.println("S " + s); }
	    for (Integer s : H) { System.out.println("H " + s); }
	    for (Integer s : C) { System.out.println("C " + s); }
	    for (Integer s : D) { System.out.println("D " + s); }

	    System.exit(0);

	} catch (Exception e) {
	    System.out.println(e.getMessage());
	    System.out.println(Arrays.toString(e.getStackTrace()));
	    System.exit(0);
	}
    }
} Main static StringBuilder sb; sb public static void main(String[] args) {
	try {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    List<String> lines = new ArrayList<String>();

	    for (String line = br.readLine(); line != null; line = br.readLine()) {
		lines.add(line);
	    }

	    // lines.add("47");
	    // lines.add("S 10");
	    // lines.add("S 11");
	    // lines.add("S 12");
	    // lines.add("S 13");
	    // lines.add("H 1");

	    br.close();

	    List<Integer> S = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> H = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> C = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> D = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));

	    for (int i = 1; i < lines.size(); i++) {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    }

	    for (Integer s : S) { System.out.println("S " + s); }
	    for (Integer s : H) { System.out.println("H " + s); }
	    for (Integer s : C) { System.out.println("C " + s); }
	    for (Integer s : D) { System.out.println("D " + s); }

	    System.exit(0);

	} catch (Exception e) {
	    System.out.println(e.getMessage());
	    System.out.println(Arrays.toString(e.getStackTrace()));
	    System.exit(0);
	}
    } main {
	try {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    List<String> lines = new ArrayList<String>();

	    for (String line = br.readLine(); line != null; line = br.readLine()) {
		lines.add(line);
	    }

	    // lines.add("47");
	    // lines.add("S 10");
	    // lines.add("S 11");
	    // lines.add("S 12");
	    // lines.add("S 13");
	    // lines.add("H 1");

	    br.close();

	    List<Integer> S = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> H = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> C = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> D = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));

	    for (int i = 1; i < lines.size(); i++) {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    }

	    for (Integer s : S) { System.out.println("S " + s); }
	    for (Integer s : H) { System.out.println("H " + s); }
	    for (Integer s : C) { System.out.println("C " + s); }
	    for (Integer s : D) { System.out.println("D " + s); }

	    System.exit(0);

	} catch (Exception e) {
	    System.out.println(e.getMessage());
	    System.out.println(Arrays.toString(e.getStackTrace()));
	    System.exit(0);
	}
    } try {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    List<String> lines = new ArrayList<String>();

	    for (String line = br.readLine(); line != null; line = br.readLine()) {
		lines.add(line);
	    }

	    // lines.add("47");
	    // lines.add("S 10");
	    // lines.add("S 11");
	    // lines.add("S 12");
	    // lines.add("S 13");
	    // lines.add("H 1");

	    br.close();

	    List<Integer> S = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> H = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> C = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> D = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));

	    for (int i = 1; i < lines.size(); i++) {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    }

	    for (Integer s : S) { System.out.println("S " + s); }
	    for (Integer s : H) { System.out.println("H " + s); }
	    for (Integer s : C) { System.out.println("C " + s); }
	    for (Integer s : D) { System.out.println("D " + s); }

	    System.exit(0);

	} catch (Exception e) {
	    System.out.println(e.getMessage());
	    System.out.println(Arrays.toString(e.getStackTrace()));
	    System.exit(0);
	} catch (Exception e) {
	    System.out.println(e.getMessage());
	    System.out.println(Arrays.toString(e.getStackTrace()));
	    System.exit(0);
	} Exception e {
	    System.out.println(e.getMessage());
	    System.out.println(Arrays.toString(e.getStackTrace()));
	    System.exit(0);
	} System.out.println(e.getMessage()) System.out.println System.out System System.out e.getMessage() e.getMessage e System.out.println(Arrays.toString(e.getStackTrace())) System.out.println System.out System System.out Arrays.toString(e.getStackTrace()) Arrays.toString Arrays e.getStackTrace() e.getStackTrace e System.exit(0) System.exit System 0 {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    List<String> lines = new ArrayList<String>();

	    for (String line = br.readLine(); line != null; line = br.readLine()) {
		lines.add(line);
	    }

	    // lines.add("47");
	    // lines.add("S 10");
	    // lines.add("S 11");
	    // lines.add("S 12");
	    // lines.add("S 13");
	    // lines.add("H 1");

	    br.close();

	    List<Integer> S = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> H = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> C = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> D = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));

	    for (int i = 1; i < lines.size(); i++) {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    }

	    for (Integer s : S) { System.out.println("S " + s); }
	    for (Integer s : H) { System.out.println("H " + s); }
	    for (Integer s : C) { System.out.println("C " + s); }
	    for (Integer s : D) { System.out.println("D " + s); }

	    System.exit(0);

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) List<String> lines = new ArrayList<String>(); lines new ArrayList<String>() for (String line = br.readLine(); line != null; line = br.readLine()) {
		lines.add(line);
	    } String line = br.readLine(); String line = br.readLine(); line br.readLine() br.readLine br line != null line null line = br.readLine() line = br.readLine() line br.readLine() br.readLine br {
		lines.add(line);
	    } {
		lines.add(line);
	    } lines.add(line) lines.add lines line br.close() br.close br List<Integer> S = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13)); S new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13)) List<Integer> H = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13)); H new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13)) List<Integer> C = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13)); C new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13)) List<Integer> D = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13)); D new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13)) for (int i = 1; i < lines.size(); i++) {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    } int i = 1; int i = 1; i 1 i < lines.size() i lines.size() lines.size lines i++ i++ i {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    } {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    } String type = lines.get(i).split(" ")[0]; type lines.get(i).split(" ")[0] lines.get(i).split(" ") lines.get(i).split lines.get(i) lines.get lines i " " 0 Integer num = Integer.parseInt(lines.get(i).split(" ")[1]); num Integer.parseInt(lines.get(i).split(" ")[1]) Integer.parseInt Integer lines.get(i).split(" ")[1] lines.get(i).split(" ") lines.get(i).split lines.get(i) lines.get lines i " " 1 if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		} type.equals("S") type.equals type "S" {
		    S.remove(num);
		} S.remove(num) S.remove S num if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		} type.equals("H") type.equals type "H" {
		    H.remove(num);
		} H.remove(num) H.remove H num if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		} type.equals("C") type.equals type "C" {
		    C.remove(num);
		} C.remove(num) C.remove C num if (type.equals("D")) {
		    D.remove(num);
		} type.equals("D") type.equals type "D" {
		    D.remove(num);
		} D.remove(num) D.remove D num for (Integer s : S) { System.out.println("S " + s); } Integer s S { System.out.println("S " + s); } { System.out.println("S " + s); } System.out.println("S " + s) System.out.println System.out System System.out "S " + s "S " s for (Integer s : H) { System.out.println("H " + s); } Integer s H { System.out.println("H " + s); } { System.out.println("H " + s); } System.out.println("H " + s) System.out.println System.out System System.out "H " + s "H " s for (Integer s : C) { System.out.println("C " + s); } Integer s C { System.out.println("C " + s); } { System.out.println("C " + s); } System.out.println("C " + s) System.out.println System.out System System.out "C " + s "C " s for (Integer s : D) { System.out.println("D " + s); } Integer s D { System.out.println("D " + s); } { System.out.println("D " + s); } System.out.println("D " + s) System.out.println System.out System System.out "D " + s "D " s System.exit(0) System.exit System 0 String[] args args public class Main{

    static StringBuilder sb;

    public static void main(String[] args) {
	try {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    List<String> lines = new ArrayList<String>();

	    for (String line = br.readLine(); line != null; line = br.readLine()) {
		lines.add(line);
	    }

	    // lines.add("47");
	    // lines.add("S 10");
	    // lines.add("S 11");
	    // lines.add("S 12");
	    // lines.add("S 13");
	    // lines.add("H 1");

	    br.close();

	    List<Integer> S = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> H = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> C = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> D = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));

	    for (int i = 1; i < lines.size(); i++) {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    }

	    for (Integer s : S) { System.out.println("S " + s); }
	    for (Integer s : H) { System.out.println("H " + s); }
	    for (Integer s : C) { System.out.println("C " + s); }
	    for (Integer s : D) { System.out.println("D " + s); }

	    System.exit(0);

	} catch (Exception e) {
	    System.out.println(e.getMessage());
	    System.out.println(Arrays.toString(e.getStackTrace()));
	    System.exit(0);
	}
    }
} public class Main{

    static StringBuilder sb;

    public static void main(String[] args) {
	try {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    List<String> lines = new ArrayList<String>();

	    for (String line = br.readLine(); line != null; line = br.readLine()) {
		lines.add(line);
	    }

	    // lines.add("47");
	    // lines.add("S 10");
	    // lines.add("S 11");
	    // lines.add("S 12");
	    // lines.add("S 13");
	    // lines.add("H 1");

	    br.close();

	    List<Integer> S = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> H = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> C = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> D = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));

	    for (int i = 1; i < lines.size(); i++) {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    }

	    for (Integer s : S) { System.out.println("S " + s); }
	    for (Integer s : H) { System.out.println("H " + s); }
	    for (Integer s : C) { System.out.println("C " + s); }
	    for (Integer s : D) { System.out.println("D " + s); }

	    System.exit(0);

	} catch (Exception e) {
	    System.out.println(e.getMessage());
	    System.out.println(Arrays.toString(e.getStackTrace()));
	    System.exit(0);
	}
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

public class Main{

    static StringBuilder sb;

    public static void main(String[] args) {
	try {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    List<String> lines = new ArrayList<String>();

	    for (String line = br.readLine(); line != null; line = br.readLine()) {
		lines.add(line);
	    }

	    // lines.add("47");
	    // lines.add("S 10");
	    // lines.add("S 11");
	    // lines.add("S 12");
	    // lines.add("S 13");
	    // lines.add("H 1");

	    br.close();

	    List<Integer> S = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> H = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> C = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));
	    List<Integer> D = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13));

	    for (int i = 1; i < lines.size(); i++) {
		String type = lines.get(i).split(" ")[0];
		Integer num = Integer.parseInt(lines.get(i).split(" ")[1]);
		if (type.equals("S")) {
		    S.remove(num);
		} else if (type.equals("H")) {
		    H.remove(num);
		} else if (type.equals("C")) {
		    C.remove(num);
		} else if (type.equals("D")) {
		    D.remove(num);
		}
	    }

	    for (Integer s : S) { System.out.println("S " + s); }
	    for (Integer s : H) { System.out.println("H " + s); }
	    for (Integer s : C) { System.out.println("C " + s); }
	    for (Integer s : D) { System.out.println("D " + s); }

	    System.exit(0);

	} catch (Exception e) {
	    System.out.println(e.getMessage());
	    System.out.println(Arrays.toString(e.getStackTrace()));
	    System.exit(0);
	}
    }
}