a = [
[0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0],
]

b = {"S":0,"H":1,"C":2,"D":3}
c = ["S","H","C","D"]
n = input()
    
while n > 0:
    x,y = raw_input().split()
    a[b.get(x)][int(y)-1] = 1
    n -= 1

for i in range(4):
    for j in range(13):
        if a[i][j] == 0:
            print c[i],j + 1