card=[]
pattern=['S','H','C','D']
N=int(input())
for p in pattern:
 for i in range(1,13+1):
  card.append(p+' '+str(i))
for i in range(N):
 card.remove(input())
for i in range(len(card)):
 print(card[i])