marks = ["S","H","C","D"]
n = int(input())
a = [input() for i in range(n)]

for mark in marks:
    for i in range(13):
        search_card = mark + " " + str(i + 1)
        if not(search_card in a):
            print(search_card)
