S_cards=[]
H_cards=[]
C_cards=[]
D_cards=[]

for i in range(1,14):
    S_cards.append(str(i))
    H_cards.append(str(i))
    C_cards.append(str(i))
    D_cards.append(str(i))

now_cards=int(input())
for i in range(0,now_cards):
    kind_num=[]
    kind_num=input().split()
    if kind_num[0]=='S':
        S_cards.remove(kind_num[1])
    elif kind_num[0]=='H':
        H_cards.remove(kind_num[1])
    elif kind_num[0]=='C':
        C_cards.remove(kind_num[1])
    elif kind_num[0]=='D':
        D_cards.remove(kind_num[1])
print()
for i in range(0,len(S_cards)):
    print('S',int(S_cards[i]))
for i in range(0,len(H_cards)):
    print('H',int(H_cards[i]))
for i in range(0,len(C_cards)):
    print('C',int(C_cards[i])
for i in range(0,len(D_cards)):
    print('D',int(D_cards[i]))