N = int(input())

FL =[]
for i in range(13):
 FL.append("S" + str(i+1))
for i in range(13):
 FL.append("H" + str(i+1))
for i in range(13):
 FL.append("C" + str(i+1))
for i in range(13):
 FL.append("D" + str(i+1))

for i in range(N):
 x,y = map(str, input().split())
 FL.remove(x + y)

for i in range(52 - N - 1):
 print(FL[i] + " ", end="")
print(FL[-1])