from itertools import product
tranps = [s+" "+str(n) for s, n in product(['S', 'H', 'C', 'D'], range(1, 14))]
n = int(raw_input())
tranp_in = [raw_input() for i in range(0,n)]
for tranp in tranps:
    if tranp in tranp_in:
        continue
    print tranp
