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

if card!=[]:
    print(*card,sep='\n')

