import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {
	private ArrayList<Trump> cardList;
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    Main main = new Main();
	    main.init();

	    int n = Integer.parseInt(br.readLine());

	    for (int i = 0; i < n; i++) {
		    String line = br.readLine();
		    String type = line.split(" ")[0];
		    int num = Integer.parseInt(line.split(" ")[1]);
		    main. havingCardCheck(type, num);
	    }

	    main.notHavingCardDisp();
	}

	private void notHavingCardDisp() {
		for (int i = 0; i < cardList.size(); i++) {
			if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			}
		}
	}

	private void havingCardCheck(String type, int num) {
		for (int i = 0; i < cardList.size(); i++) {
			if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			}
		}
	}

	private void init() {
		cardList = new ArrayList<Trump>();
		cardList.add(new Trump("S", 1));
		cardList.add(new Trump("S", 2));
		cardList.add(new Trump("S", 3));
		cardList.add(new Trump("S", 4));
		cardList.add(new Trump("S", 5));
		cardList.add(new Trump("S", 6));
		cardList.add(new Trump("S", 7));
		cardList.add(new Trump("S", 8));
		cardList.add(new Trump("S", 9));
		cardList.add(new Trump("S", 10));
		cardList.add(new Trump("S", 11));
		cardList.add(new Trump("S", 12));
		cardList.add(new Trump("S", 13));

		cardList.add(new Trump("H", 1));
		cardList.add(new Trump("H", 2));
		cardList.add(new Trump("H", 3));
		cardList.add(new Trump("H", 4));
		cardList.add(new Trump("H", 5));
		cardList.add(new Trump("H", 6));
		cardList.add(new Trump("H", 7));
		cardList.add(new Trump("H", 8));
		cardList.add(new Trump("H", 9));
		cardList.add(new Trump("H", 10));
		cardList.add(new Trump("H", 11));
		cardList.add(new Trump("H", 12));
		cardList.add(new Trump("H", 13));

		cardList.add(new Trump("C", 1));
		cardList.add(new Trump("C", 2));
		cardList.add(new Trump("C", 3));
		cardList.add(new Trump("C", 4));
		cardList.add(new Trump("C", 5));
		cardList.add(new Trump("C", 6));
		cardList.add(new Trump("C", 7));
		cardList.add(new Trump("C", 8));
		cardList.add(new Trump("C", 9));
		cardList.add(new Trump("C", 10));
		cardList.add(new Trump("C", 11));
		cardList.add(new Trump("C", 12));
		cardList.add(new Trump("C", 13));

		cardList.add(new Trump("D", 1));
		cardList.add(new Trump("D", 2));
		cardList.add(new Trump("D", 3));
		cardList.add(new Trump("D", 4));
		cardList.add(new Trump("D", 5));
		cardList.add(new Trump("D", 6));
		cardList.add(new Trump("D", 7));
		cardList.add(new Trump("D", 8));
		cardList.add(new Trump("D", 9));
		cardList.add(new Trump("D", 10));
		cardList.add(new Trump("D", 11));
		cardList.add(new Trump("D", 12));
		cardList.add(new Trump("D", 13));
	}

	class Trump {
		Trump(String type, int num) {
			this.type = type;
			this.num = num;
			this.having = false;
		}

		private String type;
		private int num;
		private boolean having;
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		public int getNum() {
			return num;
		}
		public void setNum(int num) {
			this.num = num;
		}
		public boolean isHaving() {
			return having;
		}
		public void setHaving(boolean having) {
			this.having = having;
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main {
	private ArrayList<Trump> cardList;
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    Main main = new Main();
	    main.init();

	    int n = Integer.parseInt(br.readLine());

	    for (int i = 0; i < n; i++) {
		    String line = br.readLine();
		    String type = line.split(" ")[0];
		    int num = Integer.parseInt(line.split(" ")[1]);
		    main. havingCardCheck(type, num);
	    }

	    main.notHavingCardDisp();
	}

	private void notHavingCardDisp() {
		for (int i = 0; i < cardList.size(); i++) {
			if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			}
		}
	}

	private void havingCardCheck(String type, int num) {
		for (int i = 0; i < cardList.size(); i++) {
			if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			}
		}
	}

	private void init() {
		cardList = new ArrayList<Trump>();
		cardList.add(new Trump("S", 1));
		cardList.add(new Trump("S", 2));
		cardList.add(new Trump("S", 3));
		cardList.add(new Trump("S", 4));
		cardList.add(new Trump("S", 5));
		cardList.add(new Trump("S", 6));
		cardList.add(new Trump("S", 7));
		cardList.add(new Trump("S", 8));
		cardList.add(new Trump("S", 9));
		cardList.add(new Trump("S", 10));
		cardList.add(new Trump("S", 11));
		cardList.add(new Trump("S", 12));
		cardList.add(new Trump("S", 13));

		cardList.add(new Trump("H", 1));
		cardList.add(new Trump("H", 2));
		cardList.add(new Trump("H", 3));
		cardList.add(new Trump("H", 4));
		cardList.add(new Trump("H", 5));
		cardList.add(new Trump("H", 6));
		cardList.add(new Trump("H", 7));
		cardList.add(new Trump("H", 8));
		cardList.add(new Trump("H", 9));
		cardList.add(new Trump("H", 10));
		cardList.add(new Trump("H", 11));
		cardList.add(new Trump("H", 12));
		cardList.add(new Trump("H", 13));

		cardList.add(new Trump("C", 1));
		cardList.add(new Trump("C", 2));
		cardList.add(new Trump("C", 3));
		cardList.add(new Trump("C", 4));
		cardList.add(new Trump("C", 5));
		cardList.add(new Trump("C", 6));
		cardList.add(new Trump("C", 7));
		cardList.add(new Trump("C", 8));
		cardList.add(new Trump("C", 9));
		cardList.add(new Trump("C", 10));
		cardList.add(new Trump("C", 11));
		cardList.add(new Trump("C", 12));
		cardList.add(new Trump("C", 13));

		cardList.add(new Trump("D", 1));
		cardList.add(new Trump("D", 2));
		cardList.add(new Trump("D", 3));
		cardList.add(new Trump("D", 4));
		cardList.add(new Trump("D", 5));
		cardList.add(new Trump("D", 6));
		cardList.add(new Trump("D", 7));
		cardList.add(new Trump("D", 8));
		cardList.add(new Trump("D", 9));
		cardList.add(new Trump("D", 10));
		cardList.add(new Trump("D", 11));
		cardList.add(new Trump("D", 12));
		cardList.add(new Trump("D", 13));
	}

	class Trump {
		Trump(String type, int num) {
			this.type = type;
			this.num = num;
			this.having = false;
		}

		private String type;
		private int num;
		private boolean having;
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		public int getNum() {
			return num;
		}
		public void setNum(int num) {
			this.num = num;
		}
		public boolean isHaving() {
			return having;
		}
		public void setHaving(boolean having) {
			this.having = having;
		}
	}
} Main private ArrayList<Trump> cardList; cardList public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    Main main = new Main();
	    main.init();

	    int n = Integer.parseInt(br.readLine());

	    for (int i = 0; i < n; i++) {
		    String line = br.readLine();
		    String type = line.split(" ")[0];
		    int num = Integer.parseInt(line.split(" ")[1]);
		    main. havingCardCheck(type, num);
	    }

	    main.notHavingCardDisp();
	} main {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    Main main = new Main();
	    main.init();

	    int n = Integer.parseInt(br.readLine());

	    for (int i = 0; i < n; i++) {
		    String line = br.readLine();
		    String type = line.split(" ")[0];
		    int num = Integer.parseInt(line.split(" ")[1]);
		    main. havingCardCheck(type, num);
	    }

	    main.notHavingCardDisp();
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) Main main = new Main(); main new Main() main.init() main.init main int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for (int i = 0; i < n; i++) {
		    String line = br.readLine();
		    String type = line.split(" ")[0];
		    int num = Integer.parseInt(line.split(" ")[1]);
		    main. havingCardCheck(type, num);
	    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
		    String line = br.readLine();
		    String type = line.split(" ")[0];
		    int num = Integer.parseInt(line.split(" ")[1]);
		    main. havingCardCheck(type, num);
	    } {
		    String line = br.readLine();
		    String type = line.split(" ")[0];
		    int num = Integer.parseInt(line.split(" ")[1]);
		    main. havingCardCheck(type, num);
	    } String line = br.readLine(); line br.readLine() br.readLine br String type = line.split(" ")[0]; type line.split(" ")[0] line.split(" ") line.split line " " 0 int num = Integer.parseInt(line.split(" ")[1]); num Integer.parseInt(line.split(" ")[1]) Integer.parseInt Integer line.split(" ")[1] line.split(" ") line.split line " " 1 main. havingCardCheck(type, num) main. havingCardCheck main type num main.notHavingCardDisp() main.notHavingCardDisp main String[] args args private void notHavingCardDisp() {
		for (int i = 0; i < cardList.size(); i++) {
			if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			}
		}
	} notHavingCardDisp {
		for (int i = 0; i < cardList.size(); i++) {
			if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			}
		}
	} for (int i = 0; i < cardList.size(); i++) {
			if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			}
		} int i = 0; int i = 0; i 0 i < cardList.size() i cardList.size() cardList.size cardList i++ i++ i {
			if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			}
		} {
			if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			}
		} if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			} !cardList.get(i).having cardList.get(i).having cardList.get(i) cardList.get cardList i cardList.get(i).having {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			} System.out.println(cardList.get(i).type + " " + cardList.get(i).num) System.out.println System.out System System.out cardList.get(i).type + " " + cardList.get(i).num cardList.get(i).type + " " + cardList.get(i).num cardList.get(i).type cardList.get(i) cardList.get cardList i cardList.get(i).type " " cardList.get(i).num cardList.get(i) cardList.get cardList i cardList.get(i).num private void havingCardCheck(String type, int num) {
		for (int i = 0; i < cardList.size(); i++) {
			if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			}
		}
	} havingCardCheck {
		for (int i = 0; i < cardList.size(); i++) {
			if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			}
		}
	} for (int i = 0; i < cardList.size(); i++) {
			if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			}
		} int i = 0; int i = 0; i 0 i < cardList.size() i cardList.size() cardList.size cardList i++ i++ i {
			if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			}
		} {
			if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			}
		} if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			} cardList.get(i).type.equals(type) && cardList.get(i).num == num cardList.get(i).type.equals(type) cardList.get(i).type.equals cardList.get(i).type cardList.get(i) cardList.get cardList i cardList.get(i).type type cardList.get(i).num == num cardList.get(i).num cardList.get(i) cardList.get cardList i cardList.get(i).num num {
				cardList.get(i).having = true;
				return;
			} cardList.get(i).having = true cardList.get(i).having cardList.get(i) cardList.get cardList i cardList.get(i).having true return; String type type int num num private void init() {
		cardList = new ArrayList<Trump>();
		cardList.add(new Trump("S", 1));
		cardList.add(new Trump("S", 2));
		cardList.add(new Trump("S", 3));
		cardList.add(new Trump("S", 4));
		cardList.add(new Trump("S", 5));
		cardList.add(new Trump("S", 6));
		cardList.add(new Trump("S", 7));
		cardList.add(new Trump("S", 8));
		cardList.add(new Trump("S", 9));
		cardList.add(new Trump("S", 10));
		cardList.add(new Trump("S", 11));
		cardList.add(new Trump("S", 12));
		cardList.add(new Trump("S", 13));

		cardList.add(new Trump("H", 1));
		cardList.add(new Trump("H", 2));
		cardList.add(new Trump("H", 3));
		cardList.add(new Trump("H", 4));
		cardList.add(new Trump("H", 5));
		cardList.add(new Trump("H", 6));
		cardList.add(new Trump("H", 7));
		cardList.add(new Trump("H", 8));
		cardList.add(new Trump("H", 9));
		cardList.add(new Trump("H", 10));
		cardList.add(new Trump("H", 11));
		cardList.add(new Trump("H", 12));
		cardList.add(new Trump("H", 13));

		cardList.add(new Trump("C", 1));
		cardList.add(new Trump("C", 2));
		cardList.add(new Trump("C", 3));
		cardList.add(new Trump("C", 4));
		cardList.add(new Trump("C", 5));
		cardList.add(new Trump("C", 6));
		cardList.add(new Trump("C", 7));
		cardList.add(new Trump("C", 8));
		cardList.add(new Trump("C", 9));
		cardList.add(new Trump("C", 10));
		cardList.add(new Trump("C", 11));
		cardList.add(new Trump("C", 12));
		cardList.add(new Trump("C", 13));

		cardList.add(new Trump("D", 1));
		cardList.add(new Trump("D", 2));
		cardList.add(new Trump("D", 3));
		cardList.add(new Trump("D", 4));
		cardList.add(new Trump("D", 5));
		cardList.add(new Trump("D", 6));
		cardList.add(new Trump("D", 7));
		cardList.add(new Trump("D", 8));
		cardList.add(new Trump("D", 9));
		cardList.add(new Trump("D", 10));
		cardList.add(new Trump("D", 11));
		cardList.add(new Trump("D", 12));
		cardList.add(new Trump("D", 13));
	} init {
		cardList = new ArrayList<Trump>();
		cardList.add(new Trump("S", 1));
		cardList.add(new Trump("S", 2));
		cardList.add(new Trump("S", 3));
		cardList.add(new Trump("S", 4));
		cardList.add(new Trump("S", 5));
		cardList.add(new Trump("S", 6));
		cardList.add(new Trump("S", 7));
		cardList.add(new Trump("S", 8));
		cardList.add(new Trump("S", 9));
		cardList.add(new Trump("S", 10));
		cardList.add(new Trump("S", 11));
		cardList.add(new Trump("S", 12));
		cardList.add(new Trump("S", 13));

		cardList.add(new Trump("H", 1));
		cardList.add(new Trump("H", 2));
		cardList.add(new Trump("H", 3));
		cardList.add(new Trump("H", 4));
		cardList.add(new Trump("H", 5));
		cardList.add(new Trump("H", 6));
		cardList.add(new Trump("H", 7));
		cardList.add(new Trump("H", 8));
		cardList.add(new Trump("H", 9));
		cardList.add(new Trump("H", 10));
		cardList.add(new Trump("H", 11));
		cardList.add(new Trump("H", 12));
		cardList.add(new Trump("H", 13));

		cardList.add(new Trump("C", 1));
		cardList.add(new Trump("C", 2));
		cardList.add(new Trump("C", 3));
		cardList.add(new Trump("C", 4));
		cardList.add(new Trump("C", 5));
		cardList.add(new Trump("C", 6));
		cardList.add(new Trump("C", 7));
		cardList.add(new Trump("C", 8));
		cardList.add(new Trump("C", 9));
		cardList.add(new Trump("C", 10));
		cardList.add(new Trump("C", 11));
		cardList.add(new Trump("C", 12));
		cardList.add(new Trump("C", 13));

		cardList.add(new Trump("D", 1));
		cardList.add(new Trump("D", 2));
		cardList.add(new Trump("D", 3));
		cardList.add(new Trump("D", 4));
		cardList.add(new Trump("D", 5));
		cardList.add(new Trump("D", 6));
		cardList.add(new Trump("D", 7));
		cardList.add(new Trump("D", 8));
		cardList.add(new Trump("D", 9));
		cardList.add(new Trump("D", 10));
		cardList.add(new Trump("D", 11));
		cardList.add(new Trump("D", 12));
		cardList.add(new Trump("D", 13));
	} cardList = new ArrayList<Trump>() cardList new ArrayList<Trump>() cardList.add(new Trump("S", 1)) cardList.add cardList new Trump("S", 1) cardList.add(new Trump("S", 2)) cardList.add cardList new Trump("S", 2) cardList.add(new Trump("S", 3)) cardList.add cardList new Trump("S", 3) cardList.add(new Trump("S", 4)) cardList.add cardList new Trump("S", 4) cardList.add(new Trump("S", 5)) cardList.add cardList new Trump("S", 5) cardList.add(new Trump("S", 6)) cardList.add cardList new Trump("S", 6) cardList.add(new Trump("S", 7)) cardList.add cardList new Trump("S", 7) cardList.add(new Trump("S", 8)) cardList.add cardList new Trump("S", 8) cardList.add(new Trump("S", 9)) cardList.add cardList new Trump("S", 9) cardList.add(new Trump("S", 10)) cardList.add cardList new Trump("S", 10) cardList.add(new Trump("S", 11)) cardList.add cardList new Trump("S", 11) cardList.add(new Trump("S", 12)) cardList.add cardList new Trump("S", 12) cardList.add(new Trump("S", 13)) cardList.add cardList new Trump("S", 13) cardList.add(new Trump("H", 1)) cardList.add cardList new Trump("H", 1) cardList.add(new Trump("H", 2)) cardList.add cardList new Trump("H", 2) cardList.add(new Trump("H", 3)) cardList.add cardList new Trump("H", 3) cardList.add(new Trump("H", 4)) cardList.add cardList new Trump("H", 4) cardList.add(new Trump("H", 5)) cardList.add cardList new Trump("H", 5) cardList.add(new Trump("H", 6)) cardList.add cardList new Trump("H", 6) cardList.add(new Trump("H", 7)) cardList.add cardList new Trump("H", 7) cardList.add(new Trump("H", 8)) cardList.add cardList new Trump("H", 8) cardList.add(new Trump("H", 9)) cardList.add cardList new Trump("H", 9) cardList.add(new Trump("H", 10)) cardList.add cardList new Trump("H", 10) cardList.add(new Trump("H", 11)) cardList.add cardList new Trump("H", 11) cardList.add(new Trump("H", 12)) cardList.add cardList new Trump("H", 12) cardList.add(new Trump("H", 13)) cardList.add cardList new Trump("H", 13) cardList.add(new Trump("C", 1)) cardList.add cardList new Trump("C", 1) cardList.add(new Trump("C", 2)) cardList.add cardList new Trump("C", 2) cardList.add(new Trump("C", 3)) cardList.add cardList new Trump("C", 3) cardList.add(new Trump("C", 4)) cardList.add cardList new Trump("C", 4) cardList.add(new Trump("C", 5)) cardList.add cardList new Trump("C", 5) cardList.add(new Trump("C", 6)) cardList.add cardList new Trump("C", 6) cardList.add(new Trump("C", 7)) cardList.add cardList new Trump("C", 7) cardList.add(new Trump("C", 8)) cardList.add cardList new Trump("C", 8) cardList.add(new Trump("C", 9)) cardList.add cardList new Trump("C", 9) cardList.add(new Trump("C", 10)) cardList.add cardList new Trump("C", 10) cardList.add(new Trump("C", 11)) cardList.add cardList new Trump("C", 11) cardList.add(new Trump("C", 12)) cardList.add cardList new Trump("C", 12) cardList.add(new Trump("C", 13)) cardList.add cardList new Trump("C", 13) cardList.add(new Trump("D", 1)) cardList.add cardList new Trump("D", 1) cardList.add(new Trump("D", 2)) cardList.add cardList new Trump("D", 2) cardList.add(new Trump("D", 3)) cardList.add cardList new Trump("D", 3) cardList.add(new Trump("D", 4)) cardList.add cardList new Trump("D", 4) cardList.add(new Trump("D", 5)) cardList.add cardList new Trump("D", 5) cardList.add(new Trump("D", 6)) cardList.add cardList new Trump("D", 6) cardList.add(new Trump("D", 7)) cardList.add cardList new Trump("D", 7) cardList.add(new Trump("D", 8)) cardList.add cardList new Trump("D", 8) cardList.add(new Trump("D", 9)) cardList.add cardList new Trump("D", 9) cardList.add(new Trump("D", 10)) cardList.add cardList new Trump("D", 10) cardList.add(new Trump("D", 11)) cardList.add cardList new Trump("D", 11) cardList.add(new Trump("D", 12)) cardList.add cardList new Trump("D", 12) cardList.add(new Trump("D", 13)) cardList.add cardList new Trump("D", 13) class Trump {
		Trump(String type, int num) {
			this.type = type;
			this.num = num;
			this.having = false;
		}

		private String type;
		private int num;
		private boolean having;
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		public int getNum() {
			return num;
		}
		public void setNum(int num) {
			this.num = num;
		}
		public boolean isHaving() {
			return having;
		}
		public void setHaving(boolean having) {
			this.having = having;
		}
	} Trump private String type; type private int num; num private boolean having; having Trump(String type, int num) {
			this.type = type;
			this.num = num;
			this.having = false;
		} Trump {
			this.type = type;
			this.num = num;
			this.having = false;
		} this.type = type this.type this this.type type this.num = num this.num this this.num num this.having = false this.having this this.having false String type type int num num public String getType() {
			return type;
		} getType {
			return type;
		} return type; type public void setType(String type) {
			this.type = type;
		} setType {
			this.type = type;
		} this.type = type this.type this this.type type String type type public int getNum() {
			return num;
		} getNum {
			return num;
		} return num; num public void setNum(int num) {
			this.num = num;
		} setNum {
			this.num = num;
		} this.num = num this.num this this.num num int num num public boolean isHaving() {
			return having;
		} isHaving {
			return having;
		} return having; having public void setHaving(boolean having) {
			this.having = having;
		} setHaving {
			this.having = having;
		} this.having = having this.having this this.having having boolean having having public class Main {
	private ArrayList<Trump> cardList;
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    Main main = new Main();
	    main.init();

	    int n = Integer.parseInt(br.readLine());

	    for (int i = 0; i < n; i++) {
		    String line = br.readLine();
		    String type = line.split(" ")[0];
		    int num = Integer.parseInt(line.split(" ")[1]);
		    main. havingCardCheck(type, num);
	    }

	    main.notHavingCardDisp();
	}

	private void notHavingCardDisp() {
		for (int i = 0; i < cardList.size(); i++) {
			if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			}
		}
	}

	private void havingCardCheck(String type, int num) {
		for (int i = 0; i < cardList.size(); i++) {
			if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			}
		}
	}

	private void init() {
		cardList = new ArrayList<Trump>();
		cardList.add(new Trump("S", 1));
		cardList.add(new Trump("S", 2));
		cardList.add(new Trump("S", 3));
		cardList.add(new Trump("S", 4));
		cardList.add(new Trump("S", 5));
		cardList.add(new Trump("S", 6));
		cardList.add(new Trump("S", 7));
		cardList.add(new Trump("S", 8));
		cardList.add(new Trump("S", 9));
		cardList.add(new Trump("S", 10));
		cardList.add(new Trump("S", 11));
		cardList.add(new Trump("S", 12));
		cardList.add(new Trump("S", 13));

		cardList.add(new Trump("H", 1));
		cardList.add(new Trump("H", 2));
		cardList.add(new Trump("H", 3));
		cardList.add(new Trump("H", 4));
		cardList.add(new Trump("H", 5));
		cardList.add(new Trump("H", 6));
		cardList.add(new Trump("H", 7));
		cardList.add(new Trump("H", 8));
		cardList.add(new Trump("H", 9));
		cardList.add(new Trump("H", 10));
		cardList.add(new Trump("H", 11));
		cardList.add(new Trump("H", 12));
		cardList.add(new Trump("H", 13));

		cardList.add(new Trump("C", 1));
		cardList.add(new Trump("C", 2));
		cardList.add(new Trump("C", 3));
		cardList.add(new Trump("C", 4));
		cardList.add(new Trump("C", 5));
		cardList.add(new Trump("C", 6));
		cardList.add(new Trump("C", 7));
		cardList.add(new Trump("C", 8));
		cardList.add(new Trump("C", 9));
		cardList.add(new Trump("C", 10));
		cardList.add(new Trump("C", 11));
		cardList.add(new Trump("C", 12));
		cardList.add(new Trump("C", 13));

		cardList.add(new Trump("D", 1));
		cardList.add(new Trump("D", 2));
		cardList.add(new Trump("D", 3));
		cardList.add(new Trump("D", 4));
		cardList.add(new Trump("D", 5));
		cardList.add(new Trump("D", 6));
		cardList.add(new Trump("D", 7));
		cardList.add(new Trump("D", 8));
		cardList.add(new Trump("D", 9));
		cardList.add(new Trump("D", 10));
		cardList.add(new Trump("D", 11));
		cardList.add(new Trump("D", 12));
		cardList.add(new Trump("D", 13));
	}

	class Trump {
		Trump(String type, int num) {
			this.type = type;
			this.num = num;
			this.having = false;
		}

		private String type;
		private int num;
		private boolean having;
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		public int getNum() {
			return num;
		}
		public void setNum(int num) {
			this.num = num;
		}
		public boolean isHaving() {
			return having;
		}
		public void setHaving(boolean having) {
			this.having = having;
		}
	}
} public class Main {
	private ArrayList<Trump> cardList;
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    Main main = new Main();
	    main.init();

	    int n = Integer.parseInt(br.readLine());

	    for (int i = 0; i < n; i++) {
		    String line = br.readLine();
		    String type = line.split(" ")[0];
		    int num = Integer.parseInt(line.split(" ")[1]);
		    main. havingCardCheck(type, num);
	    }

	    main.notHavingCardDisp();
	}

	private void notHavingCardDisp() {
		for (int i = 0; i < cardList.size(); i++) {
			if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			}
		}
	}

	private void havingCardCheck(String type, int num) {
		for (int i = 0; i < cardList.size(); i++) {
			if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			}
		}
	}

	private void init() {
		cardList = new ArrayList<Trump>();
		cardList.add(new Trump("S", 1));
		cardList.add(new Trump("S", 2));
		cardList.add(new Trump("S", 3));
		cardList.add(new Trump("S", 4));
		cardList.add(new Trump("S", 5));
		cardList.add(new Trump("S", 6));
		cardList.add(new Trump("S", 7));
		cardList.add(new Trump("S", 8));
		cardList.add(new Trump("S", 9));
		cardList.add(new Trump("S", 10));
		cardList.add(new Trump("S", 11));
		cardList.add(new Trump("S", 12));
		cardList.add(new Trump("S", 13));

		cardList.add(new Trump("H", 1));
		cardList.add(new Trump("H", 2));
		cardList.add(new Trump("H", 3));
		cardList.add(new Trump("H", 4));
		cardList.add(new Trump("H", 5));
		cardList.add(new Trump("H", 6));
		cardList.add(new Trump("H", 7));
		cardList.add(new Trump("H", 8));
		cardList.add(new Trump("H", 9));
		cardList.add(new Trump("H", 10));
		cardList.add(new Trump("H", 11));
		cardList.add(new Trump("H", 12));
		cardList.add(new Trump("H", 13));

		cardList.add(new Trump("C", 1));
		cardList.add(new Trump("C", 2));
		cardList.add(new Trump("C", 3));
		cardList.add(new Trump("C", 4));
		cardList.add(new Trump("C", 5));
		cardList.add(new Trump("C", 6));
		cardList.add(new Trump("C", 7));
		cardList.add(new Trump("C", 8));
		cardList.add(new Trump("C", 9));
		cardList.add(new Trump("C", 10));
		cardList.add(new Trump("C", 11));
		cardList.add(new Trump("C", 12));
		cardList.add(new Trump("C", 13));

		cardList.add(new Trump("D", 1));
		cardList.add(new Trump("D", 2));
		cardList.add(new Trump("D", 3));
		cardList.add(new Trump("D", 4));
		cardList.add(new Trump("D", 5));
		cardList.add(new Trump("D", 6));
		cardList.add(new Trump("D", 7));
		cardList.add(new Trump("D", 8));
		cardList.add(new Trump("D", 9));
		cardList.add(new Trump("D", 10));
		cardList.add(new Trump("D", 11));
		cardList.add(new Trump("D", 12));
		cardList.add(new Trump("D", 13));
	}

	class Trump {
		Trump(String type, int num) {
			this.type = type;
			this.num = num;
			this.having = false;
		}

		private String type;
		private int num;
		private boolean having;
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		public int getNum() {
			return num;
		}
		public void setNum(int num) {
			this.num = num;
		}
		public boolean isHaving() {
			return having;
		}
		public void setHaving(boolean having) {
			this.having = having;
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {
	private ArrayList<Trump> cardList;
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    Main main = new Main();
	    main.init();

	    int n = Integer.parseInt(br.readLine());

	    for (int i = 0; i < n; i++) {
		    String line = br.readLine();
		    String type = line.split(" ")[0];
		    int num = Integer.parseInt(line.split(" ")[1]);
		    main. havingCardCheck(type, num);
	    }

	    main.notHavingCardDisp();
	}

	private void notHavingCardDisp() {
		for (int i = 0; i < cardList.size(); i++) {
			if (!cardList.get(i).having) {
				System.out.println(cardList.get(i).type + " " + cardList.get(i).num);
			}
		}
	}

	private void havingCardCheck(String type, int num) {
		for (int i = 0; i < cardList.size(); i++) {
			if (cardList.get(i).type.equals(type) && cardList.get(i).num == num) {
				cardList.get(i).having = true;
				return;
			}
		}
	}

	private void init() {
		cardList = new ArrayList<Trump>();
		cardList.add(new Trump("S", 1));
		cardList.add(new Trump("S", 2));
		cardList.add(new Trump("S", 3));
		cardList.add(new Trump("S", 4));
		cardList.add(new Trump("S", 5));
		cardList.add(new Trump("S", 6));
		cardList.add(new Trump("S", 7));
		cardList.add(new Trump("S", 8));
		cardList.add(new Trump("S", 9));
		cardList.add(new Trump("S", 10));
		cardList.add(new Trump("S", 11));
		cardList.add(new Trump("S", 12));
		cardList.add(new Trump("S", 13));

		cardList.add(new Trump("H", 1));
		cardList.add(new Trump("H", 2));
		cardList.add(new Trump("H", 3));
		cardList.add(new Trump("H", 4));
		cardList.add(new Trump("H", 5));
		cardList.add(new Trump("H", 6));
		cardList.add(new Trump("H", 7));
		cardList.add(new Trump("H", 8));
		cardList.add(new Trump("H", 9));
		cardList.add(new Trump("H", 10));
		cardList.add(new Trump("H", 11));
		cardList.add(new Trump("H", 12));
		cardList.add(new Trump("H", 13));

		cardList.add(new Trump("C", 1));
		cardList.add(new Trump("C", 2));
		cardList.add(new Trump("C", 3));
		cardList.add(new Trump("C", 4));
		cardList.add(new Trump("C", 5));
		cardList.add(new Trump("C", 6));
		cardList.add(new Trump("C", 7));
		cardList.add(new Trump("C", 8));
		cardList.add(new Trump("C", 9));
		cardList.add(new Trump("C", 10));
		cardList.add(new Trump("C", 11));
		cardList.add(new Trump("C", 12));
		cardList.add(new Trump("C", 13));

		cardList.add(new Trump("D", 1));
		cardList.add(new Trump("D", 2));
		cardList.add(new Trump("D", 3));
		cardList.add(new Trump("D", 4));
		cardList.add(new Trump("D", 5));
		cardList.add(new Trump("D", 6));
		cardList.add(new Trump("D", 7));
		cardList.add(new Trump("D", 8));
		cardList.add(new Trump("D", 9));
		cardList.add(new Trump("D", 10));
		cardList.add(new Trump("D", 11));
		cardList.add(new Trump("D", 12));
		cardList.add(new Trump("D", 13));
	}

	class Trump {
		Trump(String type, int num) {
			this.type = type;
			this.num = num;
			this.having = false;
		}

		private String type;
		private int num;
		private boolean having;
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		public int getNum() {
			return num;
		}
		public void setNum(int num) {
			this.num = num;
		}
		public boolean isHaving() {
			return having;
		}
		public void setHaving(boolean having) {
			this.having = having;
		}
	}
}