arr = Array.new(4){Array.new(13)}

for i in 0..3
for j in 0..12
 arr[i][j] = true
end
end

n = gets.to_i

for i in 0..n
suit, r =  gets.split
rank = r.to_i

if suit == "S"
 arr[0][rank-1] = false
elsif suit == "H"
 arr[1][rank-1] = false
elsif suit == "C"
 arr[2][rank-1] = false
else suit == "D"
 arr[3][rank-1] = false
end
end

su = ["S", "H", "C", "D"]

for i in 0..3
 for j in 1..13
if arr[i][j-1]
 puts su[i] + " " + j.to_s
end
end
end

 


