<?php
  $ary = array();
  $marks = array("S", "H", "C", "D");
  foreach ($marks as $val) {
    for ($i = 1; $i <= 13; $i++) {
      array_push($ary, ($val . " " . $i));
    }
  }
  $ary_2 = array();
  $a = trim(fgets(STDIN));
  for ($i = 1; $i <= $a; $i++) {
    array_push($ary_2, trim(fgets(STDIN)));
  }
  $ary_diff = array_diff($ary, $ary_2);
  if ($ary_diff) {
    print implode("\n", $ary_diff);
  } else {
    print ""
  }
?>