n = int(input())

remind = []
for i in range(n):
   remind.append(input())

egaraList = ["S ", "H ", "C ", "D "]
for egara in egaraList:
   for j in range(1, 14):
      if egara + str(j) not in remind:
         print(egara + str(j))

