n = input()
find = []
c = []
for i in ['S ','H ','C ','D ']:
    for j in map( str , xrange(1,14) ):
        find.append( i+j )   
for i in xrange(n):
    find.remove( raw_input() )
for i in xrange( len( find ) ):
    print find[i]