card=[]
card_m=[]
for i in ('S','H','C','D'):
	for j in range(1,14):
		a=i+' '+str(j)
		card.append(a)
b=int(input())
for i in range(b):
	c=input()
	card.remove(c)
for j in range(len(card)):
	print(card[j])
	
	
