using System;



class Program
{
    static void Main(string[] args)
    {
        Input CInput = new Input();
        //EasyTask CEasyTask = new EasyTask();
        //int input = 0;
        //int[] input = new int[(int)Input.Define.MAX_ArraySize];
        //int[,] input = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d];
        //int num = 0;
        //input = CInput.Line1_int();
        //input = CInput.Multiline_int(' ', 2, ref num);

        int input1 = 0;
        string[] input2 = new string[(int)Input.Define.MAX_ArraySize];

        bool[,] is_checkDB = new bool[4, 13];

        input1 = CInput.Line1_int();
        for (int i = 0; i < input1; i++)
        {
            input2 = CInput.Line1_string(' ');
            if (input2[0] == "S") is_checkDB[0, int.Parse(input2[1])-1] = true;
            if (input2[0] == "H") is_checkDB[1, int.Parse(input2[1])-1] = true;
            if (input2[0] == "C") is_checkDB[2, int.Parse(input2[1])-1] = true;
            if (input2[0] == "D") is_checkDB[3, int.Parse(input2[1])-1] = true;
        }

        for (int i = 0; i < 4; i++)
        {
            for (int j = 0; j < 13; j++)
            {
                if (is_checkDB[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);
                }
            }
        }

    }
}








class Input
{
    public enum Define
    {
        MAX_ArraySize = 1000000,
        ArraySize2d = 2,                // 2?¬?????????????[][?] ???????
    }

    public string Line1_string()
    {
        return Console.ReadLine();
    }

    public string[] Line1_string(int chr)
    {
        var input = Console.ReadLine();
        var split = input.Split(' ');
        return split;
    }

    public int Line1_int()
    {
        var input = Console.ReadLine();
        return int.Parse(input);
    }

    public double Line1_double()
    {
        var input = Console.ReadLine();
        return double.Parse(input);
    }

    public int[] Line1_int(int chr, int num)
    {
        var input = Console.ReadLine();
        var split = input.Split(' ');
        int[] spliti = new int[100];
        for (int i = 0; i < num; i++)
        {
            spliti[i] = int.Parse(split[i]);
        }
        return spliti;
    }

    public int[] Multiline_int(ref int datanum)
    {
        int i = 0;
        int[] data = new int[(int)Input.Define.MAX_ArraySize];
        while (true)
        {
            var input = Console.ReadLine();
            var value = int.Parse(input);
            if (value == 0) break;
            data[i] = value;
            i++;
        }
        datanum = i;
        return data;
    }
    /// <summary>
    /// ?????°??????int??????????????????????????????
    /// </summary>
    /// <param name="chr">???????????????</param>
    /// <param name="num">?????????????????????????????°</param>
    /// <param name="datanum">??????????????????????????°</param>
    /// <returns></returns>
    public int[,] Multiline_int(int chr, int num, ref int datanum)
    {
        int i = 0;
        int[,] data = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d];
        while (true)
        {
            var input = Console.ReadLine();
            var split = input.Split(' ');
            int[] spliti = new int[100];
            for (int j = 0; j < num; j++)
            {
                spliti[j] = int.Parse(split[j]);
            }
            if (spliti[0] == 0 && spliti[1] == 0) break;
            data[i, 0] = spliti[0];
            data[i, 1] = spliti[1];
            i++;
        }
        datanum = i;
        return data;
    }


}

class EasyTask
{
    public void Swap(ref int a, ref int b)
    {
        int buf = 0;
        buf = a;
        a = b;
        b = buf;
    }






}

Measured memory_bytes: 17000