h = [i for i in range(1,14)]
c = [i for i in range(1,14)]
d = [i for i in range(1,14)]
s = [i for i in range(1,14)]

x = int(input())

for i in range(x):
    ss, nn = map(str, input().split())

    try:
        if ss == "H":
            h.remove(int(nn))
        elif ss == "C":
            c.remove(int(nn))
        elif ss == "D":
            h.remove(int(nn))
        elif ss == "S":
            h.remove(int(nn))
    except ValueError:
        break

for i in range(len(s)):
    print ("S "+ str(s[i]))
    
for i in range(len(h)):
    print ("H "+ str(h[i]))

for i in range(len(c)):
    print ("C "+ str(c[i]))

for i in range(len(d)):
    print ("D "+ str(d[i]))
