using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication15
{
    class Program
    {
        static void Main(string[] args)
        {
            string[,] trump = new string[4,13];
            string suit = " ";
            for (int x = 0; x < 4; x++)
            {
                for (int y = 0; y < 13; y++)
                {
                    switch (x)
                    {
                     case 0:
                         suit = "S";
                         break;
                     case 1:
                         suit = "H";
                         break;
                     case 2:
                         suit = "C";
                         break;
                     case 3:
                         suit = "D";
                         break;
                 }
                    trump[x,y] = suit + " " + (y+1);
                    Console.WriteLine(trump[x,y]);
                }
            }

            string n = Console.ReadLine();
            int o = int.Parse(n);
            string[] input = new string [o];
            for (int i = 0; i < o; i++)
            {
                input[i] = Console.ReadLine();

            }
            foreach (string card in trump)
            {
                for (int i = 0; i < o; i++)
                {
                    if (card != input[i])
                    {

                        Console.WriteLine(card);
                    }
                }
            }
        }
    }
}