import java.util.Scanner;

public class Main{
	public static void main(String args[]){

		//???????????£?¨??????????
		int Card [][];
		Card = new int[4][13];

		//????????°????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();


		//N?????°?????????
		for(int i = 0; i < N ; i++){

			//????????¨??°???????????£?????????
			String Mark = sc.next();
			int Suji = sc.nextInt();

			//?????????S?????£??????1
			if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			}
			//?????????H?????£??????1
			if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			}
			//?????????C?????£??????1
			if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			}
			//?????????D?????£??????1
			if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			}
		}

		//?????£??????????????¨
		for (int i = 0; i < 4; i++){
			for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			}
		}
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String args[]){

		//???????????£?¨??????????
		int Card [][];
		Card = new int[4][13];

		//????????°????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();


		//N?????°?????????
		for(int i = 0; i < N ; i++){

			//????????¨??°???????????£?????????
			String Mark = sc.next();
			int Suji = sc.nextInt();

			//?????????S?????£??????1
			if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			}
			//?????????H?????£??????1
			if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			}
			//?????????C?????£??????1
			if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			}
			//?????????D?????£??????1
			if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			}
		}

		//?????£??????????????¨
		for (int i = 0; i < 4; i++){
			for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			}
		}
		sc.close();
	}
} Main public static void main(String args[]){

		//???????????£?¨??????????
		int Card [][];
		Card = new int[4][13];

		//????????°????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();


		//N?????°?????????
		for(int i = 0; i < N ; i++){

			//????????¨??°???????????£?????????
			String Mark = sc.next();
			int Suji = sc.nextInt();

			//?????????S?????£??????1
			if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			}
			//?????????H?????£??????1
			if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			}
			//?????????C?????£??????1
			if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			}
			//?????????D?????£??????1
			if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			}
		}

		//?????£??????????????¨
		for (int i = 0; i < 4; i++){
			for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			}
		}
		sc.close();
	} main {

		//???????????£?¨??????????
		int Card [][];
		Card = new int[4][13];

		//????????°????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();


		//N?????°?????????
		for(int i = 0; i < N ; i++){

			//????????¨??°???????????£?????????
			String Mark = sc.next();
			int Suji = sc.nextInt();

			//?????????S?????£??????1
			if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			}
			//?????????H?????£??????1
			if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			}
			//?????????C?????£??????1
			if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			}
			//?????????D?????£??????1
			if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			}
		}

		//?????£??????????????¨
		for (int i = 0; i < 4; i++){
			for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			}
		}
		sc.close();
	} int Card [][]; Card Card = new int[4][13] Card new int[4][13] 4 13 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc for(int i = 0; i < N ; i++){

			//????????¨??°???????????£?????????
			String Mark = sc.next();
			int Suji = sc.nextInt();

			//?????????S?????£??????1
			if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			}
			//?????????H?????£??????1
			if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			}
			//?????????C?????£??????1
			if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			}
			//?????????D?????£??????1
			if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {

			//????????¨??°???????????£?????????
			String Mark = sc.next();
			int Suji = sc.nextInt();

			//?????????S?????£??????1
			if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			}
			//?????????H?????£??????1
			if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			}
			//?????????C?????£??????1
			if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			}
			//?????????D?????£??????1
			if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			}
		} {

			//????????¨??°???????????£?????????
			String Mark = sc.next();
			int Suji = sc.nextInt();

			//?????????S?????£??????1
			if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			}
			//?????????H?????£??????1
			if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			}
			//?????????C?????£??????1
			if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			}
			//?????????D?????£??????1
			if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			}
		} String Mark = sc.next(); Mark sc.next() sc.next sc int Suji = sc.nextInt(); Suji sc.nextInt() sc.nextInt sc if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			} Mark.equals ("S") Mark.equals Mark "S" {
				//??£??\??????
				Card[0][Suji-1] = 1;
			} Card[0][Suji-1] = 1 Card[0][Suji-1] Card[0] Card 0 Suji-1 Suji 1 1 if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			} Mark.equals ("H") Mark.equals Mark "H" {
				//??£??\??????
				Card[1][Suji-1] = 1;
			} Card[1][Suji-1] = 1 Card[1][Suji-1] Card[1] Card 1 Suji-1 Suji 1 1 if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			} Mark.equals ("C") Mark.equals Mark "C" {
				//??£??\??????
				Card[2][Suji-1] = 1;
			} Card[2][Suji-1] = 1 Card[2][Suji-1] Card[2] Card 2 Suji-1 Suji 1 1 if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			} Mark.equals ("D") Mark.equals Mark "D" {
				//??£??\??????
				Card[3][Suji-1] = 1;
			} Card[3][Suji-1] = 1 Card[3][Suji-1] Card[3] Card 3 Suji-1 Suji 1 1 for (int i = 0; i < 4; i++){
			for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			}
		} {
			for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			}
		} for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			} {
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			} if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				} Card[i][j] == 0 Card[i][j] Card[i] Card i j 0 {

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				} if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					} Card[i] == Card[0] Card[i] Card i Card[0] Card 0 {
						System.out.println("S " + (j + 1));
					//1?????£??????H
					} System.out.println("S " + (j + 1)) System.out.println System.out System System.out "S " + (j + 1) "S " (j + 1) j 1 if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					} Card[i] == Card[1] Card[i] Card i Card[1] Card 1 {
						System.out.println("H " + (j + 1));
					//2?????£??????C
					} System.out.println("H " + (j + 1)) System.out.println System.out System System.out "H " + (j + 1) "H " (j + 1) j 1 if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					} Card[i] == Card[2] Card[i] Card i Card[2] Card 2 {
						System.out.println("C " + (j + 1));
					//3?????£??????D
					} System.out.println("C " + (j + 1)) System.out.println System.out System System.out "C " + (j + 1) "C " (j + 1) j 1 if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					} Card[i] == Card[3] Card[i] Card i Card[3] Card 3 {
						System.out.println("D " + (j + 1));
					} System.out.println("D " + (j + 1)) System.out.println System.out System System.out "D " + (j + 1) "D " (j + 1) j 1 sc.close() sc.close sc String args[] args public class Main{
	public static void main(String args[]){

		//???????????£?¨??????????
		int Card [][];
		Card = new int[4][13];

		//????????°????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();


		//N?????°?????????
		for(int i = 0; i < N ; i++){

			//????????¨??°???????????£?????????
			String Mark = sc.next();
			int Suji = sc.nextInt();

			//?????????S?????£??????1
			if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			}
			//?????????H?????£??????1
			if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			}
			//?????????C?????£??????1
			if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			}
			//?????????D?????£??????1
			if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			}
		}

		//?????£??????????????¨
		for (int i = 0; i < 4; i++){
			for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			}
		}
		sc.close();
	}
} public class Main{
	public static void main(String args[]){

		//???????????£?¨??????????
		int Card [][];
		Card = new int[4][13];

		//????????°????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();


		//N?????°?????????
		for(int i = 0; i < N ; i++){

			//????????¨??°???????????£?????????
			String Mark = sc.next();
			int Suji = sc.nextInt();

			//?????????S?????£??????1
			if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			}
			//?????????H?????£??????1
			if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			}
			//?????????C?????£??????1
			if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			}
			//?????????D?????£??????1
			if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			}
		}

		//?????£??????????????¨
		for (int i = 0; i < 4; i++){
			for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			}
		}
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String args[]){

		//???????????£?¨??????????
		int Card [][];
		Card = new int[4][13];

		//????????°????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();


		//N?????°?????????
		for(int i = 0; i < N ; i++){

			//????????¨??°???????????£?????????
			String Mark = sc.next();
			int Suji = sc.nextInt();

			//?????????S?????£??????1
			if(Mark.equals ("S")){
				//??£??\??????
				Card[0][Suji-1] = 1;
			}
			//?????????H?????£??????1
			if(Mark.equals ("H")){
				//??£??\??????
				Card[1][Suji-1] = 1;
			}
			//?????????C?????£??????1
			if(Mark.equals ("C")){
				//??£??\??????
				Card[2][Suji-1] = 1;
			}
			//?????????D?????£??????1
			if(Mark.equals ("D")){
				//??£??\??????
				Card[3][Suji-1] = 1;
			}
		}

		//?????£??????????????¨
		for (int i = 0; i < 4; i++){
			for (int j = 0; j < 13; j++){
				//1??????????????£????????????
				if(Card[i][j] == 0){

					//0?????£??????S
					if(Card[i] == Card[0]){
						System.out.println("S " + (j + 1));
					//1?????£??????H
					}else if(Card[i] == Card[1]){
						System.out.println("H " + (j + 1));
					//2?????£??????C
					}else if(Card[i] == Card[2]){
						System.out.println("C " + (j + 1));
					//3?????£??????D
					}else if(Card[i] == Card[3]){
						System.out.println("D " + (j + 1));
					}
				}
			}
		}
		sc.close();
	}
}