suit = ('S', 'H', 'C', 'D')
cards = [f'{s} {n}' for s in suit for n in range(1, 14)]
n = int(input())
for _ in range(n):
    card = input()
    cards.remove(card)

for card in cards:
    print(card)

