using System;

namespace AOJ
{
    class Program
    {
        static void Main(string[] args)
        {

            var card = new bool[4, 13];

            for (var i = 0; i < 4;i++ )
            {
                for(var r=0;r<13;r++)
                {
                    card[i, r] = false;
                }
            }

            var read = Console.ReadLine();
            int num = int.Parse(read);


                for (int i = 0; i < num; i++)
                {
                    read = Console.ReadLine();
                    var temp_string = read.Split(' ');

                    switch (temp_string[0])
                    {
                        case "S":
                            {
                                card[0, int.Parse(temp_string[1])] = true;
                                break;
                            }
                        case "H":
                            {
                                card[1, int.Parse(temp_string[1])] = true;
                                break;
                            }
                        case"C":
                            {
                                card[2, int.Parse(temp_string[1])] = true;
                                break;
                            }
                        case"D":
                            {
                                card[3, int.Parse(temp_string[1])] = true;
                                break;
                            }
                    }

                }

                for (var i = 0; i < 4; i++)
                {
                    for (var r = 0; r < 13; r++)
                    {
                        if(!(card[i,r]))
                        {
                            switch(i)
                            {
                                case 0:
                                    {
                                        Console.WriteLine("S" + r);
                                        break;
                                    }

                                case 1:
                                    {
                                        Console.WriteLine("H" + r);
                                        break;
                                    }

                                case 2:
                                    {
                                        Console.WriteLine("C" + r);
                                        break;
                                    }

                                case 3:
                                    {
                                        Console.WriteLine("D" + r);
                                        break;
                                    }


                            }
                        }
                    }
                }
            

            Console.WriteLine();
        }
    }
}