#include<string>
#include<iostream>
#include<cctype>
#include<cmath>
#include<cstdio>

using namespace std;
int main(){

int a;
cin >> a;

char b[52];
int c[52];

int d[4][13];

for(int i=0;i<4;i++){
	for(int j=0;j<14;j++){
	d[i][j]=0;
	}
}

for(int i=0;i<a;i++){
	cin >> b[i] >> c[i];
	int n=c[i];
	if(b[i]=='S') d[0][c[i]]=1; 
	else if(b[i]=='H') d[1][n]=1;
	else if(b[i]=='C') d[2][n]=1;
	else d[3][n]=1;
}

for(int i=0;i<4;i++){
	for(int j=1;j<14;j++){
		if(d[i][j]==0{
			if(i==0) cout << "S " <<j << endl;
			else if(i==1) cout << "H " << j <<endl;
			else if(i==2) cout << "C " << j <<endl;		
			else cout << "D " << j <<endl;
			}
	}