using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            List<int> GetUserS = new List<int>();
            List<int> GetUserH = new List<int>();
            List<int> GetUserC = new List<int>();
            List<int> GetUserD = new List<int>();
            string[] Card;


           int CrentCard =  int.Parse(Console.ReadLine());


            for(int i = 0; CrentCard > i; i++) 
            {
                string CardType = Console.ReadLine();

                Card = CardType.Split(' ');

                    switch (Card[0])
                    {
                     case "S":
                            GetUserS.Add(int.Parse(Card[1]));
                            break;

                    case "H":
                            GetUserH.Add(int.Parse(Card[1]));
                            break;

                    case "C":
                        GetUserC.Add(int.Parse(Card[1]));
                        break;

                    case "D":
                        GetUserD.Add(int.Parse(Card[1]));
                        break;
                }

            }


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

            }

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

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

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


        }


    }
}