type=["S","H","C","D"]
ans=[[i,str(j)] for i in type for j in range(1,14,1)]

N=int(input())
for k in range(N):
    card=list(map(str, input().split()))
    ans.remove(card)

for l in range(52-N):
    print(*ans[l])
