cards = []
mark = ["S", "H", "C", "D"]
for m in mark:
    for i in range(1, 14):
        cards.append(m + " " + str(i))
        
n = int(input())

for _ in range(n):
    x = input()
    cards.remove(x)
    
for c in cards:
    print(c)
