all_cards = [[],[],[],[]]
for i in range(4):
	for j in range(13):
		all_cards[i].append(j+1)

n = int(raw_input())
for i in range(n):
	card = raw_input().split()
	if card[0] == "S":
		all_cards[0].remove(card[1])
	elif card[0] == "H":
		all_cards[1].remove(card[1])
	elif card[0] == "C":
		all_cards[2].remove(card[1])
	else:
		all_cards[3].remove(card[1])

for i in range(len(all_cards[0])):
	print("S {:}".format(all_cards[0][i]))
for i in range(len(all_cards[1])):
	print("H {:}".format(all_cards[1][i]))
for i in range(len(all_cards[2])):
	print("C {:}".format(all_cards[2][i]))
for i in range(len(all_cards[3])):
	print("D {:}".format(all_cards[3][i]))