as = []
ah = []
ac = []
ad = []

for i in 1..13
as.push("S #{i}")
ah.push("H #{i}")
ac.push("C #{i}")
ad.push("D #{i}")
end

n = gets.to_i

for i in 1..n
card = gets.chomp

case card[0]

when "S"
as.delete(card)

when "H"
ah.delete(card)

when "C"
ac.delete(card)

when "D"
ad.delete(card)

end

end

as.each{|card| puts card}
ah.each{|card| puts card}
ac.each{|card| puts card}
ad.each{|card| puts card}








