import java.util.Scanner;


public class Main {


	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		
		int[] num = new int[52];
		String[] mark = new String[52];

		int[] s = new int[14];
		int[] h = new int[14];
		int[] c = new int[14];
		int[] d = new int[14];

		for(int i=1;i<=13;i++){
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		}


		for(int i=0;i<n;i++){
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		}

		for(int i=0;i<n;i++){
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		}


		for(int i=1;i<=13;i++){
			if(s[i] !=0 )System.out.println("S "+s[i]);
		}
		for(int i=1;i<=13;i++){
			if(h[i] !=0 )System.out.println("H "+h[i]);
		}
		for(int i=1;i<=13;i++){
			if(c[i] !=0 )System.out.println("C "+c[i]);
		}
		for(int i=1;i<=13;i++){
			if(d[i] !=0 )System.out.println("D "+d[i]);
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {


	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		
		int[] num = new int[52];
		String[] mark = new String[52];

		int[] s = new int[14];
		int[] h = new int[14];
		int[] c = new int[14];
		int[] d = new int[14];

		for(int i=1;i<=13;i++){
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		}


		for(int i=0;i<n;i++){
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		}

		for(int i=0;i<n;i++){
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		}


		for(int i=1;i<=13;i++){
			if(s[i] !=0 )System.out.println("S "+s[i]);
		}
		for(int i=1;i<=13;i++){
			if(h[i] !=0 )System.out.println("H "+h[i]);
		}
		for(int i=1;i<=13;i++){
			if(c[i] !=0 )System.out.println("C "+c[i]);
		}
		for(int i=1;i<=13;i++){
			if(d[i] !=0 )System.out.println("D "+d[i]);
		}
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		
		int[] num = new int[52];
		String[] mark = new String[52];

		int[] s = new int[14];
		int[] h = new int[14];
		int[] c = new int[14];
		int[] d = new int[14];

		for(int i=1;i<=13;i++){
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		}


		for(int i=0;i<n;i++){
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		}

		for(int i=0;i<n;i++){
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		}


		for(int i=1;i<=13;i++){
			if(s[i] !=0 )System.out.println("S "+s[i]);
		}
		for(int i=1;i<=13;i++){
			if(h[i] !=0 )System.out.println("H "+h[i]);
		}
		for(int i=1;i<=13;i++){
			if(c[i] !=0 )System.out.println("C "+c[i]);
		}
		for(int i=1;i<=13;i++){
			if(d[i] !=0 )System.out.println("D "+d[i]);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		
		int[] num = new int[52];
		String[] mark = new String[52];

		int[] s = new int[14];
		int[] h = new int[14];
		int[] c = new int[14];
		int[] d = new int[14];

		for(int i=1;i<=13;i++){
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		}


		for(int i=0;i<n;i++){
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		}

		for(int i=0;i<n;i++){
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		}


		for(int i=1;i<=13;i++){
			if(s[i] !=0 )System.out.println("S "+s[i]);
		}
		for(int i=1;i<=13;i++){
			if(h[i] !=0 )System.out.println("H "+h[i]);
		}
		for(int i=1;i<=13;i++){
			if(c[i] !=0 )System.out.println("C "+c[i]);
		}
		for(int i=1;i<=13;i++){
			if(d[i] !=0 )System.out.println("D "+d[i]);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] num = new int[52]; num new int[52] 52 String[] mark = new String[52]; mark new String[52] 52 int[] s = new int[14]; s new int[14] 14 int[] h = new int[14]; h new int[14] 14 int[] c = new int[14]; c new int[14] 14 int[] d = new int[14]; d new int[14] 14 for(int i=1;i<=13;i++){
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		} {
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		} s[i]=i s[i] s i i h[i]=i h[i] h i i c[i]=i c[i] c i i d[i]=i d[i] d i i for(int i=0;i<n;i++){
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		} {
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		} mark[i]=scan.next() mark[i] mark i scan.next() scan.next scan num[i]=scan.nextInt() num[i] num i scan.nextInt() scan.nextInt scan for(int i=0;i<n;i++){
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		} {
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		} if(mark[i].equals("S")) s[num[i]] = 0; mark[i].equals("S") mark[i].equals mark[i] mark i "S" s[num[i]] = 0 s[num[i]] s num[i] num i 0 if(mark[i].equals("H")) h[num[i]] = 0; mark[i].equals("H") mark[i].equals mark[i] mark i "H" h[num[i]] = 0 h[num[i]] h num[i] num i 0 if(mark[i].equals("C")) c[num[i]] = 0; mark[i].equals("C") mark[i].equals mark[i] mark i "C" c[num[i]] = 0 c[num[i]] c num[i] num i 0 if(mark[i].equals("D")) d[num[i]] = 0; mark[i].equals("D") mark[i].equals mark[i] mark i "D" d[num[i]] = 0 d[num[i]] d num[i] num i 0 for(int i=1;i<=13;i++){
			if(s[i] !=0 )System.out.println("S "+s[i]);
		} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
			if(s[i] !=0 )System.out.println("S "+s[i]);
		} {
			if(s[i] !=0 )System.out.println("S "+s[i]);
		} if(s[i] !=0 )System.out.println("S "+s[i]); s[i] !=0 s[i] s i 0 System.out.println("S "+s[i]) System.out.println System.out System System.out "S "+s[i] "S " s[i] s i for(int i=1;i<=13;i++){
			if(h[i] !=0 )System.out.println("H "+h[i]);
		} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
			if(h[i] !=0 )System.out.println("H "+h[i]);
		} {
			if(h[i] !=0 )System.out.println("H "+h[i]);
		} if(h[i] !=0 )System.out.println("H "+h[i]); h[i] !=0 h[i] h i 0 System.out.println("H "+h[i]) System.out.println System.out System System.out "H "+h[i] "H " h[i] h i for(int i=1;i<=13;i++){
			if(c[i] !=0 )System.out.println("C "+c[i]);
		} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
			if(c[i] !=0 )System.out.println("C "+c[i]);
		} {
			if(c[i] !=0 )System.out.println("C "+c[i]);
		} if(c[i] !=0 )System.out.println("C "+c[i]); c[i] !=0 c[i] c i 0 System.out.println("C "+c[i]) System.out.println System.out System System.out "C "+c[i] "C " c[i] c i for(int i=1;i<=13;i++){
			if(d[i] !=0 )System.out.println("D "+d[i]);
		} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
			if(d[i] !=0 )System.out.println("D "+d[i]);
		} {
			if(d[i] !=0 )System.out.println("D "+d[i]);
		} if(d[i] !=0 )System.out.println("D "+d[i]); d[i] !=0 d[i] d i 0 System.out.println("D "+d[i]) System.out.println System.out System System.out "D "+d[i] "D " d[i] d i String[] args args public class Main {


	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		
		int[] num = new int[52];
		String[] mark = new String[52];

		int[] s = new int[14];
		int[] h = new int[14];
		int[] c = new int[14];
		int[] d = new int[14];

		for(int i=1;i<=13;i++){
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		}


		for(int i=0;i<n;i++){
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		}

		for(int i=0;i<n;i++){
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		}


		for(int i=1;i<=13;i++){
			if(s[i] !=0 )System.out.println("S "+s[i]);
		}
		for(int i=1;i<=13;i++){
			if(h[i] !=0 )System.out.println("H "+h[i]);
		}
		for(int i=1;i<=13;i++){
			if(c[i] !=0 )System.out.println("C "+c[i]);
		}
		for(int i=1;i<=13;i++){
			if(d[i] !=0 )System.out.println("D "+d[i]);
		}
	}

} public class Main {


	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		
		int[] num = new int[52];
		String[] mark = new String[52];

		int[] s = new int[14];
		int[] h = new int[14];
		int[] c = new int[14];
		int[] d = new int[14];

		for(int i=1;i<=13;i++){
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		}


		for(int i=0;i<n;i++){
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		}

		for(int i=0;i<n;i++){
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		}


		for(int i=1;i<=13;i++){
			if(s[i] !=0 )System.out.println("S "+s[i]);
		}
		for(int i=1;i<=13;i++){
			if(h[i] !=0 )System.out.println("H "+h[i]);
		}
		for(int i=1;i<=13;i++){
			if(c[i] !=0 )System.out.println("C "+c[i]);
		}
		for(int i=1;i<=13;i++){
			if(d[i] !=0 )System.out.println("D "+d[i]);
		}
	}

} Main
import java.util.Scanner;


public class Main {


	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		
		int[] num = new int[52];
		String[] mark = new String[52];

		int[] s = new int[14];
		int[] h = new int[14];
		int[] c = new int[14];
		int[] d = new int[14];

		for(int i=1;i<=13;i++){
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		}


		for(int i=0;i<n;i++){
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		}

		for(int i=0;i<n;i++){
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		}


		for(int i=1;i<=13;i++){
			if(s[i] !=0 )System.out.println("S "+s[i]);
		}
		for(int i=1;i<=13;i++){
			if(h[i] !=0 )System.out.println("H "+h[i]);
		}
		for(int i=1;i<=13;i++){
			if(c[i] !=0 )System.out.println("C "+c[i]);
		}
		for(int i=1;i<=13;i++){
			if(d[i] !=0 )System.out.println("D "+d[i]);
		}
	}

}