import java.util.*;
import java.io.*;

class Card{
 char mark;
 int num;
 boolean have = false;
 static List<Card> allCards = new ArrayList<Card>();

 Card(char mark, int num){
	this.mark = mark;
	this.num = num;
	
}
}

public class Main{
public static void main(String[] args){

 char[] marks ={'S','H','C','D'};
 
	for(char mark: marks){
		for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		}
	}

	try{
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 int n = Integer.parseInt(br.readLine());
	 	for(int a = 0; a < n; a++ ){
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		}
	}catch(IOException e){
	 System.out.println(e);
	}

	for(Card c : Card.allCards){
		if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		}
	}
}
} import java.util.*; util.* java import java.io.*; io.* java class Card{
 char mark;
 int num;
 boolean have = false;
 static List<Card> allCards = new ArrayList<Card>();

 Card(char mark, int num){
	this.mark = mark;
	this.num = num;
	
}
} Card char mark; mark int num; num boolean have = false; have false static List<Card> allCards = new ArrayList<Card>(); allCards new ArrayList<Card>() Card(char mark, int num){
	this.mark = mark;
	this.num = num;
	
} Card {
	this.mark = mark;
	this.num = num;
	
} this.mark = mark this.mark this this.mark mark this.num = num this.num this this.num num char mark mark int num num public class Main{
public static void main(String[] args){

 char[] marks ={'S','H','C','D'};
 
	for(char mark: marks){
		for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		}
	}

	try{
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 int n = Integer.parseInt(br.readLine());
	 	for(int a = 0; a < n; a++ ){
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		}
	}catch(IOException e){
	 System.out.println(e);
	}

	for(Card c : Card.allCards){
		if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		}
	}
}
} Main public static void main(String[] args){

 char[] marks ={'S','H','C','D'};
 
	for(char mark: marks){
		for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		}
	}

	try{
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 int n = Integer.parseInt(br.readLine());
	 	for(int a = 0; a < n; a++ ){
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		}
	}catch(IOException e){
	 System.out.println(e);
	}

	for(Card c : Card.allCards){
		if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		}
	}
} main {

 char[] marks ={'S','H','C','D'};
 
	for(char mark: marks){
		for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		}
	}

	try{
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 int n = Integer.parseInt(br.readLine());
	 	for(int a = 0; a < n; a++ ){
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		}
	}catch(IOException e){
	 System.out.println(e);
	}

	for(Card c : Card.allCards){
		if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		}
	}
} char[] marks ={'S','H','C','D'}; marks {'S','H','C','D'} 'S' 'H' 'C' 'D' for(char mark: marks){
		for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		}
	} char mark marks {
		for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		}
	} {
		for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		}
	} for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		} int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
		 Card.allCards.add(new Card(mark, i+1));
		} {
		 Card.allCards.add(new Card(mark, i+1));
		} Card.allCards.add(new Card(mark, i+1)) Card.allCards.add Card.allCards Card Card.allCards new Card(mark, i+1) try{
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 int n = Integer.parseInt(br.readLine());
	 	for(int a = 0; a < n; a++ ){
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		}
	}catch(IOException e){
	 System.out.println(e);
	} catch(IOException e){
	 System.out.println(e);
	} IOException e {
	 System.out.println(e);
	} System.out.println(e) System.out.println System.out System System.out e {
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 int n = Integer.parseInt(br.readLine());
	 	for(int a = 0; a < n; a++ ){
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		}
	} 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 for(int a = 0; a < n; a++ ){
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		} int a = 0; int a = 0; a 0 a < n a n a++ a++ a {
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		} {
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		} String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			} Card c Card.allCards Card Card.allCards {
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			} {
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			} if(c.mark != str[0].charAt(0)){
					continue;
				} c.mark != str[0].charAt(0) c.mark c c.mark str[0].charAt(0) str[0].charAt str[0] str 0 0 {
					continue;
				} continue; if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				} c.num == Integer.parseInt(str[1]) c.num c c.num Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 {
					c.have = true;
				} c.have = true c.have c c.have true for(Card c : Card.allCards){
		if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		}
	} Card c Card.allCards Card Card.allCards {
		if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		}
	} {
		if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		}
	} if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		} c.have == false c.have c c.have false {
		 System.out.println(c.mark + " " + c.num);
		} System.out.println(c.mark + " " + c.num) System.out.println System.out System System.out c.mark + " " + c.num c.mark + " " + c.num c.mark c c.mark " " c.num c c.num String[] args args public class Main{
public static void main(String[] args){

 char[] marks ={'S','H','C','D'};
 
	for(char mark: marks){
		for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		}
	}

	try{
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 int n = Integer.parseInt(br.readLine());
	 	for(int a = 0; a < n; a++ ){
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		}
	}catch(IOException e){
	 System.out.println(e);
	}

	for(Card c : Card.allCards){
		if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		}
	}
}
} public class Main{
public static void main(String[] args){

 char[] marks ={'S','H','C','D'};
 
	for(char mark: marks){
		for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		}
	}

	try{
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 int n = Integer.parseInt(br.readLine());
	 	for(int a = 0; a < n; a++ ){
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		}
	}catch(IOException e){
	 System.out.println(e);
	}

	for(Card c : Card.allCards){
		if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		}
	}
}
} Main
import java.util.*;
import java.io.*;

class Card{
 char mark;
 int num;
 boolean have = false;
 static List<Card> allCards = new ArrayList<Card>();

 Card(char mark, int num){
	this.mark = mark;
	this.num = num;
	
}
}

public class Main{
public static void main(String[] args){

 char[] marks ={'S','H','C','D'};
 
	for(char mark: marks){
		for(int i = 0; i < 13; i++){
		 Card.allCards.add(new Card(mark, i+1));
		}
	}

	try{
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 int n = Integer.parseInt(br.readLine());
	 	for(int a = 0; a < n; a++ ){
	  	 String[] str = br.readLine().split(" ");
		 	for(Card c : Card.allCards){
				if(c.mark != str[0].charAt(0)){
					continue;
				}
				if(c.num == Integer.parseInt(str[1])){
					c.have = true;
				}
			}
		}
	}catch(IOException e){
	 System.out.println(e);
	}

	for(Card c : Card.allCards){
		if(c.have == false){
		 System.out.println(c.mark + " " + c.num);
		}
	}
}
}