using System;

namespace Project
{
	class MainClass
	{
		public static void Main(string[] args)
		{
			int n = int.Parse(Console.ReadLine());
			int[,] card = new int[4, 13];
			string s = Console.ReadLine();
			for (int i = 0; i < n; i++)
			{
				string[] sar = s.Split(' ');
				int number = int.Parse(sar[1]);
				switch (sar[0])
				{
					case "S":
						card[1, number] = 1;
						break;
					case "H":
						card[2, number] = 1;
						break;
					case "C":
						card[3, number] = 1;
						break;
					case "D":
						card[4, number] = 1;
						break;
					default:
						Console.WriteLine("invalid type input");
						break;
				}
			}

			for (int i = 1; i <= 4; i++)
			{
				for (int j = 1; j <= 13; j++)
				{
					switch (i)
					{
						case 1:
							if (card[i, j] == 0) { Console.WriteLine("S {0}", j); }
							break;
						case 2:
							if (card[i, j] == 0) { Console.WriteLine("H {0}", j);}
							break;
						case 3:
							if (card[i, j] == 0) { Console.WriteLine("C {0}", j); }
							break;
						case 4:
							if (card[i, j] == 0) { Console.WriteLine("D {0}", j); }
							break;
					}
				}
			}
		}
	}
}