a = []
b = ("S", "H", "C", "D")
n = int(input())
for y in b:
    for x in range(1,14):
        a.append(y+" "+str(x))
for y in range(n):
    z = input()
    a.remove(z)
for rem in a:
    print(rem)


