suits = ['S','H','C','D']

n = int(input())
cards = set() 
for _ in range(n):
    cards.add(input())

for suit in suits:
    for i in range(1,14):
        s = "{} {}".format(suit, i)
        if s not in cards:
            print(s)
