import java.io.*;

public class Main {
	
	public static void main(String[] args) throws NumberFormatException, IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		
		Card[][] cardSet = new Card[4][14];
		for (int i = 0 ; i < cardSet.length; i++) {
			for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			}
		}
		
		int n = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		int a, b = 0;
		for (int i = 0; i < n; i++) {
			str = br.readLine().split("\\s+");
			a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4;
			b = Integer.parseInt(str[1]);
			cardSet[a][b].setIsOwn(true);;
		}

		for (Card[] cards : cardSet) {
			for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			}
		}
	}
}

class Card {
	private String suitbyRom;
	private int number;
	private Boolean isOwn;
	
	public Card(int i, int j) {
		this.suitbyRom = 0 == i ? "S" : 1 == i ? "H" : 2 == i ? "C" : 3 == i ? "D" : "X";
		this.number = j;
		this.isOwn = false;
	}
	
	public String getSuitbyRom() {
		return this.suitbyRom;
	}
	
	public int getNumber() {
		return this.number;
	}
	
	public Boolean getIsOwn() {
		return this.isOwn;
	}
	
	public void setIsOwn(Boolean bool) {
		this.isOwn = bool;
	}
	
} import java.io.*; io.* java public class Main {
	
	public static void main(String[] args) throws NumberFormatException, IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		
		Card[][] cardSet = new Card[4][14];
		for (int i = 0 ; i < cardSet.length; i++) {
			for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			}
		}
		
		int n = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		int a, b = 0;
		for (int i = 0; i < n; i++) {
			str = br.readLine().split("\\s+");
			a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4;
			b = Integer.parseInt(str[1]);
			cardSet[a][b].setIsOwn(true);;
		}

		for (Card[] cards : cardSet) {
			for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			}
		}
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		
		Card[][] cardSet = new Card[4][14];
		for (int i = 0 ; i < cardSet.length; i++) {
			for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			}
		}
		
		int n = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		int a, b = 0;
		for (int i = 0; i < n; i++) {
			str = br.readLine().split("\\s+");
			a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4;
			b = Integer.parseInt(str[1]);
			cardSet[a][b].setIsOwn(true);;
		}

		for (Card[] cards : cardSet) {
			for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			}
		}
	} main {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		
		Card[][] cardSet = new Card[4][14];
		for (int i = 0 ; i < cardSet.length; i++) {
			for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			}
		}
		
		int n = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		int a, b = 0;
		for (int i = 0; i < n; i++) {
			str = br.readLine().split("\\s+");
			a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4;
			b = Integer.parseInt(str[1]);
			cardSet[a][b].setIsOwn(true);;
		}

		for (Card[] cards : cardSet) {
			for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() Card[][] cardSet = new Card[4][14]; cardSet new Card[4][14] 4 14 for (int i = 0 ; i < cardSet.length; i++) {
			for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			}
		} int i = 0 ; int i = 0 ; i 0 i < cardSet.length i cardSet.length cardSet cardSet.length i++ i++ i {
			for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			}
		} {
			for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			}
		} for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			} int j = 0; int j = 0; j 0 j < cardSet[i].length j cardSet[i].length cardSet[i] cardSet i cardSet[i].length j++ j++ j {
				cardSet[i][j] = new Card(i, j);
			} {
				cardSet[i][j] = new Card(i, j);
			} cardSet[i][j] = new Card(i, j) cardSet[i][j] cardSet[i] cardSet i j new Card(i, j) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] str = new String[2]; str new String[2] 2 int a a b = 0; b 0 for (int i = 0; i < n; i++) {
			str = br.readLine().split("\\s+");
			a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4;
			b = Integer.parseInt(str[1]);
			cardSet[a][b].setIsOwn(true);;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			str = br.readLine().split("\\s+");
			a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4;
			b = Integer.parseInt(str[1]);
			cardSet[a][b].setIsOwn(true);;
		} {
			str = br.readLine().split("\\s+");
			a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4;
			b = Integer.parseInt(str[1]);
			cardSet[a][b].setIsOwn(true);;
		} str = br.readLine().split("\\s+") str br.readLine().split("\\s+") br.readLine().split br.readLine() br.readLine br "\\s+" a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4 a "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4 "S".equals(str[0]) "S".equals "S" str[0] str 0 0 "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4 "H".equals(str[0]) "H".equals "H" str[0] str 0 1 "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4 "C".equals(str[0]) "C".equals "C" str[0] str 0 2 "D".equals(str[0]) ? 3 : 4 "D".equals(str[0]) "D".equals "D" str[0] str 0 3 4 b = Integer.parseInt(str[1]) b Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 cardSet[a][b].setIsOwn(true) cardSet[a][b].setIsOwn cardSet[a][b] cardSet[a] cardSet a b true for (Card[] cards : cardSet) {
			for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			}
		} Card[] cards cardSet {
			for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			}
		} {
			for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			}
		} for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			} Card card cards {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			} {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			} if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber()); !card.getIsOwn() && card.getNumber() != 0 !card.getIsOwn() card.getIsOwn() card.getIsOwn card card.getNumber() != 0 card.getNumber() card.getNumber card 0 System.out.println(card.getSuitbyRom() + " " + card.getNumber()) System.out.println System.out System System.out card.getSuitbyRom() + " " + card.getNumber() card.getSuitbyRom() + " " + card.getNumber() card.getSuitbyRom() card.getSuitbyRom card " " card.getNumber() card.getNumber card String[] args args class Card {
	private String suitbyRom;
	private int number;
	private Boolean isOwn;
	
	public Card(int i, int j) {
		this.suitbyRom = 0 == i ? "S" : 1 == i ? "H" : 2 == i ? "C" : 3 == i ? "D" : "X";
		this.number = j;
		this.isOwn = false;
	}
	
	public String getSuitbyRom() {
		return this.suitbyRom;
	}
	
	public int getNumber() {
		return this.number;
	}
	
	public Boolean getIsOwn() {
		return this.isOwn;
	}
	
	public void setIsOwn(Boolean bool) {
		this.isOwn = bool;
	}
	
} Card private String suitbyRom; suitbyRom private int number; number private Boolean isOwn; isOwn public Card(int i, int j) {
		this.suitbyRom = 0 == i ? "S" : 1 == i ? "H" : 2 == i ? "C" : 3 == i ? "D" : "X";
		this.number = j;
		this.isOwn = false;
	} Card {
		this.suitbyRom = 0 == i ? "S" : 1 == i ? "H" : 2 == i ? "C" : 3 == i ? "D" : "X";
		this.number = j;
		this.isOwn = false;
	} this.suitbyRom = 0 == i ? "S" : 1 == i ? "H" : 2 == i ? "C" : 3 == i ? "D" : "X" this.suitbyRom this this.suitbyRom 0 == i ? "S" : 1 == i ? "H" : 2 == i ? "C" : 3 == i ? "D" : "X" 0 == i 0 i "S" 1 == i ? "H" : 2 == i ? "C" : 3 == i ? "D" : "X" 1 == i 1 i "H" 2 == i ? "C" : 3 == i ? "D" : "X" 2 == i 2 i "C" 3 == i ? "D" : "X" 3 == i 3 i "D" "X" this.number = j this.number this this.number j this.isOwn = false this.isOwn this this.isOwn false int i i int j j public String getSuitbyRom() {
		return this.suitbyRom;
	} getSuitbyRom {
		return this.suitbyRom;
	} return this.suitbyRom; this.suitbyRom this this.suitbyRom public int getNumber() {
		return this.number;
	} getNumber {
		return this.number;
	} return this.number; this.number this this.number public Boolean getIsOwn() {
		return this.isOwn;
	} getIsOwn {
		return this.isOwn;
	} return this.isOwn; this.isOwn this this.isOwn public void setIsOwn(Boolean bool) {
		this.isOwn = bool;
	} setIsOwn {
		this.isOwn = bool;
	} this.isOwn = bool this.isOwn this this.isOwn bool Boolean bool bool public class Main {
	
	public static void main(String[] args) throws NumberFormatException, IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		
		Card[][] cardSet = new Card[4][14];
		for (int i = 0 ; i < cardSet.length; i++) {
			for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			}
		}
		
		int n = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		int a, b = 0;
		for (int i = 0; i < n; i++) {
			str = br.readLine().split("\\s+");
			a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4;
			b = Integer.parseInt(str[1]);
			cardSet[a][b].setIsOwn(true);;
		}

		for (Card[] cards : cardSet) {
			for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			}
		}
	}
} public class Main {
	
	public static void main(String[] args) throws NumberFormatException, IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		
		Card[][] cardSet = new Card[4][14];
		for (int i = 0 ; i < cardSet.length; i++) {
			for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			}
		}
		
		int n = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		int a, b = 0;
		for (int i = 0; i < n; i++) {
			str = br.readLine().split("\\s+");
			a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4;
			b = Integer.parseInt(str[1]);
			cardSet[a][b].setIsOwn(true);;
		}

		for (Card[] cards : cardSet) {
			for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			}
		}
	}
} Main
import java.io.*;

public class Main {
	
	public static void main(String[] args) throws NumberFormatException, IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		
		Card[][] cardSet = new Card[4][14];
		for (int i = 0 ; i < cardSet.length; i++) {
			for (int j = 0; j < cardSet[i].length; j++) {
				cardSet[i][j] = new Card(i, j);
			}
		}
		
		int n = Integer.parseInt(br.readLine());
		String[] str = new String[2];
		int a, b = 0;
		for (int i = 0; i < n; i++) {
			str = br.readLine().split("\\s+");
			a = "S".equals(str[0]) ? 0 : "H".equals(str[0]) ? 1 : "C".equals(str[0]) ? 2 : "D".equals(str[0]) ? 3 : 4;
			b = Integer.parseInt(str[1]);
			cardSet[a][b].setIsOwn(true);;
		}

		for (Card[] cards : cardSet) {
			for (Card card : cards) {
				if (!card.getIsOwn() && card.getNumber() != 0) System.out.println(card.getSuitbyRom() + " " + card.getNumber());
			}
		}
	}
}

class Card {
	private String suitbyRom;
	private int number;
	private Boolean isOwn;
	
	public Card(int i, int j) {
		this.suitbyRom = 0 == i ? "S" : 1 == i ? "H" : 2 == i ? "C" : 3 == i ? "D" : "X";
		this.number = j;
		this.isOwn = false;
	}
	
	public String getSuitbyRom() {
		return this.suitbyRom;
	}
	
	public int getNumber() {
		return this.number;
	}
	
	public Boolean getIsOwn() {
		return this.isOwn;
	}
	
	public void setIsOwn(Boolean bool) {
		this.isOwn = bool;
	}
	
}