for i in range(1,13):
    t[i] = 0

s = t
h = t
c = t
d = t

num = int(input())
for i in range(num)
    m, n = input().split()
    n = int(n)
    if m == "s":
        s[n] == 1
    if m == "h":
        h[n] == 1
    if m == "c":
        h[n] == 1
    if m == "d":
        h[n] == 1

for i in range(1,13):
    if s[i] == 0:
        print("S %d" i)

for i in range(1,13):
    if h[i] == 0:
        print("H %d" i)

for i in range(1,13):
    if c[i] == 0:
        print("C %d" i)

for i in range(1,13):
    if d[i] == 0:
        print("S %d" i)




