my_cards = []
for i in range(n):
    my_cards.append(input())

all_cards  =[]
for i in range(13):
    all_cards.append("S "+str(i+1))
for i in range(13):
    all_cards.append("H "+str(i+1))
for i in range(13):
    all_cards.append("C "+str(i+1))
for i in range(13):
    all_cards.append("D "+str(i+1))

print(my_cards)

lost_cards = []
for i in range(52):
    if all_cards[i] not in my_cards:
        lost_cards.append(all_cards[i])

for i in range(len(lost_cards)):
    print(lost_cards[i])