import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		new Problem().solve();
	}
}

class Problem {
	enum Mark {
		S(0), H(1), C(2), D(3);
		public final int id;
		Mark(int id) {
			this.id = id;
		}
		public static final int MARK_NUM = 4;
		public static int size() {
			return values().length;
		}
	}
	
	enum Rank {
		;
		public static final int MAX = 13;
	}
	
	public void solve() {
		List<List<Boolean>> cards = new ArrayList<>(Mark.MARK_NUM);
		for (int i = 0; i < Mark.MARK_NUM; i++) {
			List<Boolean> list = new ArrayList<>(Collections.nCopies(Rank.MAX,
					Boolean.valueOf(false)));
			cards.add(list);
		}
		
		Scanner sc = new Scanner(System.in);
		for (int i = 0, n = sc.nextInt(); i < n; i++) {
			Mark mark = Mark.valueOf(sc.next());
			int rank = sc.nextInt();
			cards.get(mark.id).set(rank - 1, true);
		}
		sc.close();
		
		for (Mark mark : Mark.values()) {
			for (int i = 0; i < Rank.MAX; i++) {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			}
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		new Problem().solve();
	}
} Main public static void main(String[] args) {
		new Problem().solve();
	} main {
		new Problem().solve();
	} new Problem().solve() new Problem().solve new Problem() String[] args args class Problem {
	enum Mark {
		S(0), H(1), C(2), D(3);
		public final int id;
		Mark(int id) {
			this.id = id;
		}
		public static final int MARK_NUM = 4;
		public static int size() {
			return values().length;
		}
	}
	
	enum Rank {
		;
		public static final int MAX = 13;
	}
	
	public void solve() {
		List<List<Boolean>> cards = new ArrayList<>(Mark.MARK_NUM);
		for (int i = 0; i < Mark.MARK_NUM; i++) {
			List<Boolean> list = new ArrayList<>(Collections.nCopies(Rank.MAX,
					Boolean.valueOf(false)));
			cards.add(list);
		}
		
		Scanner sc = new Scanner(System.in);
		for (int i = 0, n = sc.nextInt(); i < n; i++) {
			Mark mark = Mark.valueOf(sc.next());
			int rank = sc.nextInt();
			cards.get(mark.id).set(rank - 1, true);
		}
		sc.close();
		
		for (Mark mark : Mark.values()) {
			for (int i = 0; i < Rank.MAX; i++) {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			}
		}
	}
} Problem public void solve() {
		List<List<Boolean>> cards = new ArrayList<>(Mark.MARK_NUM);
		for (int i = 0; i < Mark.MARK_NUM; i++) {
			List<Boolean> list = new ArrayList<>(Collections.nCopies(Rank.MAX,
					Boolean.valueOf(false)));
			cards.add(list);
		}
		
		Scanner sc = new Scanner(System.in);
		for (int i = 0, n = sc.nextInt(); i < n; i++) {
			Mark mark = Mark.valueOf(sc.next());
			int rank = sc.nextInt();
			cards.get(mark.id).set(rank - 1, true);
		}
		sc.close();
		
		for (Mark mark : Mark.values()) {
			for (int i = 0; i < Rank.MAX; i++) {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			}
		}
	} solve {
		List<List<Boolean>> cards = new ArrayList<>(Mark.MARK_NUM);
		for (int i = 0; i < Mark.MARK_NUM; i++) {
			List<Boolean> list = new ArrayList<>(Collections.nCopies(Rank.MAX,
					Boolean.valueOf(false)));
			cards.add(list);
		}
		
		Scanner sc = new Scanner(System.in);
		for (int i = 0, n = sc.nextInt(); i < n; i++) {
			Mark mark = Mark.valueOf(sc.next());
			int rank = sc.nextInt();
			cards.get(mark.id).set(rank - 1, true);
		}
		sc.close();
		
		for (Mark mark : Mark.values()) {
			for (int i = 0; i < Rank.MAX; i++) {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			}
		}
	} List<List<Boolean>> cards = new ArrayList<>(Mark.MARK_NUM); cards new ArrayList<>(Mark.MARK_NUM) for (int i = 0; i < Mark.MARK_NUM; i++) {
			List<Boolean> list = new ArrayList<>(Collections.nCopies(Rank.MAX,
					Boolean.valueOf(false)));
			cards.add(list);
		} int i = 0; int i = 0; i 0 i < Mark.MARK_NUM i Mark.MARK_NUM Mark Mark.MARK_NUM i++ i++ i {
			List<Boolean> list = new ArrayList<>(Collections.nCopies(Rank.MAX,
					Boolean.valueOf(false)));
			cards.add(list);
		} {
			List<Boolean> list = new ArrayList<>(Collections.nCopies(Rank.MAX,
					Boolean.valueOf(false)));
			cards.add(list);
		} List<Boolean> list = new ArrayList<>(Collections.nCopies(Rank.MAX,
					Boolean.valueOf(false))); list new ArrayList<>(Collections.nCopies(Rank.MAX,
					Boolean.valueOf(false))) cards.add(list) cards.add cards list Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for (int i = 0, n = sc.nextInt(); i < n; i++) {
			Mark mark = Mark.valueOf(sc.next());
			int rank = sc.nextInt();
			cards.get(mark.id).set(rank - 1, true);
		} int i = 0, n = sc.nextInt(); int i = 0 i 0 n = sc.nextInt(); n sc.nextInt() sc.nextInt sc i < n i n i++ i++ i {
			Mark mark = Mark.valueOf(sc.next());
			int rank = sc.nextInt();
			cards.get(mark.id).set(rank - 1, true);
		} {
			Mark mark = Mark.valueOf(sc.next());
			int rank = sc.nextInt();
			cards.get(mark.id).set(rank - 1, true);
		} Mark mark = Mark.valueOf(sc.next()); mark Mark.valueOf(sc.next()) Mark.valueOf Mark sc.next() sc.next sc int rank = sc.nextInt(); rank sc.nextInt() sc.nextInt sc cards.get(mark.id).set(rank - 1, true) cards.get(mark.id).set cards.get(mark.id) cards.get cards mark.id mark mark.id rank - 1 rank 1 true sc.close() sc.close sc for (Mark mark : Mark.values()) {
			for (int i = 0; i < Rank.MAX; i++) {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			}
		} Mark mark Mark.values() Mark.values Mark {
			for (int i = 0; i < Rank.MAX; i++) {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			}
		} {
			for (int i = 0; i < Rank.MAX; i++) {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			}
		} for (int i = 0; i < Rank.MAX; i++) {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			} int i = 0; int i = 0; i 0 i < Rank.MAX i Rank.MAX Rank Rank.MAX i++ i++ i {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			} {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			} if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				} !cards.get(mark.id).get(i) cards.get(mark.id).get(i) cards.get(mark.id).get cards.get(mark.id) cards.get cards mark.id mark mark.id i {
					System.out.println(mark.name() + " " + (i + 1));
				} System.out.println(mark.name() + " " + (i + 1)) System.out.println System.out System System.out mark.name() + " " + (i + 1) mark.name() + " " + (i + 1) mark.name() mark.name mark " " (i + 1) i 1 enum Mark {
		S(0), H(1), C(2), D(3);
		public final int id;
		Mark(int id) {
			this.id = id;
		}
		public static final int MARK_NUM = 4;
		public static int size() {
			return values().length;
		}
	} Mark S(0) S H(1) H C(2) C D(3) D public final int id; id public static final int MARK_NUM = 4; MARK_NUM 4 Mark(int id) {
			this.id = id;
		} Mark {
			this.id = id;
		} this.id = id this.id this this.id id int id id public static int size() {
			return values().length;
		} size {
			return values().length;
		} return values().length; values().length values() values values().length import java.util.ArrayList;
impor import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.ut enum Rank {
		;
		public static final int MAX = 13;
	} Rank public static final int MAX = 13; MAX 13 import java.util.ArrayList;
impor import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.ut public class Main {
	public static void main(String[] args) {
		new Problem().solve();
	}
} public class Main {
	public static void main(String[] args) {
		new Problem().solve();
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		new Problem().solve();
	}
}

class Problem {
	enum Mark {
		S(0), H(1), C(2), D(3);
		public final int id;
		Mark(int id) {
			this.id = id;
		}
		public static final int MARK_NUM = 4;
		public static int size() {
			return values().length;
		}
	}
	
	enum Rank {
		;
		public static final int MAX = 13;
	}
	
	public void solve() {
		List<List<Boolean>> cards = new ArrayList<>(Mark.MARK_NUM);
		for (int i = 0; i < Mark.MARK_NUM; i++) {
			List<Boolean> list = new ArrayList<>(Collections.nCopies(Rank.MAX,
					Boolean.valueOf(false)));
			cards.add(list);
		}
		
		Scanner sc = new Scanner(System.in);
		for (int i = 0, n = sc.nextInt(); i < n; i++) {
			Mark mark = Mark.valueOf(sc.next());
			int rank = sc.nextInt();
			cards.get(mark.id).set(rank - 1, true);
		}
		sc.close();
		
		for (Mark mark : Mark.values()) {
			for (int i = 0; i < Rank.MAX; i++) {
				if (!cards.get(mark.id).get(i)) {
					System.out.println(mark.name() + " " + (i + 1));
				}
			}
		}
	}
}