n = int(input())
cards = ["{} {}".format(suit, str(number)) for suit in ["S", "H", "C", "D"] for number in range(1,14)]
for _ in range(n):
    cards.remove(input())
for card in cards:
    print(card)

