n = int(input())
s = "SHCD"
used = [[0] * 13 for i in range(4)]
for i in range(n):
  a, b = input().split()
  used[s.find(a)][int(b) - 1] = 1
for i in range(4):
  for j in range(13):
    if used[i][j] == 0:
      print(s[i], j + 1)

