import sys



n = int( sys.stdin.readline() )

s = [ False ] * 13

h = [ False ] * 13

c = [ False ] * 13

d = [ False ] * 13

for i in range( 0, n ):

	pattern, num = sys.stdin.readline().split( " " )

	if "S" == pattern:

		s[ int( num )-1 ] = True

	elif "H" == pattern:

		h[ int( num )-1 ] = True

	elif "C" == pattern:

		c[ int( num )-1 ] = True

	elif "D" == pattern:

		d[ int( num )-1 ] = True



for i in range( 0, 13 ):

	if not s[i]:

		print(( "S {:d}".format( i+1 ) ))

for i in range( 0, 13 ):

	if not h[i]:

		print(( "H {:d}".format( i+1 ) ))

for i in range( 0, 13 ):

	if not c[i]:

		print(( "C {:d}".format( i+1 ) ))

for i in range( 0, 13 ):

	if not d[i]:

		print(( "D {:d}".format( i+1 ) ))
import sys



n = int( sys.stdin.readline() )

cards = { 'S': [ False ] * 13, 'H': [ False ] * 13, 'C': [ False ] * 13, 'D': [ False ] * 13 }

for i in range( n ):

	pattern, num = sys.stdin.readline().split( " " )

	if "S" == pattern:

		cards[ 'S' ][ int( num )-1 ] = True

	elif "H" == pattern:

		cards[ 'H' ][ int( num )-1 ] = True

	elif "C" == pattern:

		cards[ 'C' ][ int( num )-1 ] = True

	elif "D" == pattern:

		cards[ 'D' ][ int( num )-1 ] = True



for pattern in ( 'S', 'H', 'C', 'D' ):

	for i in range( 13 ):

		if not cards[ pattern ][ i ]:

			print(( "{:s} {:d}".format( pattern, i+1 ) ))
import sys

n = int(sys.stdin.readline())
s = [False] * 13
h = [False] * 13
c = [False] * 13
d = [False] * 13
for i in range(0, n):
    pattern, num = sys.stdin.readline().split(" ")
    if "S" == pattern:
        s[int(num) - 1] = True
    elif "H" == pattern:
        h[int(num) - 1] = True
    elif "C" == pattern:
        c[int(num) - 1] = True
    elif "D" == pattern:
        d[int(num) - 1] = True
for i in range(0, 13):
    if not s[i]:
        print(("S {:d}".format(i + 1)))
for i in range(0, 13):
    if not h[i]:
        print(("H {:d}".format(i + 1)))
for i in range(0, 13):
    if not c[i]:
        print(("C {:d}".format(i + 1)))
for i in range(0, 13):
    if not d[i]:
        print(("D {:d}".format(i + 1)))

import sys

n = int(sys.stdin.readline())
cards = {"S": [False] * 13, "H": [False] * 13, "C": [False] * 13, "D": [False] * 13}
for i in range(n):
    pattern, num = sys.stdin.readline().split(" ")
    if "S" == pattern:
        cards["S"][int(num) - 1] = True
    elif "H" == pattern:
        cards["H"][int(num) - 1] = True
    elif "C" == pattern:
        cards["C"][int(num) - 1] = True
    elif "D" == pattern:
        cards["D"][int(num) - 1] = True
for pattern in ("S", "H", "C", "D"):
    for i in range(13):
        if not cards[pattern][i]:
            print(("{:s} {:d}".format(pattern, i + 1)))

-s = [False] * 13 -h = [False] * 13 -c = [False] * 13 -d = [False] * 13 -for i in range(0, n): +cards = {"S": [False] * 13, "H": [False] * 13, "C": [False] * 13, "D": [False] * 13} +for i in range(n): -        s[int(num) - 1] = True +        cards["S"][int(num) - 1] = True -        h[int(num) - 1] = True +        cards["H"][int(num) - 1] = True -        c[int(num) - 1] = True +        cards["C"][int(num) - 1] = True -        d[int(num) - 1] = True -for i in range(0, 13): -    if not s[i]: -        print(("S {:d}".format(i + 1))) -for i in range(0, 13): -    if not h[i]: -        print(("H {:d}".format(i + 1))) -for i in range(0, 13): -    if not c[i]: -        print(("C {:d}".format(i + 1))) -for i in range(0, 13): -    if not d[i]: -        print(("D {:d}".format(i + 1))) +        cards["D"][int(num) - 1] = True +for pattern in ("S", "H", "C", "D"): +    for i in range(13): +        if not cards[pattern][i]: +            print(("{:s} {:d}".format(pattern, i + 1)))