#include<stdio.h>
int main(void)
{
	int abc[52],a,b,c;
	char t;
	scanf("%d",&a);
	for(b=0;b<a;b++){
		scanf("%c %d\n",&t,&c);
		if(b==a-1){
			scanf("%c %d",&t,&c);
		}
		switch(t){
			case 'S':
				abc[c-1]=7;
				break;
			
			case 'H':
				abc[c+12]=7;
				break;
			
			case 'C':
				abc[c+25]=7;
				break;
			
			case 'S':
				abc[c+38]=7;
				break;
		}
	}
	for(b=0;b<52;b++){
		if(abc[b]!=7){
			switch(b/13){
				case 0:
					printf("S %d\n",b%13+1);
					break;
				case 1:
					printf("H %d\n",b%13+1);
					break;
				case 2:
					printf("C %d\n",b%13+1);
					break;
				case 3:
					printf("D %d\n",b%13+1);
					break;
			}
		}
	}
	return 0;
}