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

public class Main {
	public static void main(String[] args) throws IOException {
		char[] marks = {'S', 'H', 'C', 'D'};

		for(char mark : marks) {
			for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			String[] arr = str.split(" ");
			for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			}
		}

		for (Card card : Card.allCards) {
			if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			}
		}
	}
}

class Card {
	char mark;
	int rank;
	boolean have = false;
	static List<Card> allCards = new ArrayList<Card>();

	Card(char mark, int rank) {
		this.mark = mark;
		this.rank = rank;
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util public class Main {
	public static void main(String[] args) throws IOException {
		char[] marks = {'S', 'H', 'C', 'D'};

		for(char mark : marks) {
			for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			String[] arr = str.split(" ");
			for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			}
		}

		for (Card card : Card.allCards) {
			if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			}
		}
	}
} Main public static void main(String[] args) throws IOException {
		char[] marks = {'S', 'H', 'C', 'D'};

		for(char mark : marks) {
			for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			String[] arr = str.split(" ");
			for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			}
		}

		for (Card card : Card.allCards) {
			if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			}
		}
	} main {
		char[] marks = {'S', 'H', 'C', 'D'};

		for(char mark : marks) {
			for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			String[] arr = str.split(" ");
			for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			}
		}

		for (Card card : Card.allCards) {
			if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			}
		}
	} char[] marks = {'S', 'H', 'C', 'D'}; marks {'S', 'H', 'C', 'D'} 'S' 'H' 'C' 'D' for(char mark : marks) {
			for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			}
		} char mark marks {
			for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			}
		} {
			for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			}
		} for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			} int i = 1; int i = 1; i 1 i <= 13 i 13 i++ i++ i {
				Card.allCards.add(new Card(mark, i));
			} {
				Card.allCards.add(new Card(mark, i));
			} Card.allCards.add(new Card(mark, i)) Card.allCards.add Card.allCards Card Card.allCards new Card(mark, i) 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 for (int i = 0; i < n; i++) {
			String str = br.readLine();
			String[] arr = str.split(" ");
			for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String str = br.readLine();
			String[] arr = str.split(" ");
			for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			}
		} {
			String str = br.readLine();
			String[] arr = str.split(" ");
			for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			}
		} String str = br.readLine(); str br.readLine() br.readLine br String[] arr = str.split(" "); arr str.split(" ") str.split str " " for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			} Card card Card.allCards Card Card.allCards {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			} {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			} if (card.mark != arr[0].charAt(0)) {
					continue;
				} card.mark != arr[0].charAt(0) card.mark card card.mark arr[0].charAt(0) arr[0].charAt arr[0] arr 0 0 {
					continue;
				} continue; if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				} card.rank == Integer.parseInt(arr[1]) card.rank card card.rank Integer.parseInt(arr[1]) Integer.parseInt Integer arr[1] arr 1 {
					card.have = true;
				} card.have = true card.have card card.have true for (Card card : Card.allCards) {
			if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			}
		} Card card Card.allCards Card Card.allCards {
			if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			}
		} {
			if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			}
		} if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			} !card.have card.have card card.have {
				System.out.println(card.mark + " " + card.rank);
			} System.out.println(card.mark + " " + card.rank) System.out.println System.out System System.out card.mark + " " + card.rank card.mark + " " + card.rank card.mark card card.mark " " card.rank card card.rank String[] args args class Card {
	char mark;
	int rank;
	boolean have = false;
	static List<Card> allCards = new ArrayList<Card>();

	Card(char mark, int rank) {
		this.mark = mark;
		this.rank = rank;
	}
} Card char mark; mark int rank; rank boolean have = false; have false static List<Card> allCards = new ArrayList<Card>(); allCards new ArrayList<Card>() Card(char mark, int rank) {
		this.mark = mark;
		this.rank = rank;
	} Card {
		this.mark = mark;
		this.rank = rank;
	} this.mark = mark this.mark this this.mark mark this.rank = rank this.rank this this.rank rank char mark mark int rank rank public class Main {
	public static void main(String[] args) throws IOException {
		char[] marks = {'S', 'H', 'C', 'D'};

		for(char mark : marks) {
			for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			String[] arr = str.split(" ");
			for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			}
		}

		for (Card card : Card.allCards) {
			if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			}
		}
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		char[] marks = {'S', 'H', 'C', 'D'};

		for(char mark : marks) {
			for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			String[] arr = str.split(" ");
			for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			}
		}

		for (Card card : Card.allCards) {
			if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			}
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class Main {
	public static void main(String[] args) throws IOException {
		char[] marks = {'S', 'H', 'C', 'D'};

		for(char mark : marks) {
			for (int i = 1; i <= 13; i++) {
				Card.allCards.add(new Card(mark, i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for (int i = 0; i < n; i++) {
			String str = br.readLine();
			String[] arr = str.split(" ");
			for (Card card : Card.allCards) {
				if (card.mark != arr[0].charAt(0)) {
					continue;
				}
				if (card.rank == Integer.parseInt(arr[1])) {
					card.have = true;
				}
			}
		}

		for (Card card : Card.allCards) {
			if (!card.have) {
				System.out.println(card.mark + " " + card.rank);
			}
		}
	}
}

class Card {
	char mark;
	int rank;
	boolean have = false;
	static List<Card> allCards = new ArrayList<Card>();

	Card(char mark, int rank) {
		this.mark = mark;
		this.rank = rank;
	}
}