n = input()

S = range(1, 14)
H = range(1, 14)
C = range(1, 14)
D = range(1, 14)

for i in range(0, n):
   mk, num = map(int,raw_input()split())
      if mk == 'S':
         S[str(num)-1] = 0
      elif mk == 'H':
         S[str(num)-1] = 0
      elif mk == 'C':
         S[str(num)-1] = 0
      elif mk == 'D':
         S[str(num)-1] = 0

for x in range(0, 4):
   for y in range(0, 13):
      if S[x][y] != 0
         print ('S' y+1)