using System;
using System.Collections;

    class Program
    {
        static void Main()
        {
            bool[,] card = new bool[4,13];
            Hashtable types = new Hashtable();
            types["S"] = 0;
            types["H"] = 1;
            types["C"] = 2;
            types["D"] = 3;

            int cardnum = int.Parse(Console.ReadLine());
            for (int i = 0; i < cardnum; i++)
            {
                string[] line = Console.ReadLine().Split(' ');
                card[(int)types[line[0]], int.Parse(line[1]) - 1] = true;
            }
            
            foreach(string type in types.Keys)
            {
                for (int j = 0; j < 13; j++)
                {
                    if (!card[(int)types[type], j]) Console.WriteLine(type + " " + j.ToString());
                }
            }
        }
    }

    class TypeConverter
    {
        static public int[] arrayStrToInt(string[] str)
        {
            return Array.ConvertAll<string, int>(str,
                delegate(string value)
                {
                    return int.Parse(value);
                }
            );
        }

        static public string[] arrayIntToStr(int[] x)
        {
            return Array.ConvertAll<int, string>(x,
                delegate(int value)
                {
                    return value.ToString();
                }
            );
        }
    }