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

public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] mark = { "S", "H", "C", "D" };
		String[] allCard = new String[52];
		for (int x = 0; x < 4; x += 1) {
			for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			}
		}
		int n = Integer.parseInt(in.readLine());
		String[] myCard = new String[n];
		for (int i = 0; i < n; i += 1) {
			String[] inputMyCard = in.readLine().split(" ");
			String thisMark = inputMyCard[0];
			int num = Integer.parseInt(inputMyCard[1]);
			myCard[i] = thisMark + " " + Integer.toString(num);
		}
		Boolean[] existCard = new Boolean[52];
		for (int p = 0; p < n; p += 1) {
			for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			}
		}
		for (int s = 0; s < 52; s += 1) {
			if (existCard[s] == null) {
				System.out.println(allCard[s]);
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] mark = { "S", "H", "C", "D" };
		String[] allCard = new String[52];
		for (int x = 0; x < 4; x += 1) {
			for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			}
		}
		int n = Integer.parseInt(in.readLine());
		String[] myCard = new String[n];
		for (int i = 0; i < n; i += 1) {
			String[] inputMyCard = in.readLine().split(" ");
			String thisMark = inputMyCard[0];
			int num = Integer.parseInt(inputMyCard[1]);
			myCard[i] = thisMark + " " + Integer.toString(num);
		}
		Boolean[] existCard = new Boolean[52];
		for (int p = 0; p < n; p += 1) {
			for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			}
		}
		for (int s = 0; s < 52; s += 1) {
			if (existCard[s] == null) {
				System.out.println(allCard[s]);
			}
		}
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] mark = { "S", "H", "C", "D" };
		String[] allCard = new String[52];
		for (int x = 0; x < 4; x += 1) {
			for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			}
		}
		int n = Integer.parseInt(in.readLine());
		String[] myCard = new String[n];
		for (int i = 0; i < n; i += 1) {
			String[] inputMyCard = in.readLine().split(" ");
			String thisMark = inputMyCard[0];
			int num = Integer.parseInt(inputMyCard[1]);
			myCard[i] = thisMark + " " + Integer.toString(num);
		}
		Boolean[] existCard = new Boolean[52];
		for (int p = 0; p < n; p += 1) {
			for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			}
		}
		for (int s = 0; s < 52; s += 1) {
			if (existCard[s] == null) {
				System.out.println(allCard[s]);
			}
		}
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] mark = { "S", "H", "C", "D" };
		String[] allCard = new String[52];
		for (int x = 0; x < 4; x += 1) {
			for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			}
		}
		int n = Integer.parseInt(in.readLine());
		String[] myCard = new String[n];
		for (int i = 0; i < n; i += 1) {
			String[] inputMyCard = in.readLine().split(" ");
			String thisMark = inputMyCard[0];
			int num = Integer.parseInt(inputMyCard[1]);
			myCard[i] = thisMark + " " + Integer.toString(num);
		}
		Boolean[] existCard = new Boolean[52];
		for (int p = 0; p < n; p += 1) {
			for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			}
		}
		for (int s = 0; s < 52; s += 1) {
			if (existCard[s] == null) {
				System.out.println(allCard[s]);
			}
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] mark = { "S", "H", "C", "D" }; mark { "S", "H", "C", "D" } "S" "H" "C" "D" String[] allCard = new String[52]; allCard new String[52] 52 for (int x = 0; x < 4; x += 1) {
			for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			}
		} int x = 0; int x = 0; x 0 x < 4 x 4 x += 1 x += 1 x 1 {
			for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			}
		} {
			for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			}
		} for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			} int y = 0; int y = 0; y 0 y < 13 y 13 y += 1 y += 1 y 1 {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			} {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			} for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				} int z = 0; int z = 0; z 0 z < 52 z 52 z += 1 z += 1 z 1 {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				} {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				} allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1)) allCard[13 * x + y] allCard 13 * x + y 13 * x 13 x y (mark[x] + " " + Integer
							.toString(y + 1)) mark[x] + " " + Integer
							.toString(y + 1) mark[x] mark x " " Integer
							.toString(y + 1) Integer
							.toString Integer y + 1 y 1 int n = Integer.parseInt(in.readLine()); n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in String[] myCard = new String[n]; myCard new String[n] n for (int i = 0; i < n; i += 1) {
			String[] inputMyCard = in.readLine().split(" ");
			String thisMark = inputMyCard[0];
			int num = Integer.parseInt(inputMyCard[1]);
			myCard[i] = thisMark + " " + Integer.toString(num);
		} int i = 0; int i = 0; i 0 i < n i n i += 1 i += 1 i 1 {
			String[] inputMyCard = in.readLine().split(" ");
			String thisMark = inputMyCard[0];
			int num = Integer.parseInt(inputMyCard[1]);
			myCard[i] = thisMark + " " + Integer.toString(num);
		} {
			String[] inputMyCard = in.readLine().split(" ");
			String thisMark = inputMyCard[0];
			int num = Integer.parseInt(inputMyCard[1]);
			myCard[i] = thisMark + " " + Integer.toString(num);
		} String[] inputMyCard = in.readLine().split(" "); inputMyCard in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " String thisMark = inputMyCard[0]; thisMark inputMyCard[0] inputMyCard 0 int num = Integer.parseInt(inputMyCard[1]); num Integer.parseInt(inputMyCard[1]) Integer.parseInt Integer inputMyCard[1] inputMyCard 1 myCard[i] = thisMark + " " + Integer.toString(num) myCard[i] myCard i thisMark + " " + Integer.toString(num) thisMark + " " + Integer.toString(num) thisMark " " Integer.toString(num) Integer.toString Integer num Boolean[] existCard = new Boolean[52]; existCard new Boolean[52] 52 for (int p = 0; p < n; p += 1) {
			for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			}
		} int p = 0; int p = 0; p 0 p < n p n p += 1 p += 1 p 1 {
			for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			}
		} {
			for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			}
		} for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			} int q = 0; int q = 0; q 0 q < 52 q 52 q += 1 q += 1 q 1 {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			} {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			} if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				} myCard[p].equals(allCard[q]) myCard[p].equals myCard[p] myCard p allCard[q] allCard q {
					existCard[q] = true;
				} existCard[q] = true existCard[q] existCard q true {
					continue;
				} continue; for (int s = 0; s < 52; s += 1) {
			if (existCard[s] == null) {
				System.out.println(allCard[s]);
			}
		} int s = 0; int s = 0; s 0 s < 52 s 52 s += 1 s += 1 s 1 {
			if (existCard[s] == null) {
				System.out.println(allCard[s]);
			}
		} {
			if (existCard[s] == null) {
				System.out.println(allCard[s]);
			}
		} if (existCard[s] == null) {
				System.out.println(allCard[s]);
			} existCard[s] == null existCard[s] existCard s null {
				System.out.println(allCard[s]);
			} System.out.println(allCard[s]) System.out.println System.out System System.out allCard[s] allCard s String[] args args public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] mark = { "S", "H", "C", "D" };
		String[] allCard = new String[52];
		for (int x = 0; x < 4; x += 1) {
			for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			}
		}
		int n = Integer.parseInt(in.readLine());
		String[] myCard = new String[n];
		for (int i = 0; i < n; i += 1) {
			String[] inputMyCard = in.readLine().split(" ");
			String thisMark = inputMyCard[0];
			int num = Integer.parseInt(inputMyCard[1]);
			myCard[i] = thisMark + " " + Integer.toString(num);
		}
		Boolean[] existCard = new Boolean[52];
		for (int p = 0; p < n; p += 1) {
			for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			}
		}
		for (int s = 0; s < 52; s += 1) {
			if (existCard[s] == null) {
				System.out.println(allCard[s]);
			}
		}
	}
} public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] mark = { "S", "H", "C", "D" };
		String[] allCard = new String[52];
		for (int x = 0; x < 4; x += 1) {
			for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			}
		}
		int n = Integer.parseInt(in.readLine());
		String[] myCard = new String[n];
		for (int i = 0; i < n; i += 1) {
			String[] inputMyCard = in.readLine().split(" ");
			String thisMark = inputMyCard[0];
			int num = Integer.parseInt(inputMyCard[1]);
			myCard[i] = thisMark + " " + Integer.toString(num);
		}
		Boolean[] existCard = new Boolean[52];
		for (int p = 0; p < n; p += 1) {
			for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			}
		}
		for (int s = 0; s < 52; s += 1) {
			if (existCard[s] == null) {
				System.out.println(allCard[s]);
			}
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] mark = { "S", "H", "C", "D" };
		String[] allCard = new String[52];
		for (int x = 0; x < 4; x += 1) {
			for (int y = 0; y < 13; y += 1) {
				for (int z = 0; z < 52; z += 1) {
					allCard[13 * x + y] = (mark[x] + " " + Integer
							.toString(y + 1));
				}
			}
		}
		int n = Integer.parseInt(in.readLine());
		String[] myCard = new String[n];
		for (int i = 0; i < n; i += 1) {
			String[] inputMyCard = in.readLine().split(" ");
			String thisMark = inputMyCard[0];
			int num = Integer.parseInt(inputMyCard[1]);
			myCard[i] = thisMark + " " + Integer.toString(num);
		}
		Boolean[] existCard = new Boolean[52];
		for (int p = 0; p < n; p += 1) {
			for (int q = 0; q < 52; q += 1) {
				if (myCard[p].equals(allCard[q])) {
					existCard[q] = true;
				} else {
					continue;
				}
			}
		}
		for (int s = 0; s < 52; s += 1) {
			if (existCard[s] == null) {
				System.out.println(allCard[s]);
			}
		}
	}
}