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

public class Main {

	public static void main(String[] args) throws IOException {
		String[] card= {"S","H","C","D"};
		ArrayList<String> list=new ArrayList<String>();
		for(int j=0;j<=3;j++) {
			for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int count=0;

		while(n>count) {
			String m=br.readLine();
			list.remove(list.indexOf(m));
			count++;
		}

		for(String checked:list) {
			System.out.println(checked);
		}
	}

}
 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 public class Main {

	public static void main(String[] args) throws IOException {
		String[] card= {"S","H","C","D"};
		ArrayList<String> list=new ArrayList<String>();
		for(int j=0;j<=3;j++) {
			for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int count=0;

		while(n>count) {
			String m=br.readLine();
			list.remove(list.indexOf(m));
			count++;
		}

		for(String checked:list) {
			System.out.println(checked);
		}
	}

} Main public static void main(String[] args) throws IOException {
		String[] card= {"S","H","C","D"};
		ArrayList<String> list=new ArrayList<String>();
		for(int j=0;j<=3;j++) {
			for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int count=0;

		while(n>count) {
			String m=br.readLine();
			list.remove(list.indexOf(m));
			count++;
		}

		for(String checked:list) {
			System.out.println(checked);
		}
	} main {
		String[] card= {"S","H","C","D"};
		ArrayList<String> list=new ArrayList<String>();
		for(int j=0;j<=3;j++) {
			for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int count=0;

		while(n>count) {
			String m=br.readLine();
			list.remove(list.indexOf(m));
			count++;
		}

		for(String checked:list) {
			System.out.println(checked);
		}
	} String[] card= {"S","H","C","D"}; card {"S","H","C","D"} "S" "H" "C" "D" ArrayList<String> list=new ArrayList<String>(); list new ArrayList<String>() for(int j=0;j<=3;j++) {
			for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			}
		} int j=0; int j=0; j 0 j<=3 j 3 j++ j++ j {
			for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			}
		} {
			for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			}
		} for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
				list.add(card[j]+" "+String.valueOf(i));
			} {
				list.add(card[j]+" "+String.valueOf(i));
			} list.add(card[j]+" "+String.valueOf(i)) list.add list card[j]+" "+String.valueOf(i) card[j]+" "+String.valueOf(i) card[j] card j " " String.valueOf(i) String.valueOf String 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 int count=0; count 0 while(n>count) {
			String m=br.readLine();
			list.remove(list.indexOf(m));
			count++;
		} n>count n count {
			String m=br.readLine();
			list.remove(list.indexOf(m));
			count++;
		} String m=br.readLine(); m br.readLine() br.readLine br list.remove(list.indexOf(m)) list.remove list list.indexOf(m) list.indexOf list m count++ count for(String checked:list) {
			System.out.println(checked);
		} String checked list {
			System.out.println(checked);
		} {
			System.out.println(checked);
		} System.out.println(checked) System.out.println System.out System System.out checked String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		String[] card= {"S","H","C","D"};
		ArrayList<String> list=new ArrayList<String>();
		for(int j=0;j<=3;j++) {
			for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int count=0;

		while(n>count) {
			String m=br.readLine();
			list.remove(list.indexOf(m));
			count++;
		}

		for(String checked:list) {
			System.out.println(checked);
		}
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		String[] card= {"S","H","C","D"};
		ArrayList<String> list=new ArrayList<String>();
		for(int j=0;j<=3;j++) {
			for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int count=0;

		while(n>count) {
			String m=br.readLine();
			list.remove(list.indexOf(m));
			count++;
		}

		for(String checked:list) {
			System.out.println(checked);
		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) throws IOException {
		String[] card= {"S","H","C","D"};
		ArrayList<String> list=new ArrayList<String>();
		for(int j=0;j<=3;j++) {
			for(int i=1;i<=13;i++) {
				list.add(card[j]+" "+String.valueOf(i));
			}
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int count=0;

		while(n>count) {
			String m=br.readLine();
			list.remove(list.indexOf(m));
			count++;
		}

		for(String checked:list) {
			System.out.println(checked);
		}
	}

}

