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

public class Main {
	enum priorityFigure{
		S(0),H(1),C(2),D(3);

		private int priority;
		private priorityFigure(int priority){
			this.priority = priority;
		}
	}
	public static void main(String[] args) throws IOException{
		int num, insertionPoint;
		String[] str, list;
		list = new String[52];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();

		num = Integer.parseInt(br.readLine());
		for(int i = 0; i < num; i++){
			str = br.readLine().split(" ");
			if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			}
			list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1];
		}
		for(int i = 0; i < 52; i++){
			if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			}
		}
		if(builder.length()!=0){
			builder.delete(builder.length() - 1, builder.length());
			System.out.println(builder);
		}
		br.close();
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	enum priorityFigure{
		S(0),H(1),C(2),D(3);

		private int priority;
		private priorityFigure(int priority){
			this.priority = priority;
		}
	}
	public static void main(String[] args) throws IOException{
		int num, insertionPoint;
		String[] str, list;
		list = new String[52];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();

		num = Integer.parseInt(br.readLine());
		for(int i = 0; i < num; i++){
			str = br.readLine().split(" ");
			if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			}
			list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1];
		}
		for(int i = 0; i < 52; i++){
			if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			}
		}
		if(builder.length()!=0){
			builder.delete(builder.length() - 1, builder.length());
			System.out.println(builder);
		}
		br.close();
	}
} Main public static void main(String[] args) throws IOException{
		int num, insertionPoint;
		String[] str, list;
		list = new String[52];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();

		num = Integer.parseInt(br.readLine());
		for(int i = 0; i < num; i++){
			str = br.readLine().split(" ");
			if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			}
			list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1];
		}
		for(int i = 0; i < 52; i++){
			if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			}
		}
		if(builder.length()!=0){
			builder.delete(builder.length() - 1, builder.length());
			System.out.println(builder);
		}
		br.close();
	} main {
		int num, insertionPoint;
		String[] str, list;
		list = new String[52];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();

		num = Integer.parseInt(br.readLine());
		for(int i = 0; i < num; i++){
			str = br.readLine().split(" ");
			if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			}
			list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1];
		}
		for(int i = 0; i < 52; i++){
			if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			}
		}
		if(builder.length()!=0){
			builder.delete(builder.length() - 1, builder.length());
			System.out.println(builder);
		}
		br.close();
	} int num num insertionPoint; insertionPoint String[] str str list; list list = new String[52] list new String[52] 52 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder builder = new StringBuilder(); builder new StringBuilder() num = Integer.parseInt(br.readLine()) num Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < num; i++){
			str = br.readLine().split(" ");
			if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			}
			list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1];
		} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
			str = br.readLine().split(" ");
			if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			}
			list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1];
		} {
			str = br.readLine().split(" ");
			if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			}
			list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1];
		} str = br.readLine().split(" ") str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			} str[0].equals("S") str[0].equals str[0] str 0 "S" {
				insertionPoint = priorityFigure.S.priority * 13;
			} insertionPoint = priorityFigure.S.priority * 13 insertionPoint priorityFigure.S.priority * 13 priorityFigure.S.priority priorityFigure.S priorityFigure priorityFigure.S priorityFigure.S.priority 13 if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			} str[0].equals("H") str[0].equals str[0] str 0 "H" {
				insertionPoint = priorityFigure.H.priority * 13;
			} insertionPoint = priorityFigure.H.priority * 13 insertionPoint priorityFigure.H.priority * 13 priorityFigure.H.priority priorityFigure.H priorityFigure priorityFigure.H priorityFigure.H.priority 13 if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			} str[0].equals("C") str[0].equals str[0] str 0 "C" {
				insertionPoint = priorityFigure.C.priority * 13;
			} insertionPoint = priorityFigure.C.priority * 13 insertionPoint priorityFigure.C.priority * 13 priorityFigure.C.priority priorityFigure.C priorityFigure priorityFigure.C priorityFigure.C.priority 13 {
				insertionPoint = priorityFigure.D.priority * 13;
			} insertionPoint = priorityFigure.D.priority * 13 insertionPoint priorityFigure.D.priority * 13 priorityFigure.D.priority priorityFigure.D priorityFigure priorityFigure.D priorityFigure.D.priority 13 list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1] list[Integer.parseInt(str[1]) + insertionPoint - 1] list Integer.parseInt(str[1]) + insertionPoint - 1 Integer.parseInt(str[1]) + insertionPoint Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 insertionPoint 1 str[1] str 1 for(int i = 0; i < 52; i++){
			if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			}
		} int i = 0; int i = 0; i 0 i < 52 i 52 i++ i++ i {
			if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			}
		} {
			if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			}
		} if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			} list[i] == null list[i] list i null {
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			} String figure; figure if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				} i / 13 == priorityFigure.S.priority i / 13 i 13 priorityFigure.S.priority priorityFigure.S priorityFigure priorityFigure.S priorityFigure.S.priority {
					figure = "S";
				} figure = "S" figure "S" if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				} i / 13 ==  priorityFigure.H.priority i / 13 i 13 priorityFigure.H.priority priorityFigure.H priorityFigure priorityFigure.H priorityFigure.H.priority {
					figure = "H";
				} figure = "H" figure "H" if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				} i / 13 == priorityFigure.C.priority i / 13 i 13 priorityFigure.C.priority priorityFigure.C priorityFigure priorityFigure.C priorityFigure.C.priority {
					figure = "C";
				} figure = "C" figure "C" {
					figure = "D";
				} figure = "D" figure "D" if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				} (i + 1) % 13 == 0 (i + 1) % 13 (i + 1) i 1 13 0 {
					num = 13;
				} num = 13 num 13 {
					num =(i + 1) % 13;
				} num =(i + 1) % 13 num (i + 1) % 13 (i + 1) i 1 13 builder.append(figure + " " + num + "\n") builder.append builder figure + " " + num + "\n" num figure + " " + num + "\n" figure " " num "\n" if(builder.length()!=0){
			builder.delete(builder.length() - 1, builder.length());
			System.out.println(builder);
		} builder.length()!=0 builder.length() builder.length builder 0 {
			builder.delete(builder.length() - 1, builder.length());
			System.out.println(builder);
		} builder.delete(builder.length() - 1, builder.length()) builder.delete builder builder.length() - 1 builder.length() builder.length builder 1 builder.length() builder.length builder System.out.println(builder) System.out.println System.out System System.out builder br.close() br.close br String[] args args enum priorityFigure{
		S(0),H(1),C(2),D(3);

		private int priority;
		private priorityFigure(int priority){
			this.priority = priority;
		}
	} priorityFigure S(0) S H(1) H C(2) C D(3) D private int priority; priority private priorityFigure(int priority){
			this.priority = priority;
		} priorityFigure {
			this.priority = priority;
		} this.priority = priority this.priority this this.priority priority int priority priority import java.io.BufferedReader;
import java. import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public clas public class Main {
	enum priorityFigure{
		S(0),H(1),C(2),D(3);

		private int priority;
		private priorityFigure(int priority){
			this.priority = priority;
		}
	}
	public static void main(String[] args) throws IOException{
		int num, insertionPoint;
		String[] str, list;
		list = new String[52];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();

		num = Integer.parseInt(br.readLine());
		for(int i = 0; i < num; i++){
			str = br.readLine().split(" ");
			if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			}
			list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1];
		}
		for(int i = 0; i < 52; i++){
			if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			}
		}
		if(builder.length()!=0){
			builder.delete(builder.length() - 1, builder.length());
			System.out.println(builder);
		}
		br.close();
	}
} public class Main {
	enum priorityFigure{
		S(0),H(1),C(2),D(3);

		private int priority;
		private priorityFigure(int priority){
			this.priority = priority;
		}
	}
	public static void main(String[] args) throws IOException{
		int num, insertionPoint;
		String[] str, list;
		list = new String[52];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();

		num = Integer.parseInt(br.readLine());
		for(int i = 0; i < num; i++){
			str = br.readLine().split(" ");
			if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			}
			list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1];
		}
		for(int i = 0; i < 52; i++){
			if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			}
		}
		if(builder.length()!=0){
			builder.delete(builder.length() - 1, builder.length());
			System.out.println(builder);
		}
		br.close();
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	enum priorityFigure{
		S(0),H(1),C(2),D(3);

		private int priority;
		private priorityFigure(int priority){
			this.priority = priority;
		}
	}
	public static void main(String[] args) throws IOException{
		int num, insertionPoint;
		String[] str, list;
		list = new String[52];

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();

		num = Integer.parseInt(br.readLine());
		for(int i = 0; i < num; i++){
			str = br.readLine().split(" ");
			if(str[0].equals("S")){
				insertionPoint = priorityFigure.S.priority * 13;
			}else if(str[0].equals("H")){
				insertionPoint = priorityFigure.H.priority * 13;
			}else if(str[0].equals("C")){
				insertionPoint = priorityFigure.C.priority * 13;
			}else{
				insertionPoint = priorityFigure.D.priority * 13;
			}
			list[Integer.parseInt(str[1]) + insertionPoint - 1] = str[1];
		}
		for(int i = 0; i < 52; i++){
			if(list[i] == null){
				String figure;
				if(i / 13 == priorityFigure.S.priority){
					figure = "S";
				}else if(i / 13 ==  priorityFigure.H.priority){
					figure = "H";
				}else if(i / 13 == priorityFigure.C.priority){
					figure = "C";
				}else{
					figure = "D";
				}
				if((i + 1) % 13 == 0){
					num = 13;
				}else{
					num =(i + 1) % 13;
				}
				builder.append(figure + " " + num + "\n");
			}
		}
		if(builder.length()!=0){
			builder.delete(builder.length() - 1, builder.length());
			System.out.println(builder);
		}
		br.close();
	}
}