import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.range;
import std.container;
import std.bigint;
import std.math;

void main()
{
	readln;
  auto mark = ["S", "H", "C", "D"];
  bool[int][string] cards;
  
  foreach (c; mark) {
    cards[c][0] = true;
  }

  foreach (line; stdin.byLine) {
    auto a = line.chomp.split;
    cards[a[0].to!string][a[1].to!int] = true;
  }

  foreach (c; mark) {
    foreach (i; 1..14) {
      if (!cards[c].get(i, 0)) {
        writeln(c, " ", i);
      }
    }
  }
}