from __future__ import division, print_function
from sys import stdin
cards = [True] * 52
suits = {'S': 13*0, 'H': 13*1, 'C': 13*2, 'D': 13*3}
for _ in range(int(stdin.readline())):
    s, i = stdin.readline().split()
    cards[suits[s] + int(i) - 1] = False
for i, f, in enumerate(cards):
    if f:
        print('SHCD'[i//13], i % 13 + 1)