n = int(input())
an = [input() for _ in range(n)]
a =[]
for c in "SHCD":
    for i in range(1, 14):
        card = "{} {}".format(c, i)
        if card not in an:
            a.append(card)

if n != 52:
    print("\n".join(a))
