Buggy python submission (verdict: Runtime Error):
'''
?????????????????????
??????????????¨??????????????\?????????
???????????????????????¨????????????
??????????????????
????????????????????£????¶????????????°???????????????????????????
?¬????????????????????????°??????1??\????????????
??????????????¨?????????????????????????????????????????¨??????????????°????????????????????????
??????1??\???????????°??????????????????????¬???????????????¨???????????????
???????????£?????????????????¨??????????????\?????????
??£?????¨??????????????????????????????
??????????????????????????????????????£????????????????????\?????§??§????????????
??????????????????????????????????????????????????§????????°??§????????????
??§?????£?????¨?????§?????£?????????????????´??????

??£?????¨?????§?????¶??????????????????????????????????´????
????????????????????????????????°??????????????????
????????????????????£???????????°?????????????????????1????????§???????????°?¶????????????°??????
?????????????????\???????????????????´????
?????????4???????????¶??????????????????????????????

??°??????????????£???int????????????
??°???????????????????????¨???????????????????´??????????????????¨?????????????????????????¶??????°????????????

??????2??\????????????????????´???????????????????????????
'''


import re

#eCard = ['S 1', 'S 5', 'H 1', 'D 2', 'C 8', 'S 13']

n = int(input())
i = 0
while i < n:
    eCard.append(input())
    i += 1

#print(eCard)
#???????????????????????£?????¨?????§????´¢???????????????
S = []
H = []
D = []
C = []

missingS = []
missingH = []
missingD = []
missingC = []


def assortSuit(s, sc):
    i = 0

#??????????????????????????¢?????\?????????????????????
    while i < int(len(eCard)):
        if re.match(s, eCard[i]):
            Smatch = re.search('\d+', eCard[i])
            sc.append(int(Smatch.group()))#????????????????????????????????£?????????????????¨???????????°???????????????
        i += 1

#S = re.search(???^S.*???, eCard)
assortSuit('^S', S)
assortSuit('^H', H)
assortSuit('^D', D)
assortSuit('^C', C)

def selectMissingCards(c, mc):
    c.sort()
#???????????°???????°?????????°????????????????????¨???
    smallerC = 1
    while smallerC < c[0]:
        mc.append(smallerC)
        smallerC += 1
        
        
    i = 0

    while i < len(c)-1:
        m = c[i+1] - c[i]
    
        if m > 1:
            h = 1
            while h < m:
                mc.append(c[i]+h)
                h += 1
        i += 1
    largerC = c[i] + 1
    while largerC <= 13:
        mc.append(largerC)
        largerC += 1
        
            

selectMissingCards(S, missingS)
selectMissingCards(H, missingH)
selectMissingCards(D, missingD)
selectMissingCards(C, missingC)

'''
print(missingS)
print(missingH)
print(missingD)
print(missingC)
'''

missingCards = []

def allMissingCards(mc, s):
    #??????????????????????????????????????°?????????????????????????????????????????????????´????
    i = 0
    while i < len(mc):
        missingCards.append(s + str(mc[i]))
        i += 1
    
allMissingCards(missingS, "S ")
allMissingCards(missingH, "H ")
allMissingCards(missingD, "D ")
allMissingCards(missingC, "C ")

#print(missingCards)

i = 0
while i < len(missingCards):
    print(missingCards[i])
    i += 1
    


'''
if S:
    #??°?????????????????????????´????
    
    Scard = re.search(???\d+???, S)#?????????????????????????????????????????£?????¨???????????§?????????????????°??????????????¨???
    SeCard = []
    SeCard.append(int(Scard.group()))
    print(SeCard)
'''

Fixed submission:
'''
?????????????????????
??????????????¨??????????????\?????????
???????????????????????¨????????????
??????????????????
????????????????????£????¶????????????°???????????????????????????
?¬????????????????????????°??????1??\????????????
??????????????¨?????????????????????????????????????????¨??????????????°????????????????????????
??????1??\???????????°??????????????????????¬???????????????¨???????????????
???????????£?????????????????¨??????????????\?????????
??£?????¨??????????????????????????????
??????????????????????????????????????£????????????????????\?????§??§????????????
??????????????????????????????????????????????????§????????°??§????????????
??§?????£?????¨?????§?????£?????????????????´??????

??£?????¨?????§?????¶??????????????????????????????????´????
????????????????????????????????°??????????????????
????????????????????£???????????°?????????????????????1????????§???????????°?¶????????????°??????
?????????????????\???????????????????´????
?????????4???????????¶??????????????????????????????

??°??????????????£???int????????????
??°???????????????????????¨???????????????????´??????????????????¨?????????????????????????¶??????°????????????

??????2??\????????????????????´???????????????????????????
'''


import re

#eCard = ['S 1', 'S 5', 'H 1', 'D 2', 'C 8', 'S 13']
eCard = []
n = int(input())
i = 0
while i < n:
    eCard.append(input())
    i += 1

#print(eCard)
#???????????????????????£?????¨?????§????´¢???????????????
S = []
H = []
D = []
C = []

missingS = []
missingH = []
missingD = []
missingC = []


def assortSuit(s, sc):
    i = 0

#??????????????????????????¢?????\?????????????????????
    while i < int(len(eCard)):
        if re.match(s, eCard[i]):
            Smatch = re.search('\d+', eCard[i])
            sc.append(int(Smatch.group()))#????????????????????????????????£?????????????????¨???????????°???????????????
        i += 1

#S = re.search(???^S.*???, eCard)
assortSuit('^S', S)
assortSuit('^H', H)
assortSuit('^D', D)
assortSuit('^C', C)

def selectMissingCards(c, mc):
    c.sort()
#???????????°???????°?????????°????????????????????¨???
    smallerC = 1
    while smallerC < c[0]:
        mc.append(smallerC)
        smallerC += 1
        
        
    i = 0

    while i < len(c)-1:
        m = c[i+1] - c[i]
    
        if m > 1:
            h = 1
            while h < m:
                mc.append(c[i]+h)
                h += 1
        i += 1
    largerC = c[i] + 1
    while largerC <= 13:
        mc.append(largerC)
        largerC += 1
        
            

selectMissingCards(S, missingS)
selectMissingCards(H, missingH)
selectMissingCards(D, missingD)
selectMissingCards(C, missingC)

'''
print(missingS)
print(missingH)
print(missingD)
print(missingC)
'''

missingCards = []

def allMissingCards(mc, s):
    #??????????????????????????????????????°?????????????????????????????????????????????????´????
    i = 0
    while i < len(mc):
        missingCards.append(s + str(mc[i]))
        i += 1
    
allMissingCards(missingS, "S ")
allMissingCards(missingH, "H ")
allMissingCards(missingC, "C ")
allMissingCards(missingD, "D ")

#print(missingCards)

i = 0
while i < len(missingCards):
    print(missingCards[i])
    i += 1
    


'''
if S:
    #??°?????????????????????????´????
    
    Scard = re.search(???\d+???, S)#?????????????????????????????????????????£?????¨???????????§?????????????????°??????????????¨???
    SeCard = []
    SeCard.append(int(Scard.group()))
    print(SeCard)
'''