sys={}
sys['S']=[]
sys['H']=[]
sys['C']=[]
sys['D']=[]
s=[]
h=[]
c=[]
d=[]
for i in range(input()):
    x=raw_input().split()
    if x[0]=='S':
        sys['S'].append(int(x[1]))
    elif x[0]=='H':
        sys['H'].append(int(x[1]))
    elif x[0]=='C':
        sys['C'].append(int(x[1]))
    elif x[0]=='D':
        sys['D'].append(int(x[1]))

for i in range(1,14):
    if i not in sys['S']:
        s.append(str(i))
    if i not in sys['H']:
        h.append(str(i))
    if i not in sys['C']:
        c.append(str(i))
    if i not in sys['D']:
        d.append(str(i))
for w in s:
    print 'S '+w
for w in h:
    print 'H '+w
for w in c:
    print 'C '+w
for w in d:
    print 'D '+w