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

class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String kosu=br.readLine();
		int nako=Integer.parseInt(kosu);
		int[] suji=new int[nako];
		String[] egara=new String[nako];

		for(int j=0; j<nako; j++){
			String strArr[] = br.readLine().split(" ");
			egara[j]=(strArr[0]);
			suji[j]=Integer.parseInt(strArr[1]);
			
		}

		int[] trump=new int[52];
		int tmp=0;

		for(int i=0; i<52; i++){
			trump[i]=0;
		}

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

			if(egara[i].equals("S")){
				tmp=-1;
				tmp+=suji[i];
			}
			else if(egara[i].equals("H")){
				tmp=12;
				tmp+=suji[i];
			}
			else if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			}

			trump[tmp]=1;
		}


		int[] none_card=new int[52-nako];
		int none_count=0;

		for(int i=0; i<52; i++){
			if(trump[i]==0){
				none_card[none_count]=i+1;
				none_count++;
			}
			else{}
		}

		for(int i=0; i<52-nako; i++){
			if((none_card[i]-1)/13==0){
				if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==1){
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String kosu=br.readLine();
		int nako=Integer.parseInt(kosu);
		int[] suji=new int[nako];
		String[] egara=new String[nako];

		for(int j=0; j<nako; j++){
			String strArr[] = br.readLine().split(" ");
			egara[j]=(strArr[0]);
			suji[j]=Integer.parseInt(strArr[1]);
			
		}

		int[] trump=new int[52];
		int tmp=0;

		for(int i=0; i<52; i++){
			trump[i]=0;
		}

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

			if(egara[i].equals("S")){
				tmp=-1;
				tmp+=suji[i];
			}
			else if(egara[i].equals("H")){
				tmp=12;
				tmp+=suji[i];
			}
			else if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			}

			trump[tmp]=1;
		}


		int[] none_card=new int[52-nako];
		int none_count=0;

		for(int i=0; i<52; i++){
			if(trump[i]==0){
				none_card[none_count]=i+1;
				none_count++;
			}
			else{}
		}

		for(int i=0; i<52-nako; i++){
			if((none_card[i]-1)/13==0){
				if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==1){
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			}
		}
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String kosu=br.readLine();
		int nako=Integer.parseInt(kosu);
		int[] suji=new int[nako];
		String[] egara=new String[nako];

		for(int j=0; j<nako; j++){
			String strArr[] = br.readLine().split(" ");
			egara[j]=(strArr[0]);
			suji[j]=Integer.parseInt(strArr[1]);
			
		}

		int[] trump=new int[52];
		int tmp=0;

		for(int i=0; i<52; i++){
			trump[i]=0;
		}

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

			if(egara[i].equals("S")){
				tmp=-1;
				tmp+=suji[i];
			}
			else if(egara[i].equals("H")){
				tmp=12;
				tmp+=suji[i];
			}
			else if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			}

			trump[tmp]=1;
		}


		int[] none_card=new int[52-nako];
		int none_count=0;

		for(int i=0; i<52; i++){
			if(trump[i]==0){
				none_card[none_count]=i+1;
				none_count++;
			}
			else{}
		}

		for(int i=0; i<52-nako; i++){
			if((none_card[i]-1)/13==0){
				if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==1){
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			}
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String kosu=br.readLine();
		int nako=Integer.parseInt(kosu);
		int[] suji=new int[nako];
		String[] egara=new String[nako];

		for(int j=0; j<nako; j++){
			String strArr[] = br.readLine().split(" ");
			egara[j]=(strArr[0]);
			suji[j]=Integer.parseInt(strArr[1]);
			
		}

		int[] trump=new int[52];
		int tmp=0;

		for(int i=0; i<52; i++){
			trump[i]=0;
		}

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

			if(egara[i].equals("S")){
				tmp=-1;
				tmp+=suji[i];
			}
			else if(egara[i].equals("H")){
				tmp=12;
				tmp+=suji[i];
			}
			else if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			}

			trump[tmp]=1;
		}


		int[] none_card=new int[52-nako];
		int none_count=0;

		for(int i=0; i<52; i++){
			if(trump[i]==0){
				none_card[none_count]=i+1;
				none_count++;
			}
			else{}
		}

		for(int i=0; i<52-nako; i++){
			if((none_card[i]-1)/13==0){
				if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==1){
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String kosu=br.readLine(); kosu br.readLine() br.readLine br int nako=Integer.parseInt(kosu); nako Integer.parseInt(kosu) Integer.parseInt Integer kosu int[] suji=new int[nako]; suji new int[nako] nako String[] egara=new String[nako]; egara new String[nako] nako for(int j=0; j<nako; j++){
			String strArr[] = br.readLine().split(" ");
			egara[j]=(strArr[0]);
			suji[j]=Integer.parseInt(strArr[1]);
			
		} int j=0; int j=0; j 0 j<nako j nako j++ j++ j {
			String strArr[] = br.readLine().split(" ");
			egara[j]=(strArr[0]);
			suji[j]=Integer.parseInt(strArr[1]);
			
		} {
			String strArr[] = br.readLine().split(" ");
			egara[j]=(strArr[0]);
			suji[j]=Integer.parseInt(strArr[1]);
			
		} String strArr[] = br.readLine().split(" "); strArr br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " egara[j]=(strArr[0]) egara[j] egara j (strArr[0]) strArr 0 suji[j]=Integer.parseInt(strArr[1]) suji[j] suji j Integer.parseInt(strArr[1]) Integer.parseInt Integer strArr[1] strArr 1 int[] trump=new int[52]; trump new int[52] 52 int tmp=0; tmp 0 for(int i=0; i<52; i++){
			trump[i]=0;
		} int i=0; int i=0; i 0 i<52 i 52 i++ i++ i {
			trump[i]=0;
		} {
			trump[i]=0;
		} trump[i]=0 trump[i] trump i 0 for(int i=0; i<nako; i++){

			if(egara[i].equals("S")){
				tmp=-1;
				tmp+=suji[i];
			}
			else if(egara[i].equals("H")){
				tmp=12;
				tmp+=suji[i];
			}
			else if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			}

			trump[tmp]=1;
		} int i=0; int i=0; i 0 i<nako i nako i++ i++ i {

			if(egara[i].equals("S")){
				tmp=-1;
				tmp+=suji[i];
			}
			else if(egara[i].equals("H")){
				tmp=12;
				tmp+=suji[i];
			}
			else if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			}

			trump[tmp]=1;
		} {

			if(egara[i].equals("S")){
				tmp=-1;
				tmp+=suji[i];
			}
			else if(egara[i].equals("H")){
				tmp=12;
				tmp+=suji[i];
			}
			else if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			}

			trump[tmp]=1;
		} if(egara[i].equals("S")){
				tmp=-1;
				tmp+=suji[i];
			}
			else if(egara[i].equals("H")){
				tmp=12;
				tmp+=suji[i];
			}
			else if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			} egara[i].equals("S") egara[i].equals egara[i] egara i "S" {
				tmp=-1;
				tmp+=suji[i];
			} tmp=-1 tmp -1 1 tmp+=suji[i] tmp suji[i] suji i if(egara[i].equals("H")){
				tmp=12;
				tmp+=suji[i];
			}
			else if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			} egara[i].equals("H") egara[i].equals egara[i] egara i "H" {
				tmp=12;
				tmp+=suji[i];
			} tmp=12 tmp 12 tmp+=suji[i] tmp suji[i] suji i if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			} egara[i].equals("C") egara[i].equals egara[i] egara i "C" {
				tmp=25;
				tmp+=suji[i];
			} tmp=25 tmp 25 tmp+=suji[i] tmp suji[i] suji i if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			} egara[i].equals("D") egara[i].equals egara[i] egara i "D" {
				tmp=38;
				tmp+=suji[i];
			} tmp=38 tmp 38 tmp+=suji[i] tmp suji[i] suji i trump[tmp]=1 trump[tmp] trump tmp 1 int[] none_card=new int[52-nako]; none_card new int[52-nako] 52-nako 52 nako int none_count=0; none_count 0 for(int i=0; i<52; i++){
			if(trump[i]==0){
				none_card[none_count]=i+1;
				none_count++;
			}
			else{}
		} int i=0; int i=0; i 0 i<52 i 52 i++ i++ i {
			if(trump[i]==0){
				none_card[none_count]=i+1;
				none_count++;
			}
			else{}
		} {
			if(trump[i]==0){
				none_card[none_count]=i+1;
				none_count++;
			}
			else{}
		} if(trump[i]==0){
				none_card[none_count]=i+1;
				none_count++;
			}
			else{} trump[i]==0 trump[i] trump i 0 {
				none_card[none_count]=i+1;
				none_count++;
			} none_card[none_count]=i+1 none_card[none_count] none_card none_count i+1 i 1 none_count++ none_count {} for(int i=0; i<52-nako; i++){
			if((none_card[i]-1)/13==0){
				if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==1){
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			}
		} int i=0; int i=0; i 0 i<52-nako i 52-nako 52 nako i++ i++ i {
			if((none_card[i]-1)/13==0){
				if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==1){
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			}
		} {
			if((none_card[i]-1)/13==0){
				if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==1){
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			}
		} if((none_card[i]-1)/13==0){
				if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==1){
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			} (none_card[i]-1)/13==0 (none_card[i]-1)/13 (none_card[i]-1) none_card[i] none_card i 1 13 0 {
				if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				}
			} if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				} none_card[i]%13==0 none_card[i]%13 none_card[i] none_card i 13 0 {
					System.out.println("S 13");
				} System.out.println("S 13") System.out.println System.out System System.out "S 13" {
					System.out.println("S "+none_card[i]%13);
				} System.out.println("S "+none_card[i]%13) System.out.println System.out System System.out "S "+none_card[i]%13 "S " none_card[i]%13 none_card[i] none_card i 13 if((none_card[i]-1)/13==1){
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			} (none_card[i]-1)/13==1 (none_card[i]-1)/13 (none_card[i]-1) none_card[i] none_card i 1 13 1 {
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			} if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				} none_card[i]%13==0 none_card[i]%13 none_card[i] none_card i 13 0 {
				System.out.println("H 13");
				} System.out.println("H 13") System.out.println System.out System System.out "H 13" {
					System.out.println("H "+none_card[i]%13);
				} System.out.println("H "+none_card[i]%13) System.out.println System.out System System.out "H "+none_card[i]%13 "H " none_card[i]%13 none_card[i] none_card i 13 if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			} (none_card[i]-1)/13==2 (none_card[i]-1)/13 (none_card[i]-1) none_card[i] none_card i 1 13 2 {
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			} if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					} none_card[i]%13==0 none_card[i]%13 none_card[i] none_card i 13 0 {
					System.out.println("C 13");
					} System.out.println("C 13") System.out.println System.out System System.out "C 13" {
						System.out.println("C "+none_card[i]%13);
					} System.out.println("C "+none_card[i]%13) System.out.println System.out System System.out "C "+none_card[i]%13 "C " none_card[i]%13 none_card[i] none_card i 13 if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			} (none_card[i]-1)/13==3 (none_card[i]-1)/13 (none_card[i]-1) none_card[i] none_card i 1 13 3 {
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			} if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					} none_card[i]%13==0 none_card[i]%13 none_card[i] none_card i 13 0 {
					System.out.println("D 13");
					} System.out.println("D 13") System.out.println System.out System System.out "D 13" {
						System.out.println("D "+none_card[i]%13);
					} System.out.println("D "+none_card[i]%13) System.out.println System.out System System.out "D "+none_card[i]%13 "D " none_card[i]%13 none_card[i] none_card i 13 String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String kosu=br.readLine();
		int nako=Integer.parseInt(kosu);
		int[] suji=new int[nako];
		String[] egara=new String[nako];

		for(int j=0; j<nako; j++){
			String strArr[] = br.readLine().split(" ");
			egara[j]=(strArr[0]);
			suji[j]=Integer.parseInt(strArr[1]);
			
		}

		int[] trump=new int[52];
		int tmp=0;

		for(int i=0; i<52; i++){
			trump[i]=0;
		}

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

			if(egara[i].equals("S")){
				tmp=-1;
				tmp+=suji[i];
			}
			else if(egara[i].equals("H")){
				tmp=12;
				tmp+=suji[i];
			}
			else if(egara[i].equals("C")){
				tmp=25;
				tmp+=suji[i];
			}
			else if(egara[i].equals("D")){
				tmp=38;
				tmp+=suji[i];
			}

			trump[tmp]=1;
		}


		int[] none_card=new int[52-nako];
		int none_count=0;

		for(int i=0; i<52; i++){
			if(trump[i]==0){
				none_card[none_count]=i+1;
				none_count++;
			}
			else{}
		}

		for(int i=0; i<52-nako; i++){
			if((none_card[i]-1)/13==0){
				if(none_card[i]%13==0){
					System.out.println("S 13");
				}
				else{
					System.out.println("S "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==1){
				if(none_card[i]%13==0){
				System.out.println("H 13");
				}
				else{
					System.out.println("H "+none_card[i]%13);
				}
			}

			else if((none_card[i]-1)/13==2){
				if(none_card[i]%13==0){
					System.out.println("C 13");
					}
					else{
						System.out.println("C "+none_card[i]%13);
					}
			}

			else if((none_card[i]-1)/13==3){
				if(none_card[i]%13==0){
					System.out.println("D 13");
					}
					else{
						System.out.println("D "+none_card[i]%13);
					}
			}
		}
	}
}