import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;

public class Main {

	public static void main(String[] args) {
		printAnswer();
	}

	private static void printAnswer() {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			Map<Integer ,String> spade = new HashMap<>();
			Map<Integer ,String> heart = new HashMap<>();
			Map<Integer ,String> crub = new HashMap<>();
			Map<Integer ,String> dia = new HashMap<>();
			int numOfCards = Integer.valueOf(br.readLine());
			for(int i = 0; i < numOfCards; i++){
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			}

			for(int i = 1; i < 14 ; i++){
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			}

		} catch (IOException e) {
			Logger.getGlobal();
			throw new RuntimeException(e);
		} finally {
			try {
				br.close();
			} catch (IOException e) {
				Logger.getGlobal();
			}
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.logging.Logger; Logger java.util.logging public class Main {

	public static void main(String[] args) {
		printAnswer();
	}

	private static void printAnswer() {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			Map<Integer ,String> spade = new HashMap<>();
			Map<Integer ,String> heart = new HashMap<>();
			Map<Integer ,String> crub = new HashMap<>();
			Map<Integer ,String> dia = new HashMap<>();
			int numOfCards = Integer.valueOf(br.readLine());
			for(int i = 0; i < numOfCards; i++){
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			}

			for(int i = 1; i < 14 ; i++){
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			}

		} catch (IOException e) {
			Logger.getGlobal();
			throw new RuntimeException(e);
		} finally {
			try {
				br.close();
			} catch (IOException e) {
				Logger.getGlobal();
			}
		}
	}

} Main public static void main(String[] args) {
		printAnswer();
	} main {
		printAnswer();
	} printAnswer() printAnswer String[] args args private static void printAnswer() {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			Map<Integer ,String> spade = new HashMap<>();
			Map<Integer ,String> heart = new HashMap<>();
			Map<Integer ,String> crub = new HashMap<>();
			Map<Integer ,String> dia = new HashMap<>();
			int numOfCards = Integer.valueOf(br.readLine());
			for(int i = 0; i < numOfCards; i++){
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			}

			for(int i = 1; i < 14 ; i++){
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			}

		} catch (IOException e) {
			Logger.getGlobal();
			throw new RuntimeException(e);
		} finally {
			try {
				br.close();
			} catch (IOException e) {
				Logger.getGlobal();
			}
		}
	} printAnswer {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			Map<Integer ,String> spade = new HashMap<>();
			Map<Integer ,String> heart = new HashMap<>();
			Map<Integer ,String> crub = new HashMap<>();
			Map<Integer ,String> dia = new HashMap<>();
			int numOfCards = Integer.valueOf(br.readLine());
			for(int i = 0; i < numOfCards; i++){
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			}

			for(int i = 1; i < 14 ; i++){
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			}

		} catch (IOException e) {
			Logger.getGlobal();
			throw new RuntimeException(e);
		} finally {
			try {
				br.close();
			} catch (IOException e) {
				Logger.getGlobal();
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
			Map<Integer ,String> spade = new HashMap<>();
			Map<Integer ,String> heart = new HashMap<>();
			Map<Integer ,String> crub = new HashMap<>();
			Map<Integer ,String> dia = new HashMap<>();
			int numOfCards = Integer.valueOf(br.readLine());
			for(int i = 0; i < numOfCards; i++){
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			}

			for(int i = 1; i < 14 ; i++){
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			}

		} catch (IOException e) {
			Logger.getGlobal();
			throw new RuntimeException(e);
		} finally {
			try {
				br.close();
			} catch (IOException e) {
				Logger.getGlobal();
			}
		} catch (IOException e) {
			Logger.getGlobal();
			throw new RuntimeException(e);
		} IOException e {
			Logger.getGlobal();
			throw new RuntimeException(e);
		} Logger.getGlobal() Logger.getGlobal Logger throw new RuntimeException(e); new RuntimeException(e) {
			try {
				br.close();
			} catch (IOException e) {
				Logger.getGlobal();
			}
		} try {
				br.close();
			} catch (IOException e) {
				Logger.getGlobal();
			} catch (IOException e) {
				Logger.getGlobal();
			} IOException e {
				Logger.getGlobal();
			} Logger.getGlobal() Logger.getGlobal Logger {
				br.close();
			} br.close() br.close br {
			Map<Integer ,String> spade = new HashMap<>();
			Map<Integer ,String> heart = new HashMap<>();
			Map<Integer ,String> crub = new HashMap<>();
			Map<Integer ,String> dia = new HashMap<>();
			int numOfCards = Integer.valueOf(br.readLine());
			for(int i = 0; i < numOfCards; i++){
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			}

			for(int i = 1; i < 14 ; i++){
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			}

		} Map<Integer ,String> spade = new HashMap<>(); spade new HashMap<>() Map<Integer ,String> heart = new HashMap<>(); heart new HashMap<>() Map<Integer ,String> crub = new HashMap<>(); crub new HashMap<>() Map<Integer ,String> dia = new HashMap<>(); dia new HashMap<>() int numOfCards = Integer.valueOf(br.readLine()); numOfCards Integer.valueOf(br.readLine()) Integer.valueOf Integer br.readLine() br.readLine br for(int i = 0; i < numOfCards; i++){
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			} int i = 0; int i = 0; i 0 i < numOfCards i numOfCards i++ i++ i {
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			} {
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			} String[] cardsSet = br.readLine().split(" "); cardsSet br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " String print = cardsSet[0]; print cardsSet[0] cardsSet 0 int rank = Integer.valueOf(cardsSet[1]); rank Integer.valueOf(cardsSet[1]) Integer.valueOf Integer cardsSet[1] cardsSet 1 if(print.equals("S")){
					spade.put(rank, print);
				} print.equals("S") print.equals print "S" {
					spade.put(rank, print);
				} spade.put(rank, print) spade.put spade rank print if(print.equals("H")){
					heart.put(rank, print);
				} print.equals("H") print.equals print "H" {
					heart.put(rank, print);
				} heart.put(rank, print) heart.put heart rank print if(print.equals("C")){
					crub.put(rank, print);
				} print.equals("C") print.equals print "C" {
					crub.put(rank, print);
				} crub.put(rank, print) crub.put crub rank print if(print.equals("D")){
					dia.put(rank, print);
				} print.equals("D") print.equals print "D" {
					dia.put(rank, print);
				} dia.put(rank, print) dia.put dia rank print for(int i = 1; i < 14 ; i++){
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			} int i = 1; int i = 1; i 1 i < 14 i 14 i++ i++ i {
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			} {
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			} if(!spade.containsKey(i)){
					System.out.println("S " + i);
				} !spade.containsKey(i) spade.containsKey(i) spade.containsKey spade i {
					System.out.println("S " + i);
				} System.out.println("S " + i) System.out.println System.out System System.out "S " + i "S " i for(int i = 1; i < 14 ; i++){
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			} int i = 1; int i = 1; i 1 i < 14 i 14 i++ i++ i {
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			} {
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			} if(!heart.containsKey(i)){
					System.out.println("H " + i);
				} !heart.containsKey(i) heart.containsKey(i) heart.containsKey heart i {
					System.out.println("H " + i);
				} System.out.println("H " + i) System.out.println System.out System System.out "H " + i "H " i for(int i = 1; i < 14 ; i++){
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			} int i = 1; int i = 1; i 1 i < 14 i 14 i++ i++ i {
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			} {
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			} if(!crub.containsKey(i)){
					System.out.println("C " + i);
				} !crub.containsKey(i) crub.containsKey(i) crub.containsKey crub i {
					System.out.println("C " + i);
				} System.out.println("C " + i) System.out.println System.out System System.out "C " + i "C " i for(int i = 1; i < 14 ; i++){
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			} int i = 1; int i = 1; i 1 i < 14 i 14 i++ i++ i {
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			} {
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			} if(!dia.containsKey(i)){
					System.out.println("D " + i);
				} !dia.containsKey(i) dia.containsKey(i) dia.containsKey dia i {
					System.out.println("D " + i);
				} System.out.println("D " + i) System.out.println System.out System System.out "D " + i "D " i public class Main {

	public static void main(String[] args) {
		printAnswer();
	}

	private static void printAnswer() {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			Map<Integer ,String> spade = new HashMap<>();
			Map<Integer ,String> heart = new HashMap<>();
			Map<Integer ,String> crub = new HashMap<>();
			Map<Integer ,String> dia = new HashMap<>();
			int numOfCards = Integer.valueOf(br.readLine());
			for(int i = 0; i < numOfCards; i++){
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			}

			for(int i = 1; i < 14 ; i++){
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			}

		} catch (IOException e) {
			Logger.getGlobal();
			throw new RuntimeException(e);
		} finally {
			try {
				br.close();
			} catch (IOException e) {
				Logger.getGlobal();
			}
		}
	}

} public class Main {

	public static void main(String[] args) {
		printAnswer();
	}

	private static void printAnswer() {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			Map<Integer ,String> spade = new HashMap<>();
			Map<Integer ,String> heart = new HashMap<>();
			Map<Integer ,String> crub = new HashMap<>();
			Map<Integer ,String> dia = new HashMap<>();
			int numOfCards = Integer.valueOf(br.readLine());
			for(int i = 0; i < numOfCards; i++){
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			}

			for(int i = 1; i < 14 ; i++){
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			}

		} catch (IOException e) {
			Logger.getGlobal();
			throw new RuntimeException(e);
		} finally {
			try {
				br.close();
			} catch (IOException e) {
				Logger.getGlobal();
			}
		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;

public class Main {

	public static void main(String[] args) {
		printAnswer();
	}

	private static void printAnswer() {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			Map<Integer ,String> spade = new HashMap<>();
			Map<Integer ,String> heart = new HashMap<>();
			Map<Integer ,String> crub = new HashMap<>();
			Map<Integer ,String> dia = new HashMap<>();
			int numOfCards = Integer.valueOf(br.readLine());
			for(int i = 0; i < numOfCards; i++){
				String[] cardsSet = br.readLine().split(" ");
				String print = cardsSet[0];
				int rank = Integer.valueOf(cardsSet[1]);
				if(print.equals("S")){
					spade.put(rank, print);
				}
				if(print.equals("H")){
					heart.put(rank, print);
				}
				if(print.equals("C")){
					crub.put(rank, print);
				}
				if(print.equals("D")){
					dia.put(rank, print);
				}
			}

			for(int i = 1; i < 14 ; i++){
				if(!spade.containsKey(i)){
					System.out.println("S " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!heart.containsKey(i)){
					System.out.println("H " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!crub.containsKey(i)){
					System.out.println("C " + i);
				}
			}
			for(int i = 1; i < 14 ; i++){
				if(!dia.containsKey(i)){
					System.out.println("D " + i);
				}
			}

		} catch (IOException e) {
			Logger.getGlobal();
			throw new RuntimeException(e);
		} finally {
			try {
				br.close();
			} catch (IOException e) {
				Logger.getGlobal();
			}
		}
	}

}