import java.util.*;
  
public class Main {
    Scanner sc = new Scanner(System.in);
  
    public static void main(String[] args) {
        new Main(); 
    }
  
    public Main() {
        new TEST().doIt();
    }
    class TEST{
    	String c[] = {"S","H","C","D"};
        void doIt(){
        	int n = sc.nextInt();
        	boolean t[][] = new boolean [4][13];
        	for(int i = 0;i < n;i++){
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	}
        	for(int i = 0;i < 4;i++){
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	}
        }
    }
} import java.util.*; util.* java public class Main {
    Scanner sc = new Scanner(System.in);
  
    public static void main(String[] args) {
        new Main(); 
    }
  
    public Main() {
        new TEST().doIt();
    }
    class TEST{
    	String c[] = {"S","H","C","D"};
        void doIt(){
        	int n = sc.nextInt();
        	boolean t[][] = new boolean [4][13];
        	for(int i = 0;i < n;i++){
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	}
        	for(int i = 0;i < 4;i++){
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	}
        }
    }
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        new Main(); 
    } main {
        new Main(); 
    } new Main() String[] args args public Main() {
        new TEST().doIt();
    } Main {
        new TEST().doIt();
    } new TEST().doIt() new TEST().doIt new TEST() class TEST{
    	String c[] = {"S","H","C","D"};
        void doIt(){
        	int n = sc.nextInt();
        	boolean t[][] = new boolean [4][13];
        	for(int i = 0;i < n;i++){
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	}
        	for(int i = 0;i < 4;i++){
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	}
        }
    } TEST String c[] = {"S","H","C","D"}; c {"S","H","C","D"} "S" "H" "C" "D" void doIt(){
        	int n = sc.nextInt();
        	boolean t[][] = new boolean [4][13];
        	for(int i = 0;i < n;i++){
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	}
        	for(int i = 0;i < 4;i++){
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	}
        } doIt {
        	int n = sc.nextInt();
        	boolean t[][] = new boolean [4][13];
        	for(int i = 0;i < n;i++){
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	}
        	for(int i = 0;i < 4;i++){
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	}
        } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean t[][] = new boolean [4][13]; t new boolean [4][13] 4 13 for(int i = 0;i < n;i++){
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	} {
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	} String str = sc.next(); str sc.next() sc.next sc int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		} int j = 0; int j = 0; j 0 j < 4 j 4 j++ j++ j {
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		} {
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		} if(str.equals(c[j])){
        				t[j][num-1] = true;
        			} str.equals(c[j]) str.equals str c[j] c j {
        				t[j][num-1] = true;
        			} t[j][num-1] = true t[j][num-1] t[j] t j num-1 num 1 true for(int i = 0;i < 4;i++){
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	} {
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	} for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		} {
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		} if(!t[i][j])System.out.println(c[i]+" "+(j+1)); !t[i][j] t[i][j] t[i] t i j System.out.println(c[i]+" "+(j+1)) System.out.println System.out System System.out c[i]+" "+(j+1) c[i]+" "+(j+1) c[i] c i " " (j+1) j 1 public class Main {
    Scanner sc = new Scanner(System.in);
  
    public static void main(String[] args) {
        new Main(); 
    }
  
    public Main() {
        new TEST().doIt();
    }
    class TEST{
    	String c[] = {"S","H","C","D"};
        void doIt(){
        	int n = sc.nextInt();
        	boolean t[][] = new boolean [4][13];
        	for(int i = 0;i < n;i++){
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	}
        	for(int i = 0;i < 4;i++){
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	}
        }
    }
} public class Main {
    Scanner sc = new Scanner(System.in);
  
    public static void main(String[] args) {
        new Main(); 
    }
  
    public Main() {
        new TEST().doIt();
    }
    class TEST{
    	String c[] = {"S","H","C","D"};
        void doIt(){
        	int n = sc.nextInt();
        	boolean t[][] = new boolean [4][13];
        	for(int i = 0;i < n;i++){
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	}
        	for(int i = 0;i < 4;i++){
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	}
        }
    }
} Main
import java.util.*;
  
public class Main {
    Scanner sc = new Scanner(System.in);
  
    public static void main(String[] args) {
        new Main(); 
    }
  
    public Main() {
        new TEST().doIt();
    }
    class TEST{
    	String c[] = {"S","H","C","D"};
        void doIt(){
        	int n = sc.nextInt();
        	boolean t[][] = new boolean [4][13];
        	for(int i = 0;i < n;i++){
        		String str = sc.next();
        		int num = sc.nextInt();
        		for(int j = 0;j < 4;j++){
        			if(str.equals(c[j])){
        				t[j][num-1] = true;
        			}
        		}
        	}
        	for(int i = 0;i < 4;i++){
        		for(int j = 0;j < 13;j++){
        			if(!t[i][j])System.out.println(c[i]+" "+(j+1));
        		}
        	}
        }
    }
}