import sys

cards_num = int(sys.stdin.readline())
cards =[ card[:-1] for card in sys.stdin.readlines() ]

print(cards_num)
print(cards)

all_cards = [ i + ' ' + str(j) for i in 'SHCD' for j in range(1,14) ]

missing_cards = [i for i in all_cards if not(i in cards) ]

for s in missing_cards:
    print(s)
