n=int(input())
s=(list(range(1,14)))
h=(list(range(1,14)))
c=(list(range(1,14)))
d=(list(range(1,14)))
hand=[map(str,raw_input().split()) for i in range(n)]
for a in hand:
    if a[0]=="S":
        s.remove(int(a[1]))
    if a[0]=="H":
        h.remove(int(a[1]))
    if a[0]=="C":
        c.remove(int(a[1]))
    if a[0]=="D":
        d.remove(int(a[1]))
if len(s)!=0:
    for a in s:
        print "S "+str(a)
if len(h)!=0:
    for a in h:
        print "H "+str(a)
if len(c)!=0:
    for a in c:
        print "C "+str(a)
if len(d)!=0:
    for a in d:
        print "D "+str(a)
