N = int(eval(input()))

cards = []

for i in range(N):

    s,r = input().split()

    cards.append((s,int(r)))

for s,r in [(s,r) for s in 'SHCD' for r in range(1,14) if (s,r) not in cards]:

    print((s, r))
marks = ["S","H","C","D"]

all_cards = []

for i in marks:

    for j in range(1,14):

        all_cards.append(str(i) + " " + str(j))



n = int(eval(input()))

p_cards = []



for x in range(n):

    p_cards.append(str(eval(input())))



for y in p_cards:

    all_cards.remove(y)



for z in all_cards:

    print(z)
N = int(eval(input()))
cards = []
for i in range(N):
    s, r = input().split()
    cards.append((s, int(r)))
for s, r in [(s, r) for s in "SHCD" for r in range(1, 14) if (s, r) not in cards]:
    print((s, r))

marks = ["S", "H", "C", "D"]
all_cards = []
for i in marks:
    for j in range(1, 14):
        all_cards.append(str(i) + " " + str(j))
n = int(eval(input()))
p_cards = []
for x in range(n):
    p_cards.append(str(eval(input())))
for y in p_cards:
    all_cards.remove(y)
for z in all_cards:
    print(z)

-N = int(eval(input())) -cards = [] -for i in range(N): -    s, r = input().split() -    cards.append((s, int(r))) -for s, r in [(s, r) for s in "SHCD" for r in range(1, 14) if (s, r) not in cards]: -    print((s, r)) +marks = ["S", "H", "C", "D"] +all_cards = [] +for i in marks: +    for j in range(1, 14): +        all_cards.append(str(i) + " " + str(j)) +n = int(eval(input())) +p_cards = [] +for x in range(n): +    p_cards.append(str(eval(input()))) +for y in p_cards: +    all_cards.remove(y) +for z in all_cards: +    print(z)