cards = ['{} {}'.format(s, r) for s in ('S', 'H', 'C', 'D') for r in range (1, 13 + 1)]
x = int(input())
for n in range(x):
    card = input()
    cards.remove(card)
for n in cards:
    print(n)
    
