using System;

namespace ITP1_6_B
{
    class Program
    {
        static void Main(string[] args)
        {
            bool[,] isHaved = new bool[4,13];
            int noOfCardsInHand = int.Parse(Console.ReadLine());
            for(int i=0; i<noOfCardsInHand;i++)
            {
                var input = Console.ReadLine().Split(' ');
                int suffix;
                suffix = int.Parse(input[1]);
                switch(input[0])
                {
                    case "S":
                        isHaved[0, suffix-1] = true;
                        break;
                    case "H":
                        isHaved[1, suffix-1] = true;
                        break;
                    case "C":
                        isHaved[2, suffix-1] = true;
                        break;
                    case "D":
                        isHaved[3, suffix-1] = true;
                        break;
                    default: break;
                }
            }

            for(int i=0; i<4; i++)
            {
                for(int j=0;j<13;j++)
                {
                    if(isHaved[i, j]==false)
                    {
                        if (i == 0) Console.WriteLine("S {0}",j+1);
                        if (i == 1) Console.WriteLine("H {0}",j+1);
                        if (i == 2) Console.WriteLine("C {0}",j+1);
                        if (i == 3) Console.WriteLine("D {0}",j+1);
                    }
                }
            }
            Console.WriteLine();
        }
    }
}