n = int(input())
cards = [input() for _ in range(n)]
missings = []

for c in "SHCD":
    for i in range(1, 14):
        card = f'{c} {i}'
        if card not in cards:
           missings.append(card)

if n != 52:
    print('\n'.join(missings))

