cards = Hash.new

mark = "SHCD"

4.times{|i|
	cards[mark[i]]=[]
	13.times{
		cards[mark[i]].push false
	}
}

gets.to_i.times{
	arg = gets.split(" ")
	cards[arg[0]][arg[1].to_i - 1] = true
}

4.times{|i|
	13.times{|j|
		puts mark[i]+" "+(j+1).to_s if !cards[mark[i]][j]
	}
}