s = [0] * 13
h = [0] * 13
c = [0] * 13
d = [0] * 13

num = int(input())
for i in range(num):
    m, n = input().split()
    n = int(n)
    if m == "s":
        s[n] = 1
    if m == "h":
        h[n] = 1
    if m == "c":
        c[n] = 1
    if m == "d":
        d[n] = 1

for i in range(1,13):
    if s[i] == 0:
        print('S %d' % i)

for i in range(1,13):
    if h[i] == 0:
        print('H %d' % i)

for i in range(1,13):
    if c[i] == 0:
        print('C %d' % i)

for i in range(1,13):
    if d[i] == 0:
        print('D %d' % i)




