cards = []
for suit in ['S', 'H', 'C', 'D']:
  for i in range(13):
    cards.append(' '.join([suit, str(i + 1)]))

N = int(input())
for _ in range(N):
  cards.remove(input())

for card in cards:
  print(card)
