import java.util.Arrays;
import java.util.Scanner;


public class Main{
	
	public static void main(String[] args){
		
		boolean[][] cards = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		for(int i = 0; i < cards.length; i++) {
			Arrays.fill(cards[i], false);
		}
		
		//input
		int n = sc.nextInt();
		for(int i = 0; i < n; i++) {
			char suit= sc.next().charAt(0);
			int num = sc.nextInt();
			cards[suitToIndex(suit)][numToIndex(num)] = true;
		}
		sc.close();
		
		//output
		for(int i = 0; i < cards.length; i++) {
			for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			}
		}
	}

	static int suitToIndex(char suit) {
		switch(suit) {
			case 'S':
				return 0;
			case 'H':
				return 1;
			case 'C':
				return 2;
			case 'D':
			default:
				return 3;
		}
	}
	
	static char indexToSuit(int i) {
		if(i == 0) return 'S';
		else if(i == 1) return 'H';
		else if(i == 2) return 'C';
		else return 'D';
	}
	
	static int numToIndex(int n) {
		return n-1;
	}
	
	static int indexToNum(int i) {
		return i + 1;
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main{
	
	public static void main(String[] args){
		
		boolean[][] cards = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		for(int i = 0; i < cards.length; i++) {
			Arrays.fill(cards[i], false);
		}
		
		//input
		int n = sc.nextInt();
		for(int i = 0; i < n; i++) {
			char suit= sc.next().charAt(0);
			int num = sc.nextInt();
			cards[suitToIndex(suit)][numToIndex(num)] = true;
		}
		sc.close();
		
		//output
		for(int i = 0; i < cards.length; i++) {
			for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			}
		}
	}

	static int suitToIndex(char suit) {
		switch(suit) {
			case 'S':
				return 0;
			case 'H':
				return 1;
			case 'C':
				return 2;
			case 'D':
			default:
				return 3;
		}
	}
	
	static char indexToSuit(int i) {
		if(i == 0) return 'S';
		else if(i == 1) return 'H';
		else if(i == 2) return 'C';
		else return 'D';
	}
	
	static int numToIndex(int n) {
		return n-1;
	}
	
	static int indexToNum(int i) {
		return i + 1;
	}
} Main public static void main(String[] args){
		
		boolean[][] cards = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		for(int i = 0; i < cards.length; i++) {
			Arrays.fill(cards[i], false);
		}
		
		//input
		int n = sc.nextInt();
		for(int i = 0; i < n; i++) {
			char suit= sc.next().charAt(0);
			int num = sc.nextInt();
			cards[suitToIndex(suit)][numToIndex(num)] = true;
		}
		sc.close();
		
		//output
		for(int i = 0; i < cards.length; i++) {
			for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			}
		}
	} main {
		
		boolean[][] cards = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		for(int i = 0; i < cards.length; i++) {
			Arrays.fill(cards[i], false);
		}
		
		//input
		int n = sc.nextInt();
		for(int i = 0; i < n; i++) {
			char suit= sc.next().charAt(0);
			int num = sc.nextInt();
			cards[suitToIndex(suit)][numToIndex(num)] = true;
		}
		sc.close();
		
		//output
		for(int i = 0; i < cards.length; i++) {
			for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			}
		}
	} boolean[][] cards = new boolean[4][13]; cards new boolean[4][13] 4 13 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(int i = 0; i < cards.length; i++) {
			Arrays.fill(cards[i], false);
		} int i = 0; int i = 0; i 0 i < cards.length i cards.length cards cards.length i++ i++ i {
			Arrays.fill(cards[i], false);
		} {
			Arrays.fill(cards[i], false);
		} Arrays.fill(cards[i], false) Arrays.fill Arrays cards[i] cards i false int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i++) {
			char suit= sc.next().charAt(0);
			int num = sc.nextInt();
			cards[suitToIndex(suit)][numToIndex(num)] = true;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			char suit= sc.next().charAt(0);
			int num = sc.nextInt();
			cards[suitToIndex(suit)][numToIndex(num)] = true;
		} {
			char suit= sc.next().charAt(0);
			int num = sc.nextInt();
			cards[suitToIndex(suit)][numToIndex(num)] = true;
		} char suit= sc.next().charAt(0); suit sc.next().charAt(0) sc.next().charAt sc.next() sc.next sc 0 int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc cards[suitToIndex(suit)][numToIndex(num)] = true cards[suitToIndex(suit)][numToIndex(num)] cards[suitToIndex(suit)] cards suitToIndex(suit) suitToIndex suit numToIndex(num) numToIndex num true sc.close() sc.close sc for(int i = 0; i < cards.length; i++) {
			for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			}
		} int i = 0; int i = 0; i 0 i < cards.length i cards.length cards cards.length i++ i++ i {
			for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			}
		} {
			for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			}
		} for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			} int j = 0; int j = 0; j 0 j < cards[0].length j cards[0].length cards[0] cards 0 cards[0].length j++ j++ j {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			} {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			} if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j)); !cards[i][j] cards[i][j] cards[i] cards i j System.out.println(indexToSuit(i) + " " + indexToNum(j)) System.out.println System.out System System.out indexToSuit(i) + " " + indexToNum(j) indexToSuit(i) + " " + indexToNum(j) indexToSuit(i) indexToSuit i " " indexToNum(j) indexToNum j String[] args args static int suitToIndex(char suit) {
		switch(suit) {
			case 'S':
				return 0;
			case 'H':
				return 1;
			case 'C':
				return 2;
			case 'D':
			default:
				return 3;
		}
	} suitToIndex {
		switch(suit) {
			case 'S':
				return 0;
			case 'H':
				return 1;
			case 'C':
				return 2;
			case 'D':
			default:
				return 3;
		}
	} switch(suit) {
			case 'S':
				return 0;
			case 'H':
				return 1;
			case 'C':
				return 2;
			case 'D':
			default:
				return 3;
		} suit case 'S': 'S' case 'S': return 0; 0 case 'H': 'H' case 'H': return 1; 1 case 'C': 'C' case 'C': return 2; 2 case 'D': 'D' case 'D': default: default: return 3; 3 char suit suit static char indexToSuit(int i) {
		if(i == 0) return 'S';
		else if(i == 1) return 'H';
		else if(i == 2) return 'C';
		else return 'D';
	} indexToSuit {
		if(i == 0) return 'S';
		else if(i == 1) return 'H';
		else if(i == 2) return 'C';
		else return 'D';
	} if(i == 0) return 'S';
		else if(i == 1) return 'H';
		else if(i == 2) return 'C';
		else return 'D'; i == 0 i 0 return 'S'; 'S' if(i == 1) return 'H';
		else if(i == 2) return 'C';
		else return 'D'; i == 1 i 1 return 'H'; 'H' if(i == 2) return 'C';
		else return 'D'; i == 2 i 2 return 'C'; 'C' return 'D'; 'D' int i i static int numToIndex(int n) {
		return n-1;
	} numToIndex {
		return n-1;
	} return n-1; n-1 n 1 int n n static int indexToNum(int i) {
		return i + 1;
	} indexToNum {
		return i + 1;
	} return i + 1; i + 1 i 1 int i i public class Main{
	
	public static void main(String[] args){
		
		boolean[][] cards = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		for(int i = 0; i < cards.length; i++) {
			Arrays.fill(cards[i], false);
		}
		
		//input
		int n = sc.nextInt();
		for(int i = 0; i < n; i++) {
			char suit= sc.next().charAt(0);
			int num = sc.nextInt();
			cards[suitToIndex(suit)][numToIndex(num)] = true;
		}
		sc.close();
		
		//output
		for(int i = 0; i < cards.length; i++) {
			for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			}
		}
	}

	static int suitToIndex(char suit) {
		switch(suit) {
			case 'S':
				return 0;
			case 'H':
				return 1;
			case 'C':
				return 2;
			case 'D':
			default:
				return 3;
		}
	}
	
	static char indexToSuit(int i) {
		if(i == 0) return 'S';
		else if(i == 1) return 'H';
		else if(i == 2) return 'C';
		else return 'D';
	}
	
	static int numToIndex(int n) {
		return n-1;
	}
	
	static int indexToNum(int i) {
		return i + 1;
	}
} public class Main{
	
	public static void main(String[] args){
		
		boolean[][] cards = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		for(int i = 0; i < cards.length; i++) {
			Arrays.fill(cards[i], false);
		}
		
		//input
		int n = sc.nextInt();
		for(int i = 0; i < n; i++) {
			char suit= sc.next().charAt(0);
			int num = sc.nextInt();
			cards[suitToIndex(suit)][numToIndex(num)] = true;
		}
		sc.close();
		
		//output
		for(int i = 0; i < cards.length; i++) {
			for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			}
		}
	}

	static int suitToIndex(char suit) {
		switch(suit) {
			case 'S':
				return 0;
			case 'H':
				return 1;
			case 'C':
				return 2;
			case 'D':
			default:
				return 3;
		}
	}
	
	static char indexToSuit(int i) {
		if(i == 0) return 'S';
		else if(i == 1) return 'H';
		else if(i == 2) return 'C';
		else return 'D';
	}
	
	static int numToIndex(int n) {
		return n-1;
	}
	
	static int indexToNum(int i) {
		return i + 1;
	}
} Main
import java.util.Arrays;
import java.util.Scanner;


public class Main{
	
	public static void main(String[] args){
		
		boolean[][] cards = new boolean[4][13];
		Scanner sc = new Scanner(System.in);
		for(int i = 0; i < cards.length; i++) {
			Arrays.fill(cards[i], false);
		}
		
		//input
		int n = sc.nextInt();
		for(int i = 0; i < n; i++) {
			char suit= sc.next().charAt(0);
			int num = sc.nextInt();
			cards[suitToIndex(suit)][numToIndex(num)] = true;
		}
		sc.close();
		
		//output
		for(int i = 0; i < cards.length; i++) {
			for(int j = 0; j < cards[0].length; j++) {
				if(!cards[i][j]) System.out.println(indexToSuit(i) + " " + indexToNum(j));
			}
		}
	}

	static int suitToIndex(char suit) {
		switch(suit) {
			case 'S':
				return 0;
			case 'H':
				return 1;
			case 'C':
				return 2;
			case 'D':
			default:
				return 3;
		}
	}
	
	static char indexToSuit(int i) {
		if(i == 0) return 'S';
		else if(i == 1) return 'H';
		else if(i == 2) return 'C';
		else return 'D';
	}
	
	static int numToIndex(int n) {
		return n-1;
	}
	
	static int indexToNum(int i) {
		return i + 1;
	}
}