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

class Main{

	public static void main(String[] args) throws IOException{

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int num = Integer.parseInt(br.readLine());
			int rank = 13;
			ArrayList<Integer> spade = new ArrayList<Integer>();
			ArrayList<Integer> heart = new ArrayList<Integer>();
			ArrayList<Integer> club = new ArrayList<Integer>();
			ArrayList<Integer> diamond = new ArrayList<Integer>();

			for(int i = 0; i < num; i++){

				String[] token = br.readLine().split(" ");
				String type = token[0];
				int rank_num = Integer.parseInt(token[1]);

				if(type.equals("S")){
					spade.add(rank_num);
				}else if(type.equals("H")){
					heart.add(rank_num);
				}else if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				}

			}

			for(int i = 1; i <= rank; i++){
				if(!spade.contains(i)){
					System.out.println("S " + i);
				}
			}

			for(int i = 1; i <= rank; i++){
				if(!heart.contains(i)){
					System.out.println("H " + i);
				}
			}

			for(int i = 1; i <=rank; i++){
				if(!club.contains(i)){
					System.out.println("C " + i);
				}
			}

			for(int i = 1; i <= rank; i++){
				if(!diamond.contains(i)){
					System.out.println("D " + i);
				}
			}

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

	public static void main(String[] args) throws IOException{

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int num = Integer.parseInt(br.readLine());
			int rank = 13;
			ArrayList<Integer> spade = new ArrayList<Integer>();
			ArrayList<Integer> heart = new ArrayList<Integer>();
			ArrayList<Integer> club = new ArrayList<Integer>();
			ArrayList<Integer> diamond = new ArrayList<Integer>();

			for(int i = 0; i < num; i++){

				String[] token = br.readLine().split(" ");
				String type = token[0];
				int rank_num = Integer.parseInt(token[1]);

				if(type.equals("S")){
					spade.add(rank_num);
				}else if(type.equals("H")){
					heart.add(rank_num);
				}else if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				}

			}

			for(int i = 1; i <= rank; i++){
				if(!spade.contains(i)){
					System.out.println("S " + i);
				}
			}

			for(int i = 1; i <= rank; i++){
				if(!heart.contains(i)){
					System.out.println("H " + i);
				}
			}

			for(int i = 1; i <=rank; i++){
				if(!club.contains(i)){
					System.out.println("C " + i);
				}
			}

			for(int i = 1; i <= rank; i++){
				if(!diamond.contains(i)){
					System.out.println("D " + i);
				}
			}

	}
} Main public static void main(String[] args) throws IOException{

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int num = Integer.parseInt(br.readLine());
			int rank = 13;
			ArrayList<Integer> spade = new ArrayList<Integer>();
			ArrayList<Integer> heart = new ArrayList<Integer>();
			ArrayList<Integer> club = new ArrayList<Integer>();
			ArrayList<Integer> diamond = new ArrayList<Integer>();

			for(int i = 0; i < num; i++){

				String[] token = br.readLine().split(" ");
				String type = token[0];
				int rank_num = Integer.parseInt(token[1]);

				if(type.equals("S")){
					spade.add(rank_num);
				}else if(type.equals("H")){
					heart.add(rank_num);
				}else if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				}

			}

			for(int i = 1; i <= rank; i++){
				if(!spade.contains(i)){
					System.out.println("S " + i);
				}
			}

			for(int i = 1; i <= rank; i++){
				if(!heart.contains(i)){
					System.out.println("H " + i);
				}
			}

			for(int i = 1; i <=rank; i++){
				if(!club.contains(i)){
					System.out.println("C " + i);
				}
			}

			for(int i = 1; i <= rank; i++){
				if(!diamond.contains(i)){
					System.out.println("D " + i);
				}
			}

	} main {

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int num = Integer.parseInt(br.readLine());
			int rank = 13;
			ArrayList<Integer> spade = new ArrayList<Integer>();
			ArrayList<Integer> heart = new ArrayList<Integer>();
			ArrayList<Integer> club = new ArrayList<Integer>();
			ArrayList<Integer> diamond = new ArrayList<Integer>();

			for(int i = 0; i < num; i++){

				String[] token = br.readLine().split(" ");
				String type = token[0];
				int rank_num = Integer.parseInt(token[1]);

				if(type.equals("S")){
					spade.add(rank_num);
				}else if(type.equals("H")){
					heart.add(rank_num);
				}else if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				}

			}

			for(int i = 1; i <= rank; i++){
				if(!spade.contains(i)){
					System.out.println("S " + i);
				}
			}

			for(int i = 1; i <= rank; i++){
				if(!heart.contains(i)){
					System.out.println("H " + i);
				}
			}

			for(int i = 1; i <=rank; i++){
				if(!club.contains(i)){
					System.out.println("C " + i);
				}
			}

			for(int i = 1; i <= rank; i++){
				if(!diamond.contains(i)){
					System.out.println("D " + i);
				}
			}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int num = Integer.parseInt(br.readLine()); num Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int rank = 13; rank 13 ArrayList<Integer> spade = new ArrayList<Integer>(); spade new ArrayList<Integer>() ArrayList<Integer> heart = new ArrayList<Integer>(); heart new ArrayList<Integer>() ArrayList<Integer> club = new ArrayList<Integer>(); club new ArrayList<Integer>() ArrayList<Integer> diamond = new ArrayList<Integer>(); diamond new ArrayList<Integer>() for(int i = 0; i < num; i++){

				String[] token = br.readLine().split(" ");
				String type = token[0];
				int rank_num = Integer.parseInt(token[1]);

				if(type.equals("S")){
					spade.add(rank_num);
				}else if(type.equals("H")){
					heart.add(rank_num);
				}else if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				}

			} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {

				String[] token = br.readLine().split(" ");
				String type = token[0];
				int rank_num = Integer.parseInt(token[1]);

				if(type.equals("S")){
					spade.add(rank_num);
				}else if(type.equals("H")){
					heart.add(rank_num);
				}else if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				}

			} {

				String[] token = br.readLine().split(" ");
				String type = token[0];
				int rank_num = Integer.parseInt(token[1]);

				if(type.equals("S")){
					spade.add(rank_num);
				}else if(type.equals("H")){
					heart.add(rank_num);
				}else if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				}

			} String[] token = br.readLine().split(" "); token br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " String type = token[0]; type token[0] token 0 int rank_num = Integer.parseInt(token[1]); rank_num Integer.parseInt(token[1]) Integer.parseInt Integer token[1] token 1 if(type.equals("S")){
					spade.add(rank_num);
				}else if(type.equals("H")){
					heart.add(rank_num);
				}else if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				} type.equals("S") type.equals type "S" {
					spade.add(rank_num);
				} spade.add(rank_num) spade.add spade rank_num if(type.equals("H")){
					heart.add(rank_num);
				}else if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				} type.equals("H") type.equals type "H" {
					heart.add(rank_num);
				} heart.add(rank_num) heart.add heart rank_num if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				} type.equals("C") type.equals type "C" {
					club.add(rank_num);
				} club.add(rank_num) club.add club rank_num if(type.equals("D")){
					diamond.add(rank_num);
				} type.equals("D") type.equals type "D" {
					diamond.add(rank_num);
				} diamond.add(rank_num) diamond.add diamond rank_num for(int i = 1; i <= rank; i++){
				if(!spade.contains(i)){
					System.out.println("S " + i);
				}
			} int i = 1; int i = 1; i 1 i <= rank i rank 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 <= rank; i++){
				if(!heart.contains(i)){
					System.out.println("H " + i);
				}
			} int i = 1; int i = 1; i 1 i <= rank i rank 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 <=rank; i++){
				if(!club.contains(i)){
					System.out.println("C " + i);
				}
			} int i = 1; int i = 1; i 1 i <=rank i rank 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 <= rank; i++){
				if(!diamond.contains(i)){
					System.out.println("D " + i);
				}
			} int i = 1; int i = 1; i 1 i <= rank i rank 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
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

class Main{

	public static void main(String[] args) throws IOException{

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int num = Integer.parseInt(br.readLine());
			int rank = 13;
			ArrayList<Integer> spade = new ArrayList<Integer>();
			ArrayList<Integer> heart = new ArrayList<Integer>();
			ArrayList<Integer> club = new ArrayList<Integer>();
			ArrayList<Integer> diamond = new ArrayList<Integer>();

			for(int i = 0; i < num; i++){

				String[] token = br.readLine().split(" ");
				String type = token[0];
				int rank_num = Integer.parseInt(token[1]);

				if(type.equals("S")){
					spade.add(rank_num);
				}else if(type.equals("H")){
					heart.add(rank_num);
				}else if(type.equals("C")){
					club.add(rank_num);
				}else if(type.equals("D")){
					diamond.add(rank_num);
				}

			}

			for(int i = 1; i <= rank; i++){
				if(!spade.contains(i)){
					System.out.println("S " + i);
				}
			}

			for(int i = 1; i <= rank; i++){
				if(!heart.contains(i)){
					System.out.println("H " + i);
				}
			}

			for(int i = 1; i <=rank; i++){
				if(!club.contains(i)){
					System.out.println("C " + i);
				}
			}

			for(int i = 1; i <= rank; i++){
				if(!diamond.contains(i)){
					System.out.println("D " + i);
				}
			}

	}
}