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

public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String have = br.readLine();
		int[][] card = new int[4][13];
		int exc = 0 ;
		String[] mark = {"S","H","C","D"};
		for(int i= 0 ; i < Integer.parseInt(have) ; i++){
			String str = br.readLine();
			String[] strc = str.split(" ");
			if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			}
		}
		for(int j = 0 ; j < card.length ; j++){
			for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			}
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String have = br.readLine();
		int[][] card = new int[4][13];
		int exc = 0 ;
		String[] mark = {"S","H","C","D"};
		for(int i= 0 ; i < Integer.parseInt(have) ; i++){
			String str = br.readLine();
			String[] strc = str.split(" ");
			if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			}
		}
		for(int j = 0 ; j < card.length ; j++){
			for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			}
		}
	}

} Main public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String have = br.readLine();
		int[][] card = new int[4][13];
		int exc = 0 ;
		String[] mark = {"S","H","C","D"};
		for(int i= 0 ; i < Integer.parseInt(have) ; i++){
			String str = br.readLine();
			String[] strc = str.split(" ");
			if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			}
		}
		for(int j = 0 ; j < card.length ; j++){
			for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			}
		}
	} main {
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String have = br.readLine();
		int[][] card = new int[4][13];
		int exc = 0 ;
		String[] mark = {"S","H","C","D"};
		for(int i= 0 ; i < Integer.parseInt(have) ; i++){
			String str = br.readLine();
			String[] strc = str.split(" ");
			if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			}
		}
		for(int j = 0 ; j < card.length ; j++){
			for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			}
		}
	} BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String have = br.readLine(); have br.readLine() br.readLine br int[][] card = new int[4][13]; card new int[4][13] 4 13 int exc = 0 ; exc 0 String[] mark = {"S","H","C","D"}; mark {"S","H","C","D"} "S" "H" "C" "D" for(int i= 0 ; i < Integer.parseInt(have) ; i++){
			String str = br.readLine();
			String[] strc = str.split(" ");
			if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			}
		} int i= 0 ; int i= 0 ; i 0 i < Integer.parseInt(have) i Integer.parseInt(have) Integer.parseInt Integer have i++ i++ i {
			String str = br.readLine();
			String[] strc = str.split(" ");
			if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			}
		} {
			String str = br.readLine();
			String[] strc = str.split(" ");
			if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			}
		} String str = br.readLine(); str br.readLine() br.readLine br String[] strc = str.split(" "); strc str.split(" ") str.split str " " if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			} "S".equals(strc[0]) "S".equals "S" strc[0] strc 0 {
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} exc =  Integer.parseInt(strc[1]) exc Integer.parseInt(strc[1]) Integer.parseInt Integer strc[1] strc 1 card[0][exc-1] = exc card[0][exc-1] card[0] card 0 exc-1 exc 1 exc if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			} "H".equals(strc[0]) "H".equals "H" strc[0] strc 0 {
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} exc =  Integer.parseInt(strc[1]) exc Integer.parseInt(strc[1]) Integer.parseInt Integer strc[1] strc 1 card[1][exc-1] = exc card[1][exc-1] card[1] card 1 exc-1 exc 1 exc if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			} "C".equals(strc[0]) "C".equals "C" strc[0] strc 0 {
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} exc =  Integer.parseInt(strc[1]) exc Integer.parseInt(strc[1]) Integer.parseInt Integer strc[1] strc 1 card[2][exc-1] = exc card[2][exc-1] card[2] card 2 exc-1 exc 1 exc if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			} "D".equals(strc[0]) "D".equals "D" strc[0] strc 0 {
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			} exc =  Integer.parseInt(strc[1]) exc Integer.parseInt(strc[1]) Integer.parseInt Integer strc[1] strc 1 card[3][exc-1] = exc card[3][exc-1] card[3] card 3 exc-1 exc 1 exc for(int j = 0 ; j < card.length ; j++){
			for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			}
		} int j = 0 ; int j = 0 ; j 0 j < card.length j card.length card card.length j++ j++ j {
			for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			}
		} {
			for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			}
		} for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			} int k = 0 ; int k = 0 ; k 0 k < card[j].length k card[j].length card[j] card j card[j].length k++ k++ k {
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			} {
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			} if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				} card[j][k] == 0 card[j][k] card[j] card j k 0 {
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				} card[j][k] = k+1 card[j][k] card[j] card j k k+1 k 1 System.out.println(mark[j] + " " + card[j][k]) System.out.println System.out System System.out mark[j] + " " + card[j][k] mark[j] + " " + card[j][k] mark[j] mark j " " card[j][k] card[j] card j k String[] args args public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String have = br.readLine();
		int[][] card = new int[4][13];
		int exc = 0 ;
		String[] mark = {"S","H","C","D"};
		for(int i= 0 ; i < Integer.parseInt(have) ; i++){
			String str = br.readLine();
			String[] strc = str.split(" ");
			if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			}
		}
		for(int j = 0 ; j < card.length ; j++){
			for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			}
		}
	}

} public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String have = br.readLine();
		int[][] card = new int[4][13];
		int exc = 0 ;
		String[] mark = {"S","H","C","D"};
		for(int i= 0 ; i < Integer.parseInt(have) ; i++){
			String str = br.readLine();
			String[] strc = str.split(" ");
			if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			}
		}
		for(int j = 0 ; j < card.length ; j++){
			for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			}
		}
	}

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

public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String have = br.readLine();
		int[][] card = new int[4][13];
		int exc = 0 ;
		String[] mark = {"S","H","C","D"};
		for(int i= 0 ; i < Integer.parseInt(have) ; i++){
			String str = br.readLine();
			String[] strc = str.split(" ");
			if("S".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[0][exc-1] = exc ;
			} else if("H".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[1][exc-1] = exc ;
			} else if("C".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[2][exc-1] = exc ;
			} else if("D".equals(strc[0])){
				exc =  Integer.parseInt(strc[1]);	
				card[3][exc-1] = exc ;
			}
		}
		for(int j = 0 ; j < card.length ; j++){
			for (int k = 0 ; k < card[j].length ; k++){
				if(card[j][k] == 0 ){
					card[j][k] = k+1;
					System.out.println(mark[j] + " " + card[j][k]);
				}
			}
		}
	}

}