l = []
for i in range(1,14):
    l.append("S "+str(i))
for i in range(1,14):
    l.append("H "+str(i))
for i in range(1,14):
    l.append("C "+str(i))
for i in range(1,14):
    l.append("D "+str(i))
num = int(input())
for i in range(num):
    l.remove(input(()))

for i in range(52-num):
    print(l[i])
