

namespace ITP1_6_B
{
    class Program
    {
        static void Main(string[] args)
        {
            Trump[] trump = new Trump[4];
            trump[0] = new Trump('S');
            trump[1] = new Trump('H');
            trump[2] = new Trump('C');
            trump[3] = new Trump('D');

            int havenumber = int.Parse(Console.ReadLine());
            for(int i = 0; i < havenumber; i++)
            {
                string[] input = Console.ReadLine().Split(' ');
                int mark = -1;
                switch (input[0])
                {
                    case "S":mark = 0; break;
                    case "H":mark = 1; break;
                    case "C":mark = 2; break;
                    case "D":mark = 3; break;
                    default: break;                           
                }
                if (mark > -1) trump[mark].SearchShortage(Convert.ToInt32(input[1]));
            }
            foreach (var t in trump)
                t.ShowCards();            
        }
    }
    class Trump
    {
        public char Mark { get; set; }
        private bool[] card = new bool[13];

        public Trump(char mark) { Mark = mark; }

        public void SearchShortage(int x) { card[x - 1] = true; }              
        public void ShowCards()
        {
            int number = 1;
            foreach(var j in card)
            {
                if (!j) Console.WriteLine(Mark + " " + number);
                number++;
            }
        }
    }
}