import random
#52????????????????????????????????????
marks = ['S', 'H', 'C', 'D']
numbers = range(1, 14)
cards = [(m, n) for m in marks for n in numbers]
print(cards)

#????????????????????????????????????
n = int(input())
card_list = random.sample(cards,n)

#????¶????????????????????????????????????????
lost_cards = set(cards) - set(card_list)

for s in lost_cards:
    for n in s:
        if n!=0: 
            print(n)