#include<iostream>
#include<string>
using namespace std;

int main()
{
	int n;
	cin>>n;
	char x;
	int r;
	int a[4][13];
	int i,j;
	for(int g=0;g<n;g++){
		cin>>x>>r;
		if(x=="S")i=0;
		if(x=="H")i=1;
		if(x=="C")i=2;
		if(x=="D")i=3;
		j=r-1;
		a[i][j]=true;
		}
for(int t=0;t<13;t++){
	if(a[0][t]==false)cout<<"S "<<t+1<<endl;
	}
for(int t=0;t<13;t++){
	if(a[1][t]==false)cout<<"H "<<t+1<<endl;
	}
for(int t=0;t<13;t++){
	if(a[2][t]==false)cout<<"C "<<t+1<<endl;
	}
for(int t=0;t<13;t++){
	if(a[3][t]==false)cout<<"D "<<t+1<<endl;
	}
	return 0;
	}

