L = []
A = ["S","H","C","D"]
for i in A :
    for j in range(1,14) :
        L.append("{} {}".format(i,j))

N = int(input())
for i in range(N) :
    l = input()
    L.remove(l)
for i in range(len(L)) :
    print(L[i])

