deck = list()
for s in ["S", "H", "C", "D"]:
    for i in range(1,14):
        deck.append(s + " " + str(i))

n = int(input())
for _ in range(n):
    deck.remove(input()) 

if len(deck) > 0:
    print("\n".join(deck))
