card = []
for i in ['S ','H ','C ','D ']:
    for j in range(13):
        num = i + str(j+1)
        card.append(num)

n = int(input())
for i in range(n):
    del_num = input()
    card.remove(del_num)

for i in card:
    print(i)
