#include <stdio.h>
using namespace std;
int main(){
	
	int card[4][13]={0};
	char ckind;
	int number;
	char kind[4]={'S','H','C','D'};
	int i;
	int j;
	int n;
	
	cin >> n;
	
	for(i=0;i<n;i++){
			cin >> ckind >> number ;
			switch(ckind){
				case 'S': card[0][number-1]=1;
				case 'H': card[1][number-1]=1;
				case 'C': card[2][number-1]=1;
				case 'D': card[3][number-1]=1;
		}
	}
	
	
	/*for(i=0;i<4;i++){
		for(j=0;j<13;j++){
			printf("%d",card[i][j]);

		}
}*/
	
	for(i=0;i<4;i++){
		for(j=0;j<13;j++){
			if(card[i][j]==0)
                        cout << kind[i] <<" " << j+1 << endl;
		}
	}
	return 0;
}