#include <iostream>
#include <vector>
using namespace std;
#define B

#ifdef B
#define _MAX 52
int main(void)
{
	int n;
	int dis;
	bool arr[_MAX];
	cin >> n;
	vector<int> arr(_MAX);
	for (size_t i = 0; i < n; i++)
	{
		char m;
		int num;
		cin >> m >> num;
		switch (m)
		{
		default:
			break;
		case 'S':
			num += 0;
			break;
		case 'H':
			num += 13;
			break;
		case 'C':
			num += 26;
			break;
		case 'D':
			num += 36;
			break;
		}

		arr[num--] = true;

	}
	for (size_t i = 0; i < _MAX; i++)
	{
		if (!arr[i]) {
			switch (i / 13)
			{
			default:
				break;
			case 0:
				cout << "S ";
				break;
			case 1:
				cout << "H ";
				break;
			case 2:
				cout << "C ";
				break;
			case 3:
				cout << "D ";
				break;

			}
			cout << (i % 13) + 1 << endl;
		}
	}
	return 0;
}

#endif


#ifdef A

int main(void)
{
	int n;
	cin >> n;
	vector<int> arr(n);
	for (auto &a : arr)
	{
		cin >> a;
	}
	for (int i = n - 1; i >= 0; i--)
	{
		cout <<arr[i] ;
		if (i != 0)
			cout << " ";
	}
	cout << endl;
	return 0;
}
#endif // A