using System;
using System.Collections;


namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {

            int count = int.Parse(Console.ReadLine());
            bool[] S = new bool[12];
            bool[] H = new bool[12];
            bool[] C = new bool[12];
            bool[] D = new bool[12];




            for(int i=0; i<count; i++)
            {
                string[] input = Console.ReadLine().Split(' ');
                switch (input[0])
                {
                    case "S":
                        S[int.Parse(input[1])-1] = true;
                        break;

                    case "H":
                        H[int.Parse(input[1])-1] = true;
                        break;

                    case "C":
                        C[int.Parse(input[1])-1] = true;
                        break;

                    case "D":
                        D[int.Parse(input[1])-1] = true;
                        break;
                }
            }

            for(int i = 0; i < 12; i++)
            {
                if(S[i] == false)
                {
                    Console.WriteLine("S " + i+1);
                }
            }

            for (int i = 0; i < 12; i++)
            {
                if (H[i] == false)
                {
                    Console.WriteLine("H " + i+1);
                }
            }

            for (int i = 0; i < 12; i++)
            {
                if (C[i] == false)
                {
                    Console.WriteLine("C " + i+1);
                }
            }

            for (int i = 0; i < 12; i++)
            {
                if (D[i] == false)
                {
                    Console.WriteLine("D " + i+1);
                }
            }

        }
    }
}