cards = []
marks = ['S', 'H', 'C', 'D']
for mark in marks:
    for i in range(1,14):
        cards.append([mark, str(i)])

n = int(input())
for _ in range(n):
    cards.remove(input().split())

for card in cards:
    print(" ".join(card))
