n = input()
??????????????????
S = range(1, 14)
H = range(1, 14)
C = range(1, 14)
D = range(1, 14)
??????????????????
for i in range(0, n):
??????mk, num = raw_input().split()
????????????if mk == 'S':
??????????????????S[int(num)-1] = 0
????????????elif mk == 'H':
??????????????????H[int(num)-1] = 0
????????????elif mk == 'C':
??????????????????C[int(num)-1] = 0
????????????elif mk == 'D':
??????????????????D[int(num)-1] = 0
??????????????????
for i in range(0, 13):
??????if S[i] != 0:
????????????print 'S '+ str(S[i])
????????????????
for i in range(0, 13):
??????if H[i] != 0:
????????????print 'H '+ str(H[i])
????????????????
for i in range(0, 13):
??????if C[i] != 0:
????????????print 'C '+ str(C[i])
????????????????
for i in range(0,13):
??????if D[i] != 0:
????????????print 'D '+ str(D[i])