using System;

class MainClass
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        string[] haveCards = new string[n];
        string[] allCards = new string[52];
        string[] noHaveCards = new string[52 - n];

        for (int i = 0; i < n; i++)
            haveCards[i] = Console.ReadLine();

        //Input all cards state
        for (int i = 0; i < 52; i++)
        {
            if (0 <= i && i <= 12)
                allCards[i] = "S " + (i + 1);
            else if (13 <= i && i <= 25)
                allCards[i] = "H " + (i - 12);
            else if (26 <= i && i <= 38)
                allCards[i] = "C " + (i - 25);
            else if (39 <= i && i <= 51)
                allCards[i] = "D " + (i - 38);
        }

        //Search NoHaveCards
        bool isHave = false;
        for (int i = 0; i < 52; i++)
        {
            for (int j = 0; j < n; j++)
            {
                if (allCards[i] == haveCards[j])
                    isHave = true;
            }
            if (isHave != true)
                Console.WriteLine(allCards[i]);
            isHave = false;
        }
    }
}