data = {

        'S': [int(x) for x in range(1,14)],

        'H': [int(x) for x in range(1,14)],

        'C': [int(x) for x in range(1,14)],

        'D': [int(x) for x in range(1,14)]

        }

 

count = int(eval(input()))

 

for c in range(count):

    (s, r) = input().split()

    r = int(r)

 

    del data[s][data[s].index(r)]

 

 

for i in ('S', 'H', 'C', 'D'):

    for v in data[i]:

        print((i, v))
cards = {

        'S': [0 for _ in range(13)],

        'H': [0 for _ in range(13)],

        'C': [0 for _ in range(13)],

        'D': [0 for _ in range(13)],

}

n = int(eval(input()))

for _ in range(n):

    (s, r) = input().split()

    cards[s][int(r) - 1] = 1

 

for s in ('S', 'H', 'C', 'D'):

    for r in range(13):

        if cards[s][r] == 0:

            print((s, r + 1))
data = {
    "S": [int(x) for x in range(1, 14)],
    "H": [int(x) for x in range(1, 14)],
    "C": [int(x) for x in range(1, 14)],
    "D": [int(x) for x in range(1, 14)],
}
count = int(eval(input()))
for c in range(count):
    (s, r) = input().split()
    r = int(r)
    del data[s][data[s].index(r)]
for i in ("S", "H", "C", "D"):
    for v in data[i]:
        print((i, v))

cards = {
    "S": [0 for _ in range(13)],
    "H": [0 for _ in range(13)],
    "C": [0 for _ in range(13)],
    "D": [0 for _ in range(13)],
}
n = int(eval(input()))
for _ in range(n):
    (s, r) = input().split()
    cards[s][int(r) - 1] = 1
for s in ("S", "H", "C", "D"):
    for r in range(13):
        if cards[s][r] == 0:
            print((s, r + 1))

-data = { -    "S": [int(x) for x in range(1, 14)], -    "H": [int(x) for x in range(1, 14)], -    "C": [int(x) for x in range(1, 14)], -    "D": [int(x) for x in range(1, 14)], +cards = { +    "S": [0 for _ in range(13)], +    "H": [0 for _ in range(13)], +    "C": [0 for _ in range(13)], +    "D": [0 for _ in range(13)], -count = int(eval(input())) -for c in range(count): +n = int(eval(input())) +for _ in range(n): -    r = int(r) -    del data[s][data[s].index(r)] -for i in ("S", "H", "C", "D"): -    for v in data[i]: -        print((i, v)) +    cards[s][int(r) - 1] = 1 +for s in ("S", "H", "C", "D"): +    for r in range(13): +        if cards[s][r] == 0: +            print((s, r + 1))