#!/usr/bin/python
# coding: utf-8
import sys

n=int(raw_input())
m=n
w,S,H,C,D=[],[],[],[],[]
CARD=['1','2','3','4','5','6','7','8','9','10','11','12','13']
for i in xrange(n):
    w.append(map(str, raw_input().split()))

for j in xrange(m):
    if str(w[j][0]) == 'S': S.append(str(w[j][1]))
    elif str(w[j][0]) == 'H': H.append(str(w[j][1]))
    elif str(w[j][0]) == 'C': C.append(str(w[j][1]))
    else: D.append(str(w[j][1]))

for a in range(0,13):
    if CARD[a] not in S: print 'S',str(a+1)
for b in range(0,13):
    if CARD[b] not in H: print 'H',str(b+1)
for c in range(0,13):
    if CARD[c] not in C: print 'C',str(c+1)
for d in range(0,13):
    if CARD[d] not in D: print 'D',str(d+1)