using System;
namespace csharptest
{
    class Program
    {
        static void Main(string[] args)
        {
            bool[] S = new bool[13] { false, false, false, false, false, false, false, false, false, false, false, false, false};
            bool[] H = new bool[13] { false, false, false, false, false, false, false, false, false, false, false, false, false};
            bool[] C = new bool[13] { false, false, false, false, false, false, false, false, false, false, false, false, false};
            bool[] D = new bool[13] { false, false, false, false, false, false, false, false, false, false, false, false, false};
            int n = int.Parse(Console.ReadLine());
            for (int m = 0; m < n; m++)
            {
                string[] str = Console.ReadLine().Split(' ');
                if (str[0] == "S")
                {
                    S[int.Parse(str[1]) - 1] = true;
                }
                else if (str[0] == "H")
                {
                    H[int.Parse(str[1]) - 1] = true;
                }
                else if (str[0] == "C")
                {
                    C[int.Parse(str[1]) - 1] = true;
                }
                else if (str[0] == "D")
                {
                    D[int.Parse(str[1]) - 1] = true;
                }
            }
            for (int m = 0; m < 13; m++)
            {
                if (S[m] == false)
                {
                    Console.WriteLine("S " + m);
                }
            }
            for (int m = 0; m < 13; m++)
            {
                if (H[m] == false)
                {
                    Console.WriteLine("H " + m);
                }
            }
            for (int m = 0; m < 13; m++)
            {
                if (C[m] == false)
                {
                    Console.WriteLine("C " + m);
                }
            }
            for (int m = 0; m < 13; m++)
            {
                if (D[m] == false)
                {
                    Console.WriteLine("D " + m);
                }
            }
        }
    }
}