
x = input()
mark = []
num = []
for i in xrange(x):
    inp = raw_input().split()
    inp[1] = int(inp[1])
    mark.append(inp)

trump = ["C","D","H","S"]
for i in xrange(4):
    for j in xrange(13):
        tako = [str(trump[i]), int(j + 1)]
        p = len(mark)