using System;

class ITP1_6_B
{
    public static void Main()
    {
        int[,] Card = new int[4, 13];

        int n = int.Parse(Console.ReadLine());

        for (int i = 0; i < n; i++)
        {
            string[] Input = Console.ReadLine().Split(' ');
            switch (Input[0])
            {
                case "S":
                    Card[0, int.Parse(Input[1]) - 1] = 1;
                    break;
                case "H":
                    Card[1, int.Parse(Input[1]) - 1] = 1;
                    break;
                case "C":
                    Card[2, int.Parse(Input[1]) - 1] = 1;
                    break;
                case "D":
                    Card[3, int.Parse(Input[1]) - 1] = 1;
                    break;
            }
        }

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