s = range(1,14)
h = range(1,14)
c = range(1,14)
d = range(1,14)

n = int(input())
while n > 0:
    x = input().split(' ')
    if x[0] == 'S':
        s[x[1]-1] = 0
    elif x[0] == 'H':
        h[x[1]-1] = 0
    elif x[0] == 'C':
        c[x[1]-1] = 0
    elif x[0] == 'D':
        d[x[1]-1] = 0
    n -= 1

for t in s:
    if t != 0: print("S %d" % t)
for t in h:
    if t != 0: print("H %d" % t)
for t in c:
    if t != 0: print("C %d" % t)
for t in d:
    if t != 0: print("D %d" % t)