import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int total = sc.nextInt();
		List<Integer> spade = new ArrayList<Integer>();
		List<Integer> heart = new ArrayList<Integer>();
		List<Integer> club = new ArrayList<Integer>();
		List<Integer> diamond = new ArrayList<Integer>();

		for(int i=0;i<total;i++) {
			char symbol = sc.next().charAt(0);
			int number = sc.nextInt();

			if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			}
		}

		for(int i=1;i<=13;i++) {
			if(!(spade.contains(i))) {
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(heart.contains(i))) {
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(club.contains(i))) {
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			}
		}
	}
}
 import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int total = sc.nextInt();
		List<Integer> spade = new ArrayList<Integer>();
		List<Integer> heart = new ArrayList<Integer>();
		List<Integer> club = new ArrayList<Integer>();
		List<Integer> diamond = new ArrayList<Integer>();

		for(int i=0;i<total;i++) {
			char symbol = sc.next().charAt(0);
			int number = sc.nextInt();

			if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			}
		}

		for(int i=1;i<=13;i++) {
			if(!(spade.contains(i))) {
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(heart.contains(i))) {
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(club.contains(i))) {
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			}
		}
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int total = sc.nextInt();
		List<Integer> spade = new ArrayList<Integer>();
		List<Integer> heart = new ArrayList<Integer>();
		List<Integer> club = new ArrayList<Integer>();
		List<Integer> diamond = new ArrayList<Integer>();

		for(int i=0;i<total;i++) {
			char symbol = sc.next().charAt(0);
			int number = sc.nextInt();

			if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			}
		}

		for(int i=1;i<=13;i++) {
			if(!(spade.contains(i))) {
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(heart.contains(i))) {
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(club.contains(i))) {
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			}
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int total = sc.nextInt();
		List<Integer> spade = new ArrayList<Integer>();
		List<Integer> heart = new ArrayList<Integer>();
		List<Integer> club = new ArrayList<Integer>();
		List<Integer> diamond = new ArrayList<Integer>();

		for(int i=0;i<total;i++) {
			char symbol = sc.next().charAt(0);
			int number = sc.nextInt();

			if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			}
		}

		for(int i=1;i<=13;i++) {
			if(!(spade.contains(i))) {
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(heart.contains(i))) {
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(club.contains(i))) {
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int total = sc.nextInt(); total sc.nextInt() sc.nextInt sc List<Integer> spade = new ArrayList<Integer>(); spade new ArrayList<Integer>() List<Integer> heart = new ArrayList<Integer>(); heart new ArrayList<Integer>() List<Integer> club = new ArrayList<Integer>(); club new ArrayList<Integer>() List<Integer> diamond = new ArrayList<Integer>(); diamond new ArrayList<Integer>() for(int i=0;i<total;i++) {
			char symbol = sc.next().charAt(0);
			int number = sc.nextInt();

			if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			}
		} int i=0; int i=0; i 0 i<total i total i++ i++ i {
			char symbol = sc.next().charAt(0);
			int number = sc.nextInt();

			if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			}
		} {
			char symbol = sc.next().charAt(0);
			int number = sc.nextInt();

			if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			}
		} char symbol = sc.next().charAt(0); symbol sc.next().charAt(0) sc.next().charAt sc.next() sc.next sc 0 int number = sc.nextInt(); number sc.nextInt() sc.nextInt sc if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			} symbol=='S' symbol 'S' {
				spade.add(number);
			} spade.add(number) spade.add spade number if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			} symbol=='H' symbol 'H' {
				heart.add(number);
			} heart.add(number) heart.add heart number if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			} symbol=='C' symbol 'C' {
				club.add(number);
			} club.add(number) club.add club number if(symbol=='D') {
				diamond.add(number);
			} symbol=='D' symbol 'D' {
				diamond.add(number);
			} diamond.add(number) diamond.add diamond number for(int i=1;i<=13;i++) {
			if(!(spade.contains(i))) {
				System.out.println("S "+i);
			}
		} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
			if(!(spade.contains(i))) {
				System.out.println("S "+i);
			}
		} {
			if(!(spade.contains(i))) {
				System.out.println("S "+i);
			}
		} if(!(spade.contains(i))) {
				System.out.println("S "+i);
			} !(spade.contains(i)) (spade.contains(i)) spade.contains 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<=13;i++) {
			if(!(heart.contains(i))) {
				System.out.println("H "+i);
			}
		} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
			if(!(heart.contains(i))) {
				System.out.println("H "+i);
			}
		} {
			if(!(heart.contains(i))) {
				System.out.println("H "+i);
			}
		} if(!(heart.contains(i))) {
				System.out.println("H "+i);
			} !(heart.contains(i)) (heart.contains(i)) heart.contains 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<=13;i++) {
			if(!(club.contains(i))) {
				System.out.println("C "+i);
			}
		} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
			if(!(club.contains(i))) {
				System.out.println("C "+i);
			}
		} {
			if(!(club.contains(i))) {
				System.out.println("C "+i);
			}
		} if(!(club.contains(i))) {
				System.out.println("C "+i);
			} !(club.contains(i)) (club.contains(i)) club.contains club 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<=13;i++) {
			if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			}
		} int i=1; int i=1; i 1 i<=13 i 13 i++ i++ i {
			if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			}
		} {
			if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			}
		} if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			} !(diamond.contains(i)) (diamond.contains(i)) diamond.contains diamond i {
				System.out.println("D "+i);
			} System.out.println("D "+i) System.out.println System.out System System.out "D "+i "D " i String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int total = sc.nextInt();
		List<Integer> spade = new ArrayList<Integer>();
		List<Integer> heart = new ArrayList<Integer>();
		List<Integer> club = new ArrayList<Integer>();
		List<Integer> diamond = new ArrayList<Integer>();

		for(int i=0;i<total;i++) {
			char symbol = sc.next().charAt(0);
			int number = sc.nextInt();

			if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			}
		}

		for(int i=1;i<=13;i++) {
			if(!(spade.contains(i))) {
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(heart.contains(i))) {
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(club.contains(i))) {
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int total = sc.nextInt();
		List<Integer> spade = new ArrayList<Integer>();
		List<Integer> heart = new ArrayList<Integer>();
		List<Integer> club = new ArrayList<Integer>();
		List<Integer> diamond = new ArrayList<Integer>();

		for(int i=0;i<total;i++) {
			char symbol = sc.next().charAt(0);
			int number = sc.nextInt();

			if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			}
		}

		for(int i=1;i<=13;i++) {
			if(!(spade.contains(i))) {
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(heart.contains(i))) {
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(club.contains(i))) {
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			}
		}
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int total = sc.nextInt();
		List<Integer> spade = new ArrayList<Integer>();
		List<Integer> heart = new ArrayList<Integer>();
		List<Integer> club = new ArrayList<Integer>();
		List<Integer> diamond = new ArrayList<Integer>();

		for(int i=0;i<total;i++) {
			char symbol = sc.next().charAt(0);
			int number = sc.nextInt();

			if(symbol=='S') {
				spade.add(number);
			}else if(symbol=='H') {
				heart.add(number);
			}else if(symbol=='C') {
				club.add(number);
			}else if(symbol=='D') {
				diamond.add(number);
			}
		}

		for(int i=1;i<=13;i++) {
			if(!(spade.contains(i))) {
				System.out.println("S "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(heart.contains(i))) {
				System.out.println("H "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(club.contains(i))) {
				System.out.println("C "+i);
			}
		}
		for(int i=1;i<=13;i++) {
			if(!(diamond.contains(i))) {
				System.out.println("D "+i);
			}
		}
	}
}

