int main(void)
{
	int cards[4][13]={0},n;
	int i,j,b;
	char a;

	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%c %d",&a,&b);
		switch(a){
		case'S':cards[0][b-1]=1;
			break;
		case'H':cards[1][b-1]=1;
			break;
		case'C':cards[2][b-1]=1;
			break;
		case'D':cards[3][b-1]=1;
			break;
		}
	}
	for(i=0;i<4;i++){
		for(j=0;j<13;j++){
			if(cards[i][j]==0){
				switch(i){
				case 0:printf("S %d\n",j+1);
					break;
				case 1:printf("H %d\n",j+1);
					break;
				case 2:printf("C %d\n",j+1);
					break;
				case 3:printf("D %d\n",j+1);
					break;
				}
			}
		}
	}
	return 0;
}