
import java.util.*;

class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		//カードの枚数を受け取る
		String card = sc.next();
		int cn = Integer.parseInt(card);
		
		//カードのマーク別に可変長配列を作る
		ArrayList<Integer> cardS = new ArrayList<Integer>();
		ArrayList<Integer> cardH = new ArrayList<Integer>();
		ArrayList<Integer> cardC = new ArrayList<Integer>();
		ArrayList<Integer> cardD = new ArrayList<Integer>();
		
		//入力されるカード番号を受け取る
		for(int i = 0; i < cn; i++){
			String kc = sc.next();
			String s2 = sc.next();
			int c = Integer.parseInt(s2);
			
			if(kc.equals("S")){
				cardS.add(c);
			}
			else if(kc.equals("H")){
				cardH.add(c);
			}
			else if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			}
		}
		
		//カードのマーク別に１から１３まで受け取った番号があるかを調べる
		//なかったらその番号を表示する
		
		//トランプのマークを識別するための文字列cs
		String cs = "S";
		//今比べている配列内の値を入れる器cb
		int cb = 0;
		for(int i = 0; i < 4; i++){
			//スペードのとき
			if(cs.equals("S")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				}
				cs = "H";
			}
			//ハートのとき
			else if(cs.equals("H")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			}
			//クローバーのとき
			else if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			}
		}
	}

} import java.util.*; util.* java class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		//カードの枚数を受け取る
		String card = sc.next();
		int cn = Integer.parseInt(card);
		
		//カードのマーク別に可変長配列を作る
		ArrayList<Integer> cardS = new ArrayList<Integer>();
		ArrayList<Integer> cardH = new ArrayList<Integer>();
		ArrayList<Integer> cardC = new ArrayList<Integer>();
		ArrayList<Integer> cardD = new ArrayList<Integer>();
		
		//入力されるカード番号を受け取る
		for(int i = 0; i < cn; i++){
			String kc = sc.next();
			String s2 = sc.next();
			int c = Integer.parseInt(s2);
			
			if(kc.equals("S")){
				cardS.add(c);
			}
			else if(kc.equals("H")){
				cardH.add(c);
			}
			else if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			}
		}
		
		//カードのマーク別に１から１３まで受け取った番号があるかを調べる
		//なかったらその番号を表示する
		
		//トランプのマークを識別するための文字列cs
		String cs = "S";
		//今比べている配列内の値を入れる器cb
		int cb = 0;
		for(int i = 0; i < 4; i++){
			//スペードのとき
			if(cs.equals("S")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				}
				cs = "H";
			}
			//ハートのとき
			else if(cs.equals("H")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			}
			//クローバーのとき
			else if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			}
		}
	}

} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		//カードの枚数を受け取る
		String card = sc.next();
		int cn = Integer.parseInt(card);
		
		//カードのマーク別に可変長配列を作る
		ArrayList<Integer> cardS = new ArrayList<Integer>();
		ArrayList<Integer> cardH = new ArrayList<Integer>();
		ArrayList<Integer> cardC = new ArrayList<Integer>();
		ArrayList<Integer> cardD = new ArrayList<Integer>();
		
		//入力されるカード番号を受け取る
		for(int i = 0; i < cn; i++){
			String kc = sc.next();
			String s2 = sc.next();
			int c = Integer.parseInt(s2);
			
			if(kc.equals("S")){
				cardS.add(c);
			}
			else if(kc.equals("H")){
				cardH.add(c);
			}
			else if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			}
		}
		
		//カードのマーク別に１から１３まで受け取った番号があるかを調べる
		//なかったらその番号を表示する
		
		//トランプのマークを識別するための文字列cs
		String cs = "S";
		//今比べている配列内の値を入れる器cb
		int cb = 0;
		for(int i = 0; i < 4; i++){
			//スペードのとき
			if(cs.equals("S")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				}
				cs = "H";
			}
			//ハートのとき
			else if(cs.equals("H")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			}
			//クローバーのとき
			else if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		
		//カードの枚数を受け取る
		String card = sc.next();
		int cn = Integer.parseInt(card);
		
		//カードのマーク別に可変長配列を作る
		ArrayList<Integer> cardS = new ArrayList<Integer>();
		ArrayList<Integer> cardH = new ArrayList<Integer>();
		ArrayList<Integer> cardC = new ArrayList<Integer>();
		ArrayList<Integer> cardD = new ArrayList<Integer>();
		
		//入力されるカード番号を受け取る
		for(int i = 0; i < cn; i++){
			String kc = sc.next();
			String s2 = sc.next();
			int c = Integer.parseInt(s2);
			
			if(kc.equals("S")){
				cardS.add(c);
			}
			else if(kc.equals("H")){
				cardH.add(c);
			}
			else if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			}
		}
		
		//カードのマーク別に１から１３まで受け取った番号があるかを調べる
		//なかったらその番号を表示する
		
		//トランプのマークを識別するための文字列cs
		String cs = "S";
		//今比べている配列内の値を入れる器cb
		int cb = 0;
		for(int i = 0; i < 4; i++){
			//スペードのとき
			if(cs.equals("S")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				}
				cs = "H";
			}
			//ハートのとき
			else if(cs.equals("H")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			}
			//クローバーのとき
			else if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String card = sc.next(); card sc.next() sc.next sc int cn = Integer.parseInt(card); cn Integer.parseInt(card) Integer.parseInt Integer card ArrayList<Integer> cardS = new ArrayList<Integer>(); cardS new ArrayList<Integer>() ArrayList<Integer> cardH = new ArrayList<Integer>(); cardH new ArrayList<Integer>() ArrayList<Integer> cardC = new ArrayList<Integer>(); cardC new ArrayList<Integer>() ArrayList<Integer> cardD = new ArrayList<Integer>(); cardD new ArrayList<Integer>() for(int i = 0; i < cn; i++){
			String kc = sc.next();
			String s2 = sc.next();
			int c = Integer.parseInt(s2);
			
			if(kc.equals("S")){
				cardS.add(c);
			}
			else if(kc.equals("H")){
				cardH.add(c);
			}
			else if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			}
		} int i = 0; int i = 0; i 0 i < cn i cn i++ i++ i {
			String kc = sc.next();
			String s2 = sc.next();
			int c = Integer.parseInt(s2);
			
			if(kc.equals("S")){
				cardS.add(c);
			}
			else if(kc.equals("H")){
				cardH.add(c);
			}
			else if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			}
		} {
			String kc = sc.next();
			String s2 = sc.next();
			int c = Integer.parseInt(s2);
			
			if(kc.equals("S")){
				cardS.add(c);
			}
			else if(kc.equals("H")){
				cardH.add(c);
			}
			else if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			}
		} String kc = sc.next(); kc sc.next() sc.next sc String s2 = sc.next(); s2 sc.next() sc.next sc int c = Integer.parseInt(s2); c Integer.parseInt(s2) Integer.parseInt Integer s2 if(kc.equals("S")){
				cardS.add(c);
			}
			else if(kc.equals("H")){
				cardH.add(c);
			}
			else if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			} kc.equals("S") kc.equals kc "S" {
				cardS.add(c);
			} cardS.add(c) cardS.add cardS c if(kc.equals("H")){
				cardH.add(c);
			}
			else if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			} kc.equals("H") kc.equals kc "H" {
				cardH.add(c);
			} cardH.add(c) cardH.add cardH c if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			} kc.equals("C") kc.equals kc "C" {
				cardC.add(c);
			} cardC.add(c) cardC.add cardC c if(kc.equals("D")){
				cardD.add(c);
			} kc.equals("D") kc.equals kc "D" {
				cardD.add(c);
			} cardD.add(c) cardD.add cardD c String cs = "S"; cs "S" int cb = 0; cb 0 for(int i = 0; i < 4; i++){
			//スペードのとき
			if(cs.equals("S")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				}
				cs = "H";
			}
			//ハートのとき
			else if(cs.equals("H")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			}
			//クローバーのとき
			else if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			//スペードのとき
			if(cs.equals("S")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				}
				cs = "H";
			}
			//ハートのとき
			else if(cs.equals("H")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			}
			//クローバーのとき
			else if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			}
		} {
			//スペードのとき
			if(cs.equals("S")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				}
				cs = "H";
			}
			//ハートのとき
			else if(cs.equals("H")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			}
			//クローバーのとき
			else if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			}
		} if(cs.equals("S")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				}
				cs = "H";
			}
			//ハートのとき
			else if(cs.equals("H")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			}
			//クローバーのとき
			else if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			} cs.equals("S") cs.equals cs "S" {
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				}
				cs = "H";
			} for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				} int j = 1; int j = 1; j 1 j <= 13 j 13 j++ j++ j {
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				} {
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				} for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					} int k = 0; int k = 0; k 0 k < cardS.size() k cardS.size() cardS.size cardS k++ k++ k {
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					} {
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					} cb = cardS.get(k) cb cardS.get(k) cardS.get cardS k if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						} j == cb j cb {
							break;
						} break; if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						} k == cardS.size() - 1 && j != cb k == cardS.size() - 1 k cardS.size() - 1 cardS.size() cardS.size cardS 1 j != cb j cb {
							System.out.println("S" + " " + j);
						} System.out.println("S" + " " + j) System.out.println System.out System System.out "S" + " " + j "S" + " " + j "S" " " j cs = "H" cs "H" if(cs.equals("H")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			}
			//クローバーのとき
			else if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			} cs.equals("H") cs.equals cs "H" {
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			} for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				} int j = 1; int j = 1; j 1 j <= 13 j 13 j++ j++ j {
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				} {
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				} for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					} int k = 0; int k = 0; k 0 k < cardH.size() k cardH.size() cardH.size cardH k++ k++ k {
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					} {
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					} cb = cardH.get(k) cb cardH.get(k) cardH.get cardH k if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						} j == cb j cb {
							break;
						} break; if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						} k == cardH.size() - 1 && j != cb k == cardH.size() - 1 k cardH.size() - 1 cardH.size() cardH.size cardH 1 j != cb j cb {
							System.out.println("H" + " " + j);
						} System.out.println("H" + " " + j) System.out.println System.out System System.out "H" + " " + j "H" + " " + j "H" " " j cs = "C" cs "C" if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			} cs.equals("C") cs.equals cs "C" {
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			} for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				} int j = 1; int j = 1; j 1 j <= 13 j 13 j++ j++ j {
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				} {
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				} for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					} int k = 0; int k = 0; k 0 k < cardC.size() k cardC.size() cardC.size cardC k++ k++ k {
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					} {
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					} cb = cardC.get(k) cb cardC.get(k) cardC.get cardC k if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						} j == cb j cb {
							break;
						} break; if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						} k == cardC.size() - 1 && j != cb k == cardC.size() - 1 k cardC.size() - 1 cardC.size() cardC.size cardC 1 j != cb j cb {
							System.out.println("C" + " " + j);
						} System.out.println("C" + " " + j) System.out.println System.out System System.out "C" + " " + j "C" + " " + j "C" " " j cs = "D" cs "D" if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			} cs.equals("D") cs.equals cs "D" {
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			} for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				} int j = 1; int j = 1; j 1 j <= 13 j 13 j++ j++ j {
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				} {
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				} for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					} int k = 0; int k = 0; k 0 k < cardD.size() k cardD.size() cardD.size cardD k++ k++ k {
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					} {
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					} cb = cardD.get(k) cb cardD.get(k) cardD.get cardD k if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						} j == cb j cb {
							break;
						} break; if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						} k == cardD.size() - 1 && j != cb k == cardD.size() - 1 k cardD.size() - 1 cardD.size() cardD.size cardD 1 j != cb j cb {
							System.out.println("D" + " " + j);
						} System.out.println("D" + " " + j) System.out.println System.out System System.out "D" + " " + j "D" + " " + j "D" " " j String[] args args

import java.util.*;

class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		//カードの枚数を受け取る
		String card = sc.next();
		int cn = Integer.parseInt(card);
		
		//カードのマーク別に可変長配列を作る
		ArrayList<Integer> cardS = new ArrayList<Integer>();
		ArrayList<Integer> cardH = new ArrayList<Integer>();
		ArrayList<Integer> cardC = new ArrayList<Integer>();
		ArrayList<Integer> cardD = new ArrayList<Integer>();
		
		//入力されるカード番号を受け取る
		for(int i = 0; i < cn; i++){
			String kc = sc.next();
			String s2 = sc.next();
			int c = Integer.parseInt(s2);
			
			if(kc.equals("S")){
				cardS.add(c);
			}
			else if(kc.equals("H")){
				cardH.add(c);
			}
			else if(kc.equals("C")){
				cardC.add(c);
			}
			else if(kc.equals("D")){
				cardD.add(c);
			}
		}
		
		//カードのマーク別に１から１３まで受け取った番号があるかを調べる
		//なかったらその番号を表示する
		
		//トランプのマークを識別するための文字列cs
		String cs = "S";
		//今比べている配列内の値を入れる器cb
		int cb = 0;
		for(int i = 0; i < 4; i++){
			//スペードのとき
			if(cs.equals("S")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardS.size(); k++){
						cb = cardS.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardS.size() - 1 && j != cb){
							System.out.println("S" + " " + j);
						}
					}
				}
				cs = "H";
			}
			//ハートのとき
			else if(cs.equals("H")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardH.size(); k++){
						cb = cardH.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardH.size() - 1 && j != cb){
							System.out.println("H" + " " + j);
						}
					}
				}
				cs = "C";
			}
			//クローバーのとき
			else if(cs.equals("C")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardC.size(); k++){
						cb = cardC.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardC.size() - 1 && j != cb){
							System.out.println("C" + " " + j);
						}
					}
				}
				cs = "D";
			}
			//ダイヤのとき
			else if(cs.equals("D")){
				for(int j = 1; j <= 13; j++){
					for(int k = 0; k < cardD.size(); k++){
						cb = cardD.get(k);
						if(j == cb){
							break;
						}
						else if(k == cardD.size() - 1 && j != cb){
							System.out.println("D" + " " + j);
						}
					}
				}
			}
		}
	}

}