using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace _20170409_AOJ
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.ReadLine();

            string line;
            string suits = "SHCD";
            int[,] cards = new int[4, 14];
            for (; (line = Console.ReadLine()) != "";)
            {
                string[] sArr = line.Split(' ');
                string s = sArr[0];
                int number = int.Parse(sArr[1]);

                cards[suits.IndexOf(s), number]++;
            }

            for (int i = 0; i < 4; i++)
            {
                for (int j = 1; j <= 13; j++)
                {
                    if (cards[i, j] == 0)
                    {
                        Console.WriteLine("{0} {1}", suits[i], j);
                    }
                }
            }

            Console.ReadLine();
        }
    }
}