import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		while ((s = stdIn.readLine()) != null) {
			int pcs = Integer.valueOf(s);
			Card[] mine = new Card[pcs];
			for (int i = 0; i < pcs; i++) {
				mine[i] = new Card(stdIn.readLine());
			}
			for (int m = 0; m < 4; m++)
				for (int r = 1; r <= 13; r++)
					doMain(m, r, mine);
		}
		System.exit(0);
	}

	private static void doMain(int mark, int rank, Card[] mine) {
		for (int i = 0; i < mine.length; i++)
			if (mine[i].isEqual(mark, rank))
				return;
		switch (mark) {
		case (0):
			System.out.println("S " + rank);
			break;
		case (1):
			System.out.println("H " + rank);
			break;
		case (2):
			System.out.println("C " + rank);
			break;
		case (3):
			System.out.println("D " + rank);
			break;
		}
	}
}

class Card {
	public Card(String s) {
		String[] se = s.split(" ");
		switch (se[0]) {
		case ("S"):
			mark = 0;
			break;
		case ("H"):
			mark = 1;
			break;
		case ("C"):
			mark = 2;
			break;
		case ("D"):
			mark = 3;
			break;
		}
		rank = Integer.valueOf(se[1]);
	}

	public boolean isEqual(int mark2, int rank2) {
		if (mark == mark2 && rank == rank2)
			return true;
		else
			return false;
	}

	private int mark;
	private int rank;
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		while ((s = stdIn.readLine()) != null) {
			int pcs = Integer.valueOf(s);
			Card[] mine = new Card[pcs];
			for (int i = 0; i < pcs; i++) {
				mine[i] = new Card(stdIn.readLine());
			}
			for (int m = 0; m < 4; m++)
				for (int r = 1; r <= 13; r++)
					doMain(m, r, mine);
		}
		System.exit(0);
	}

	private static void doMain(int mark, int rank, Card[] mine) {
		for (int i = 0; i < mine.length; i++)
			if (mine[i].isEqual(mark, rank))
				return;
		switch (mark) {
		case (0):
			System.out.println("S " + rank);
			break;
		case (1):
			System.out.println("H " + rank);
			break;
		case (2):
			System.out.println("C " + rank);
			break;
		case (3):
			System.out.println("D " + rank);
			break;
		}
	}
} Main public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		while ((s = stdIn.readLine()) != null) {
			int pcs = Integer.valueOf(s);
			Card[] mine = new Card[pcs];
			for (int i = 0; i < pcs; i++) {
				mine[i] = new Card(stdIn.readLine());
			}
			for (int m = 0; m < 4; m++)
				for (int r = 1; r <= 13; r++)
					doMain(m, r, mine);
		}
		System.exit(0);
	} main {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		while ((s = stdIn.readLine()) != null) {
			int pcs = Integer.valueOf(s);
			Card[] mine = new Card[pcs];
			for (int i = 0; i < pcs; i++) {
				mine[i] = new Card(stdIn.readLine());
			}
			for (int m = 0; m < 4; m++)
				for (int r = 1; r <= 13; r++)
					doMain(m, r, mine);
		}
		System.exit(0);
	} BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in)); stdIn new BufferedReader(new InputStreamReader(System.in)) String s; s while ((s = stdIn.readLine()) != null) {
			int pcs = Integer.valueOf(s);
			Card[] mine = new Card[pcs];
			for (int i = 0; i < pcs; i++) {
				mine[i] = new Card(stdIn.readLine());
			}
			for (int m = 0; m < 4; m++)
				for (int r = 1; r <= 13; r++)
					doMain(m, r, mine);
		} (s = stdIn.readLine()) != null (s = stdIn.readLine()) s stdIn.readLine() stdIn.readLine stdIn null {
			int pcs = Integer.valueOf(s);
			Card[] mine = new Card[pcs];
			for (int i = 0; i < pcs; i++) {
				mine[i] = new Card(stdIn.readLine());
			}
			for (int m = 0; m < 4; m++)
				for (int r = 1; r <= 13; r++)
					doMain(m, r, mine);
		} int pcs = Integer.valueOf(s); pcs Integer.valueOf(s) Integer.valueOf Integer s Card[] mine = new Card[pcs]; mine new Card[pcs] pcs for (int i = 0; i < pcs; i++) {
				mine[i] = new Card(stdIn.readLine());
			} int i = 0; int i = 0; i 0 i < pcs i pcs i++ i++ i {
				mine[i] = new Card(stdIn.readLine());
			} {
				mine[i] = new Card(stdIn.readLine());
			} mine[i] = new Card(stdIn.readLine()) mine[i] mine i new Card(stdIn.readLine()) for (int m = 0; m < 4; m++)
				for (int r = 1; r <= 13; r++)
					doMain(m, r, mine); int m = 0; int m = 0; m 0 m < 4 m 4 m++ m++ m for (int r = 1; r <= 13; r++)
					doMain(m, r, mine); for (int r = 1; r <= 13; r++)
					doMain(m, r, mine); int r = 1; int r = 1; r 1 r <= 13 r 13 r++ r++ r doMain(m, r, mine); doMain(m, r, mine) doMain m r mine System.exit(0) System.exit System 0 String[] args args private static void doMain(int mark, int rank, Card[] mine) {
		for (int i = 0; i < mine.length; i++)
			if (mine[i].isEqual(mark, rank))
				return;
		switch (mark) {
		case (0):
			System.out.println("S " + rank);
			break;
		case (1):
			System.out.println("H " + rank);
			break;
		case (2):
			System.out.println("C " + rank);
			break;
		case (3):
			System.out.println("D " + rank);
			break;
		}
	} doMain {
		for (int i = 0; i < mine.length; i++)
			if (mine[i].isEqual(mark, rank))
				return;
		switch (mark) {
		case (0):
			System.out.println("S " + rank);
			break;
		case (1):
			System.out.println("H " + rank);
			break;
		case (2):
			System.out.println("C " + rank);
			break;
		case (3):
			System.out.println("D " + rank);
			break;
		}
	} for (int i = 0; i < mine.length; i++)
			if (mine[i].isEqual(mark, rank))
				return; int i = 0; int i = 0; i 0 i < mine.length i mine.length mine mine.length i++ i++ i if (mine[i].isEqual(mark, rank))
				return; if (mine[i].isEqual(mark, rank))
				return; mine[i].isEqual(mark, rank) mine[i].isEqual mine[i] mine i mark rank return; switch (mark) {
		case (0):
			System.out.println("S " + rank);
			break;
		case (1):
			System.out.println("H " + rank);
			break;
		case (2):
			System.out.println("C " + rank);
			break;
		case (3):
			System.out.println("D " + rank);
			break;
		} mark case (0): (0) case (0): System.out.println("S " + rank) System.out.println System.out System System.out "S " + rank "S " rank break; case (1): (1) case (1): System.out.println("H " + rank) System.out.println System.out System System.out "H " + rank "H " rank break; case (2): (2) case (2): System.out.println("C " + rank) System.out.println System.out System System.out "C " + rank "C " rank break; case (3): (3) case (3): System.out.println("D " + rank) System.out.println System.out System System.out "D " + rank "D " rank break; int mark mark int rank rank Card[] mine mine class Card {
	public Card(String s) {
		String[] se = s.split(" ");
		switch (se[0]) {
		case ("S"):
			mark = 0;
			break;
		case ("H"):
			mark = 1;
			break;
		case ("C"):
			mark = 2;
			break;
		case ("D"):
			mark = 3;
			break;
		}
		rank = Integer.valueOf(se[1]);
	}

	public boolean isEqual(int mark2, int rank2) {
		if (mark == mark2 && rank == rank2)
			return true;
		else
			return false;
	}

	private int mark;
	private int rank;
} Card private int mark; mark private int rank; rank public Card(String s) {
		String[] se = s.split(" ");
		switch (se[0]) {
		case ("S"):
			mark = 0;
			break;
		case ("H"):
			mark = 1;
			break;
		case ("C"):
			mark = 2;
			break;
		case ("D"):
			mark = 3;
			break;
		}
		rank = Integer.valueOf(se[1]);
	} Card {
		String[] se = s.split(" ");
		switch (se[0]) {
		case ("S"):
			mark = 0;
			break;
		case ("H"):
			mark = 1;
			break;
		case ("C"):
			mark = 2;
			break;
		case ("D"):
			mark = 3;
			break;
		}
		rank = Integer.valueOf(se[1]);
	} String[] se = s.split(" "); se s.split(" ") s.split s " " switch (se[0]) {
		case ("S"):
			mark = 0;
			break;
		case ("H"):
			mark = 1;
			break;
		case ("C"):
			mark = 2;
			break;
		case ("D"):
			mark = 3;
			break;
		} se[0] se 0 case ("S"): ("S") case ("S"): mark = 0 mark 0 break; case ("H"): ("H") case ("H"): mark = 1 mark 1 break; case ("C"): ("C") case ("C"): mark = 2 mark 2 break; case ("D"): ("D") case ("D"): mark = 3 mark 3 break; rank = Integer.valueOf(se[1]) rank Integer.valueOf(se[1]) Integer.valueOf Integer se[1] se 1 String s s public boolean isEqual(int mark2, int rank2) {
		if (mark == mark2 && rank == rank2)
			return true;
		else
			return false;
	} isEqual {
		if (mark == mark2 && rank == rank2)
			return true;
		else
			return false;
	} if (mark == mark2 && rank == rank2)
			return true;
		else
			return false; mark == mark2 && rank == rank2 mark == mark2 mark mark2 rank == rank2 rank rank2 return true; true return false; false int mark2 mark2 int rank2 rank2 public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		while ((s = stdIn.readLine()) != null) {
			int pcs = Integer.valueOf(s);
			Card[] mine = new Card[pcs];
			for (int i = 0; i < pcs; i++) {
				mine[i] = new Card(stdIn.readLine());
			}
			for (int m = 0; m < 4; m++)
				for (int r = 1; r <= 13; r++)
					doMain(m, r, mine);
		}
		System.exit(0);
	}

	private static void doMain(int mark, int rank, Card[] mine) {
		for (int i = 0; i < mine.length; i++)
			if (mine[i].isEqual(mark, rank))
				return;
		switch (mark) {
		case (0):
			System.out.println("S " + rank);
			break;
		case (1):
			System.out.println("H " + rank);
			break;
		case (2):
			System.out.println("C " + rank);
			break;
		case (3):
			System.out.println("D " + rank);
			break;
		}
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		while ((s = stdIn.readLine()) != null) {
			int pcs = Integer.valueOf(s);
			Card[] mine = new Card[pcs];
			for (int i = 0; i < pcs; i++) {
				mine[i] = new Card(stdIn.readLine());
			}
			for (int m = 0; m < 4; m++)
				for (int r = 1; r <= 13; r++)
					doMain(m, r, mine);
		}
		System.exit(0);
	}

	private static void doMain(int mark, int rank, Card[] mine) {
		for (int i = 0; i < mine.length; i++)
			if (mine[i].isEqual(mark, rank))
				return;
		switch (mark) {
		case (0):
			System.out.println("S " + rank);
			break;
		case (1):
			System.out.println("H " + rank);
			break;
		case (2):
			System.out.println("C " + rank);
			break;
		case (3):
			System.out.println("D " + rank);
			break;
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
		String s;
		while ((s = stdIn.readLine()) != null) {
			int pcs = Integer.valueOf(s);
			Card[] mine = new Card[pcs];
			for (int i = 0; i < pcs; i++) {
				mine[i] = new Card(stdIn.readLine());
			}
			for (int m = 0; m < 4; m++)
				for (int r = 1; r <= 13; r++)
					doMain(m, r, mine);
		}
		System.exit(0);
	}

	private static void doMain(int mark, int rank, Card[] mine) {
		for (int i = 0; i < mine.length; i++)
			if (mine[i].isEqual(mark, rank))
				return;
		switch (mark) {
		case (0):
			System.out.println("S " + rank);
			break;
		case (1):
			System.out.println("H " + rank);
			break;
		case (2):
			System.out.println("C " + rank);
			break;
		case (3):
			System.out.println("D " + rank);
			break;
		}
	}
}

class Card {
	public Card(String s) {
		String[] se = s.split(" ");
		switch (se[0]) {
		case ("S"):
			mark = 0;
			break;
		case ("H"):
			mark = 1;
			break;
		case ("C"):
			mark = 2;
			break;
		case ("D"):
			mark = 3;
			break;
		}
		rank = Integer.valueOf(se[1]);
	}

	public boolean isEqual(int mark2, int rank2) {
		if (mark == mark2 && rank == rank2)
			return true;
		else
			return false;
	}

	private int mark;
	private int rank;
}