using System;

namespace ITP1_6_B
{
    class Program
    {
        static void Main(string[] args)
        {
            int num = int.Parse(Console.ReadLine());

            int[] s = new int[13];
            int[] h = new int[13];
            int[] c = new int[13];
            int[] d = new int[13];
            for (int j = 0; j > num; j++)
            {
                string[] input = Console.ReadLine().Split(' ');
                int value = int.Parse(input[1]) - 1;

                switch (input[0])
                {
                    case "S":
                        s[value] = 1;
                        break;
                    case "H":
                        h[value] = 1;
                        break;
                    case "C":
                        c[value] = 1;
                        break;
                    case "D":
                        d[value] = 1;
                        break;
                }
            } 

            for (int S=0; S<13; S++)
            {
                if (s[S] != 1) Console.WriteLine("S {0}", S + 1);
            }

            for (int H = 0; H < 13; H++)
            {
                if (h[H] != 1) Console.WriteLine("H {0}", H + 1);
            }

            for (int C = 0; C < 13; C++)
            {
                if (c[C] != 1) Console.WriteLine("C {0}", C + 1 );
            }

            for (int D = 0; D < 13; D++)
            {
                if (d[D] != 1) Console.WriteLine("D {0}", D + 1);
            }

        }
    }
}