#include<iostream>
using namespace std;

#define CARD_TYPE 4
#define CARD_RANK 13
#define CARD_MAX 52

enum TYPE
{
	S = 0;
	H = 1;
	C = 2;
	D = 3;
};

int main()
{
	bool data[CARD_TYPE][CARD_RANK] = { false };
	int type, rank;
	int N;
	
	cin >> N;
	for(int i = 0; i < N; i++)
	{
		cin >> type >> rank;
		data[type][rank] = true;
	}
	
	for(int i = 0; i < CARD_TYPE; i++)
	{
		for(int j = 0; j < CARD_RANK; j++)
		{
			if(!(data[i][j]))
			{
				switch((TYPE)i)
				{
				case S:
					cout << "S ";
					break;
				case H:
					cout << "H ";
					break;
				case C:
					cout << "C ";
					break;
				case D:
					cout << "D ";
					break;
				}
				cout << j - 1 << endl;
			}
		}
	}
	return 0;
}