using System;

namespace Cartas
{
    class Program
    {
        static void Main(string[] args)
        {
            bool[] S = new bool[14];
            bool[] H = new bool[14];
            bool[] C = new bool[14];
            bool[] D = new bool[14];
            int n = int.Parse(Console.ReadLine());
            while (n > 0)
            {
                string[] lee = Console.ReadLine().Split();
                if (lee[0] == "S") S[int.Parse(lee[1])] = true;
                else if (lee[0] == "H") H[int.Parse(lee[1])] = true;
                else if (lee[0] == "C") C[int.Parse(lee[1])] = true;
                else D[int.Parse(lee[1])] = true;
                n--;
            }
            for (int i = 1; i < 14; i++)
            {
                if (!S[i]) Console.WriteLine("S " + i);
                if (!H[i]) Console.WriteLine("H " + i);
                if (!C[i]) Console.WriteLine("C " + i);
                if (!D[i]) Console.WriteLine("D " + i);
            }
        }
    }
}

