object Main extends App {
	override def main(args:Array[String]) = {
		val sc = new java.util.Scanner(System.in)
		val n = sc.nextInt
		
		val allCard = getAllCard
		
		val pw = new java.io.PrintWriter(System.out)
		val has = (1 to n).map(x => card(sc.next , sc.nextInt))
		printCards(allCard.filterNot(has.contains(_)), pw)
		pw.flush
		
	}
	
	case class card(suit:String, number:Int){
		def print :String = {
			suit + " " + number
		}
	}

	def getAllCard = 
		for(s <- List("S","H","C","D") ; n <- (1 to 13) ) yield card(s,n)
		
	def printCards(list:List[card], pw : java.io.PrintWriter):Unit = {
		list.foreach(card => pw.println(card.print))
	}
	
}