import std.stdio, std.string, std.conv, std.range, std.algorithm;

void main() {
	string[] n = [];
	foreach (string l; lines(stdin)) n ~= l.chomp;
	foreach (s; ["S", "H", "C", "D"])
		foreach (i; 1..14) {
			auto t = "%s %d".format(s, i);
			if (!n[1..$].canFind(t)) t.writeln;
		}
}