import sys
dict={}
suit=['S','H','C','D']
input()
lines=sys.stdin.readlines()

'''
lines=['S 2','S 3','S 4','S 6','D 1','H 2','C 12'
'''
for l in lines: dict[l]=True

for i in range(4):
    for j in range(1,14):
        s=suit[i]+' '+str(j)
        if not(dict.get(s,False)): print(s)