n = int(input())
suits = ['S', 'H', 'C', 'D']
cards= []
for suit in suits:
    for i in range(1,14):
        cards.append([suit,str(i)])
for i in range(n):
    cards.remove(input().split())
for i in range(52-n):
    print(cards[i][0],cards[i][1])
